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

Binding data to Report file in ASP.Net MVC application

6 Answers 297 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Venkat
Top achievements
Rank 1
Venkat asked on 15 Dec 2014, 07:58 AM
Hi,

We are designed the report using Report Viewer and able configure the report file using Report Viewer of Kendo.UI for ASP.Net MVC application.

Since in Report Designer, the report controls are bind with Data Source object with results. But as per my requirement, we need to bind the data at the run time based on other filter options. I tried to look into the Demo and Documentation of the reporting for this but could not able to get it.

Here is my reportViewer code used to display the report:

    @(Html.TelerikReporting().ReportViewer()
       .Id("reportViewer1")
       .ServiceUrl("/api/reports/")
       .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.html")
               .ReportSource(new UriReportSource() { Uri = "TransactionSummary.trdx" })
       .ViewMode(ViewModes.INTERACTIVE)
       .ScaleMode(ScaleModes.SPECIFIC)
       .Scale(1.0)
       .PersistSession(false)
    )


To the transaction summary report I need to pass the data at the run time.

Can some one please guide us on this as early as possible?

Regards!

6 Answers, 1 is accepted

Sort by
0
Venkat
Top achievements
Rank 1
answered on 16 Dec 2014, 05:19 AM
Hi,

Can some one please give a details for the same as urgent basis?

Regards!
0
Accepted
Stef
Telerik team
answered on 17 Dec 2014, 05:17 PM
Hello Venkat,

Please check the explanation how the HTML5 Report Viewer and the Reporting REST service work together in this forum thread.

In the thread I mention a custom report resolver, where you can apply your logic for getting the TRDX file, deserializing it in Telerik.Reporting.Report object and changing the data items' DataSource properties.
Keep in mind the revolver's Resolve method can be called multiple times on a request for report, and you may need a mechanism to preserve the changes to avoid re-retrieving the data.


In future, if it is an emergency please use the support ticketing systems. This guarantees you a response from Telerik representative in time range set by the system based on your purchased support plan.

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.

 
0
Venkat
Top achievements
Rank 1
answered on 18 Dec 2014, 07:10 AM
Hi Stef,

Thanks for your reply. Will check the links and get back to you if I have any other issues.

Regards!
0
Venkat
Top achievements
Rank 1
answered on 21 Dec 2014, 08:05 AM
Hi Stef,

It had worked for us, thanks!

Regards!
0
Daniel
Top achievements
Rank 1
answered on 24 Aug 2015, 04:48 PM

Stef,

[quote]Keep in mind the revolver's Resolve method can be called multiple times on a request for report, and you may need a mechanism to preserve the changes to avoid re-retrieving the data.[/quote]

Could you ​give an example of how to preserve changes? Our ReportResolver implementation does a fair amount of work. We could cache ​the report ​on the first ​call made per request, but the report id being passed to Resolve isn't an adequate key.

0
Stef
Telerik team
answered on 27 Aug 2015, 08:44 AM
Hello Daniel,

The argument of the resolver's Resolve method is the string description sent by the viewer(client) reportSource.report. Thus you can include any information that can help you determine if the same report is requested and it must be taken from your custom cache, or it is a new report that has to be resolved.

I hope this information helps you.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Venkat
Top achievements
Rank 1
Answers by
Venkat
Top achievements
Rank 1
Stef
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or