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.
Syncfusion Feedback

How to set Parameters to Report in ReportViewer at Runtime?

When you want to pass the report parameters to the RDL/RDLC reports programmatically while a report is being loaded and a sub report is being processed, Syncfusion ASP.NET MVC Classic version of ReportViewer has support to programmatically set report parameters to report and this section helps you in learning how to set parameters to report programmatically in ReportViewer control.

When you are new to ASP.NET MVC Classic version of ReportViewer, you can refer to the Getting Started with ASP.NET MVC Classic version of ReportViewer from the following article.

http://syncfusion.com/support/kb/2669

 

Set Parameters Programmatically to Report

You can add collection of report parameters programmatically using the ReportViewerModel’s Parameters property that is the list type of ReportParameter class. The ReportParameter contains Name, Values, Labels, and Nullable properties to specify name, values and labels of report parameter.

Use the following code to set parameters.

C#

 

Use the following code to set parameters for Sub Report.

C#

 

Demo Sample

You can download the Demo Sample from the following link.

http://www.syncfusion.com/downloads/support/directtrac/general/ReportViewerSample-2061069698.zip

Further References

You can find documentation and online demo samples for ASP.NET MVC Classic ReportViewer control from the following links.

http://help.syncfusion.com/asp.net%20mvc

http://mvc.syncfusion.com/demos/reporting/reportviewer

Newer ASP.NET MVC version of ReportViewer

You can try the newer version of MVC ReportViewer that is powered by JavaScript/HTML5. You can refer to the documentation and online demo samples for newer ASP.NET MVC ReportViewer control from the following links.

http://help.syncfusion.com/web

http://mvc.syncfusion.com/demos/web/ReportViewer/

 

Article ID: Published Date: Last Revised Date: Platform: Control:
2669 11/14/2014 11/14/2014 ASP.NET MVC (Classic) ReportViewer
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon 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.Close Icon