How to open the ReportViewer based on dynamic Report source

1 Answer 80 Views
Report Viewer - HTML5 Report Viewer - MVC
Leo
Top achievements
Rank 1
Leo asked on 16 Jul 2024, 02:10 PM

I Have a requirement like to open the corresponding HTML5 report viewer dynamically by passing the report source based on the click of a hyperlink.

Example:

Hyperlink1

Hyperlink2.

On clicking the Hyperlink 1, I need to pass the report source dynamically to report viewer and open its corresponding report. Similarly, on clicking link2 and so on.

Kindly suggest me the approach to satisfy this requirement. Thanks in advance.

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 Jul 2024, 03:00 PM

Hi, Leo,

If I understand your requirement correctly, you need to open the HTML5 ReportViewer with dynamic ReportSource. Please correct me if I am wrong.

In the installation folder of the Telerik Reporting product, there is an Examples folder with useful applications for getting started experience. There you can find the CSharp.Net6.Html5IntegrationDemo project (C:\Program Files (x86)\Progress\Telerik Reporting 2024 Q2\Examples\CSharp\.NET 6\Html5IntegrationDemo\CSharp.Net6.Html5IntegrationDemo.csproj) which shows how to load and display different reports after clicking the respective button:

The initially loaded Report catalog ("C:\Program Files (x86)\Progress\Telerik Reporting 2024 Q2\Report Designer\Examples\Report Catalog.trdp") navigates to the clicked report via the specified action for the orange button represented by a TextBox actually:

If you do not wish to integrate the hyperlinks in a report displayed in the report viewer,  you can dynamically change what report source is loaded in the report viewer with the reportSource(rs) method of the HTML5 Report Viewer which you may trigger when the element is clicked.

For more details on the available method, you may visit the Methods of the HTML5 Report Viewer at a Glance - Telerik Reporting article.

I believe that a similar approach would be the perfect fit for the scenario you need to cover.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Tags
Report Viewer - HTML5 Report Viewer - MVC
Asked by
Leo
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or