Click here to Skip to main content
13,506,180 members
Click here to Skip to main content
Add your own
alternative version


23 bookmarked
Posted 20 Apr 2013

.NET Reporting Tool Tutorial - 1

, 28 Apr 2013
Rate this:
Please Sign up or sign in to vote.
A basic tutorial for ReportMax tool


ReportMax is a free reporting tool for .NET Framework developers on Visual Studio.NET 2010 and 2012. It is easy to use and rich in features. In this tip, I would like to step through a basic tutorial to get you started in this tool. More tutorials to come.


As a main developer for this tool, I would like to provide help on how to use this tool. It is free and great to use. The current version is 2.2 and we have fixed many bugs and issues. Feel free to use the tool. You can view your reports in PDF format.

Using the Code

In this tutorial, I will show how we can use ReportMax without a single line of code. You can instantly preview your report from the designer by right clicking on a blank area and select Preview Report. Here are the steps to use the tool. You need to install ReportMax 2.2 from here.

Designing the Report

  1. Run Visual Studio.NET
  2. Goto File -> New Project
  3. Select Visual C# - Windows. Then Select Windows Forms Application. Enter TestReportMaxWinForms for the Project Name. Click OK.
  4. From the Project menu, Select Add New Item. Select ReportMax files from the left. Select Blank Report (Inch) from the right. Name the File to MainReport. Click Ok.
  5. Add a Label (lblHeader) in the middle of the Page Header section. Enter Arial Font Bold 24. Enter Alignment Property as Centered. Enter the text of the label to "Cities of the World".
  6. Right click on a blank area in the report and select Add Section - Group Header/Footer
  7. Click on a blank area in the report to view the Page properties. Or right click on a blank area and select Properties.
  8. Click on the ... button in the ConnectionString property. Select Microsoft Jet 4.0 OLE DB Provider. Click Next. Browse to Cities.mdb Access database sample file. Hit Test Connection to make sure. Click OK to close the dialog. Please note that in order to run the sample report file, you need to do this step to select the sample database, or otherwise the database path will be invalid.
  9. In the SQL Property. Click the ... button. Enter the following SQL Statement and hit OK.
    SELECT Country.Code, Country.CountryName, City.CityName, City.Population
    FROM Country INNER JOIN City ON Country.Code = City.Country
    ORDER BY Country.CountryName;
  10. Click on the Group Header blue bar to view its properties. Enter "Code" in the DataField Property (without the quotes)
  11. Add a Textbox in the Group Header area (between the Group Header and the Detail section). Blank that textbox. Name it: txtCountryName. Set the DataField property to "CountryName".
  12. Select the Detail section bar. Select AutoExpand to True and AutoShrink property to True.
  13. Add two textboxes in the Detail section. Name the first txtCityName and the section txtPopulation. In the DataField property of txtCityName, enter "CityName". In the DataField property of txtPopulation, enter "Population".
  14. In the Group Footer section. Add a textbox (Field) named txtPopulationTotal. Set the DataField property to "Population". Set the FunctionType property to Sum. Set the FormatType to 1-Number and the Format to 3 - 123,356,789.
  15. Add a label near txtPopulationTotal with text "Population Total"
  16. In the Page Footer Section. Add a Field control named "txtPageNo". Set the FunctionType property to Page Number. You can add another Field control and set the FunctionType to Page Total. This way, you will have Page n of m at the bottom of every page.
  17. Make sure to save your work.

Viewing the Report

  1. Goto to Form1 Design window. View the Toolbox. Right click the General category and Select Choose Items... The Choose Items dialog will appear. In the .NET Framework Components tab, click on the Namespace column. Go to the top and locate ReportMaxViewer component and add it to the dialog.
  2. You will find the ReportMaxViewer component in the Toolbox. Click and drag over the form and place it stretched on the form.
  3. Click on the control placed on the form and locate the OutputType property. You have three choices. You can view it on the control window, to the Printer or to a PDF File. Make sure it is rmOutputTypeWindow.
  4. In the ReportFile property, browse to the location of MainReport.rpm you created.
  5. Run the project. You should be able to see your report.

Points of Interest

The source code for ReportMax is not available yet, but I have provided the sample project. Make sure you point the ConnectionString property of the Page to the correct location of the database provided Cities.mdb. I would like to mention that you can use images and charts, and you can customize your output by code. You can also connect to virtually any database type.

Also, please refer to:


  • Added VB.NET sample. Follow the same steps in the tip.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior) CppMax
Canada Canada
Check out our light-weight, easy to use and powerful Microsoft .net reporting tool

You may also be interested in...


Comments and Discussions

GeneralAn excellent contribution Pin
Richard at BDG11-Mar-15 12:03
memberRichard at BDG11-Mar-15 12:03 
QuestionUnable to use ReportMax Forum Pin
Richard at BDG10-Mar-15 11:53
memberRichard at BDG10-Mar-15 11:53 2010 express - ReportMax not available in add new item Pin
Jahragon29-Sep-14 8:17
memberJahragon29-Sep-14 8:17 
AnswerRe: 2010 express - ReportMax not available in add new item Pin
emadns27-May-15 9:01
memberemadns27-May-15 9:01 
AnswerRe: 2010 express - ReportMax not available in add new item Pin
emadns9-Mar-16 8:09
memberemadns9-Mar-16 8:09 
GeneralReport Header and customize report Pin
Pudjo13-Jul-14 22:16
memberPudjo13-Jul-14 22:16 
QuestionEmpty Report Pin
Member 1068910521-Mar-14 6:59
memberMember 1068910521-Mar-14 6:59 
QuestionEmpty report Pin
Wang Chun Hsun10-Mar-14 22:05
memberWang Chun Hsun10-Mar-14 22:05 
AnswerRe: Empty report Pin
emadns11-Mar-14 4:29
memberemadns11-Mar-14 4:29 
Questionerror preview Pin
--raver--204616-Dec-13 5:02
member--raver--204616-Dec-13 5:02 
AnswerRe: error preview Pin
emadns16-Dec-13 5:50
memberemadns16-Dec-13 5:50 
AnswerRe: error preview Pin
emadns16-Dec-13 6:19
memberemadns16-Dec-13 6:19 
QuestionReport Viewer Pin
spafa327258-Nov-13 6:15
memberspafa327258-Nov-13 6:15 
AnswerRe: Report Viewer Pin
emadns8-Nov-13 7:59
memberemadns8-Nov-13 7:59 Pin
dherrmann25-Apr-13 23:48
memberdherrmann25-Apr-13 23:48 
AnswerRe: Pin
emadns26-Apr-13 8:45
memberemadns26-Apr-13 8:45 
AnswerRe: Pin
emadns28-Apr-13 8:31
memberemadns28-Apr-13 8:31 
GeneralRe: Pin
dherrmann28-Apr-13 21:57
memberdherrmann28-Apr-13 21:57 
GeneralRe: Pin
emadns29-Apr-13 4:12
memberemadns29-Apr-13 4:12 
GeneralRe: Pin
dherrmann29-Apr-13 21:30
memberdherrmann29-Apr-13 21:30 
GeneralRe: Pin
emadns30-Apr-13 3:12
memberemadns30-Apr-13 3:12 
GeneralMy vote of 5 Pin
sha-pro24-Apr-13 14:27
membersha-pro24-Apr-13 14:27 
GeneralRe: My vote of 5 Pin
emadns24-Apr-13 15:09
memberemadns24-Apr-13 15:09 
QuestionSupport for other OLE DB provider Pin
Josip8420-Apr-13 10:37
memberJosip8420-Apr-13 10:37 
AnswerRe: Support for other OLE DB provider Pin
emadns20-Apr-13 11:45
memberemadns20-Apr-13 11:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.180417.1 | Last Updated 28 Apr 2013
Article Copyright 2013 by emadns
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid