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

Bind report souce at client side

1 Answer 86 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Majid
Top achievements
Rank 1
Majid asked on 13 Apr 2014, 07:14 AM
Hi,

We are using ASP.NET and report viewer in our application, is it possible to bind the report source from client script, we will have a web method which returns the report source as an xml with the parameter values. On the client side we need to bind the report source to the report viewer.

Regards,
Majid

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 16 Apr 2014, 03:54 PM
Hello Majid,

The data binding should be done on the server, where the report is processed. Thus you need to send the data to the server, bind it to the report e.g. in a similar way to the Changing the connection string dynamically according to runtime data KB article, and set the viewer's ReportResource.

In the case of the ASP.NET ReportViewer you can assign directly the ReportViewer.ReportSource to an InstanceReportSource wrapping the modified report.

In the case of the HTML5 Report Viewer, you will need to use a Custom Report Resolver, in which resolve method to get the report and access the data, based on the sent from the viewer's reportSource string. Then you can return a report source object to the viewer.

Regards,
Stef
Telerik
 

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.

 
Tags
General Discussions
Asked by
Majid
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or