We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to Load RDLC Report in ReportViewer LightSwitch HTML?

This article helps you to explain the steps for loading RDLC report in ReportViewer LightSwitch HTML Control, process it with local mode and bind the data source to the report.

When you are new to ReportViewer LightSwitch HTML, you can read Getting started with ReportViewer LightSwitch HTML from the previous article available in the following link.

http://www.syncfusion.com/kb/2614/getting-started-for-reportviewer-lightswitch-html

Load RDLC Report

The ReportViewer has an option to load RDL/RDLC reports and process them locally. The following steps help you to load a RDLC report file from server application and bind data to the report at server.

1. Add a New Folder in Server Project and name it as ReportTemplate.

2. Copy and paste the sample RDLC report file Sales Dashboard.rdlc to ReportTemplate folder. Content and resource items in a LightSwitch project are not deployed with the application by default. You can deploy these items by changing some properties for the file. Change the Build Action property for report file as Content and Copy to Output Directory as Copy always.

               

Figure 1: RDLC File Added to Server Project

 

 

http://help.syncfusion.com/ug/js/ImagesExt/image355_7.jpgNote: You can obtain sample rdlc file “Sales Dashboard.rdlc” from Syncfusion samples installed location(%userprofile%\AppData\Local\Syncfusion\LightSwitch\X.X.X.X\HTML\2013\SampleBrowser\SampleBrowser.Server\ReportTemplate). “X.X.X.X” is the Essential Studio Release Version.

3. For processing the RDLC reports locally, you have to set ReportViewer’s reportPath as desired rdlc file name(Sales Dashboard.rdlc) and processingMode as ej.ReportViewer.ProcessingMode.Local

 

4. Set RDLC file path from sample application at WebApi OnInitReportOptions

 

5. You can bind the data source to ReportViewer control either at OnInitReportOptions or at OnReportLoaded methods.

 

Run the Application

Run the sample application and you can see the ReportViewer with Sales Dashboard report on the page as displayed in the following screenshot.

C:\Users\pandimurugana\AppData\Local\Microsoft\Windows\INetCache\Content.Word\reportviewer.png

Figure 2: ReportViewer with Sales Dashboard Report

Demo Sample

You can download the Demo Sample from the following link.

Local Report (RDLC) Sample

http://www.syncfusion.com/downloads/support/directtrac/131644/ReportViewerSample-538961706.zip

Further References

You can find documentation and demo samples for JavaScript, ASP.NET, and ASP.NET MVC ReportViewer Control from the following links.

http://js.syncfusion.com/demos/web/

http://help.syncfusion.com/web

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework:
2976 11/27/2014 11/27/2014 LightSwitch HTML ReportViewer 4.5
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.