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. (Last updated on: November 16, 2018).
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.



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.



Use the following code to set parameters for Sub Report.



Demo Sample

You can download the Demo Sample from the following link.


Further References

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



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.




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

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

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