Articles in this section
Category / Section

How to set the parameter in Web API Controller

Published:
Updated:

Use the OnReportLoaded method to set parameter default value in the Web API controller.

[NonAction]
public void OnReportLoaded(ReportViewerOptions reportOption)
{
    List<BoldReports.Web.ReportParameter> userParameters = new List<BoldReports.Web.ReportParameter>();
    userParameters.Add(new BoldReports.Web.ReportParameter()
    {
        Name = "SalesOrderNumber",
        Values = new List<string>() { "SO50756" }
    });
    reportOption.ReportModel.Parameters = userParameters;
}

You can find the following help documentation for how to set the parameter at client side in various platforms.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied