RDLC reports allow ASP.NET developers to easily represent data to end users. They can be created in Visual Studio using the Report Designer and ReportViewer controls, and allow exporting reports to Excel, PDF and Word formats. The .rdlc file extension contains the report definitions created by Visual Studio. In contrast, .rdl files are used by SQL Server Reporting Services and require a Reporting Services instance. The demo shows how to add a connection string, ReportViewer control, design a sample student report in .rdlc format and display it using the ReportViewer.
2. Agenda
• What is RDLC?
• How are reports created and managed?
• Demo
3. What is RDLC
• Full meaning of RDLC is Report Definition Language Client-side. It is the
extension of report file. It is used to create report s using Microsoft
reporting technology. These files are created by the Visual Studio 2005
version of Report Designer. RDLC reports can be executed directly by the
ReportViewer control in client side.
4. What is RDLC?
• Now a days for reporting purposes we have a lots of choice. RDLC report is
one of the most popular reporting engine for Asp.net developers. Using
RDLC report you can easily represent data to the end user. You can
also export the report in Excel, PDF & MS Word format. Print
functionality also in built in this ReportViewer control
5. RDLC File
• The .rdlc is the format of a report file used by the MICROSOFT reporting
system. Mainly MICROSOFT Visual Studio creates this rdlc FILE
EXTENSION that contain report definitions. This article describes about
the basic over view of RDLC file and the difference between .rdl and .rdlc
files.
The .rdlc is the format of a report file used by theMICROSOFT reporting system. MainlyMICROSOFT Visual Studio creates this rdlcFILE EXTENSION that contain report definitions. This article describes about the
6. .rdl VS .rdlc files
The difference between .rdl and .rdlc files are given bellow:
.rdl
RDL files are created by the SQL Server 2005 version of Report Designer
It is used in SQL Server Reporting Services
It is remote report
Need a Reporting Services instance
7. .rdl VS .rdlc files(cont…)
• rdlc
RDLC files are created by the Visual Studio 2005 version of Report
Designer
It is used in Visual Studio
It is local report
No need a Reporting Services instance
8. How to Add a rdlc Report in a project?
• The steps to add a new rdlc file in a project is given bellow:
• In the Project or Web Site menu or write click on Solution Explorer, select Add
New Item. Add New Item dialog box will be open
• From the Installed Templates pane select Visual Basic or Visual C#
• From the Templates pane select Report or Report Wizard
• If you select Report a blank .rdlc file will be added to the project
• If you select Report Wizard the Report Wizard will be started to guide you through
the steps in creating a report
9. How to Display the rdlc Report in a
ReportViewer Control in Application?
• In Microsoft Visual Studio open the application project or Web site
• Select the form or page that will display the report
• From the Toolbox add a ReportViewer control to the Web page or form
• Set the Size and position of the control on the page or form
• In the ReportViewer Tasks Smart tags panel select an existing .rdlc file in the
Choose Report drop-down list Or click Design a new report to create a new report
using the Report Wizard
• To preview the report build or deploy the application and browse that page or form
10. Demo
• Here I am providing “Creating RDLC report Step by Step in Asp.Net
C# & VB.Net“. Hope it will help you.
11. Demo
• In this example I am using below SQL Server Table:
12. Demo
• 1. Add your connection string in Web.Config file like below:
13. Demo
• 2. Add a ReportViewer from Reporting Tab under Toolbox:
14. Demo
• 3. Now go to the Design View of your page. Select the ReportViewer
control. Click on smart menu and click on “Design a new report”:
16. Demo
• 5. Now click on Next and select the “Student” table:
17. Demo
• 6. Click Finish, Click Next. An “Arrange Fields” page will popup.
Move all columns from “Available Fields” to “Values” Field. Click on
“Roll” column and uncheck the column:
19. Demo
• 7. Now the “Values” Field will look like below:
20. Demo
• 8. Now click Next, click Next. Now choose your report style from left
pane:
21. Demo
• 9. Now open your page in design view. Click on ReportViewer control.
Click on smart menu. Select “Report1.rdlc” from “Choose Report”
DropDown List:
22. Demo
• 10. Now run the project. Oops you will get the error “The Report
Viewer Web Control requires a System.Web.UI.ScriptManager on the
web form”:
23. Demo
• 11. To resolve the error add a “ScriptManager” in your page:
24. Demo
• 12. Now run the project. Hope you will get a report like below: