This is a migrated thread and some comments may be shown as answers.

Pass parameter and refresh report MVC4 Extension

1 Answer 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Praveen asked on 28 May 2014, 11:25 AM
I am working on a Demo to give to client for approval of using telerik report in MVC4 web site. I am facing an issue in passing parameter and refresh report.
Requirement as per client in all reports that on page load report will be loading with default values for filter and after that user can select any values in any filter criteria and click on button in that case report needs to be updated on the basis of filter criteria. Currently i am using Reportviwer with html helper Please help me your earliest i have to give this Demo to client on Thursday evening.

   var typeReportSource = new TypeReportSource() { TypeName = "ClientTrackingReport" };
    typeReportSource.Parameters.Add("X", Model.X);
    typeReportSource.Parameters.Add("Y", Model.Y);
    typeReportSource.Parameters.Add("Z", Model.Z);
    typeReportSource.Parameters.Add("A", Model.A);
    typeReportSource.Parameters.Add("Datefrom", Model.From);
    typeReportSource.Parameters.Add("DateTo", Model.To);   

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 30 May 2014, 03:53 PM
Hi Praveen,

You can find general information how the HTML5 Report Viewer and Reporting REST service work in the following forum thread: 400 Bad Request for /api/reports/clients/{client_id}/parameters.

In your scenario you use the assembly qualified name of the report, which has to be in the format <namespace>.<report_name>, <assembly_name>. Then to avoid the persisting of the report between requests you need to set the viewer's persistSession option to false. The parameters passed from the report source object will be mapped to the report's ReportParameters collection by key.

Parameters which Visible property is set to false would not be listed in the viewer's parameters area. Details how to update their values from outside the viewer are available in the How To: Pass values to report parameters help article.

In future, if it is an emergency please use our support ticketing system, which assigns response time based on your support subscription.


Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question