Step 1: Add new project, select Windows Desktop, then select Windows Forms Application and afterwards solution name and then lastly hit on OK button.
Step 2: Now right click on your solution and click option add new item then window will appear, now at right hand side select Reporting and then click on Reporting, type RDLC report name Report1.RDLC and lastly hit Add button.
Step 3: Now click on Toolbox and expand Data, now add BindingSource to your project solution.
Step 4: Now mouse right click, Click on Add, next sub menu TableAdapter option.
Step 5: Now TableAdapter Configuration Wizard will open, here you'll able see different DataTable properties and then hit on Finish button.
Step 6: Here you'll be able to select Choose a Command type, three main Command Types are as follows:
- Use SQL Statements
- Make a new Stored Procedure
- Use Existing Stored Procedure
Save the Connection String to the Application Config File
Choose Methods to Generate
There are three returning methods:
- Fill a DataTable
- Return a DataTable
- Create Methods to send updates directly to the database (GenerateDBDirectMethods)
- Finally click on Next button.
Choose Your Data Connection
Step 7: Now move to RDLC report, mouse right click, click on Insert option then click on sub option Table.
Step 8: Now select Data Sources, here you'll be able see table entities, now drop these entities to RDLC report to populate.
Step 9: Now right click on Table, here you can add Page Header, Page Footer
Step 10: Here now you'll see report is populated City Primary Key, City Name, In page header you'll be able to add RDLC Report (City Details).
Step 11: Once more click on Toolbox, Go to Reporting option, from here drag ReportViewer onto C# forms where ever you've to populate reports.
Step 12: Now right click on ReportViewer, you've to provide Data source and Choose Report Name.
Step 13: Now you have to compile your application and run finally to see RDLC Reports final results.
RDLC Report Main Components
Download Example in Zip
Development Environment: Visual Studio 2013, .NET Framework Version 4.5, MS SQL Server 2012