How to set report name in web report designer through url of the browser?

1 Answer 118 Views
Report Designer - Web
Tursunkhuja
Top achievements
Rank 2
Iron
Iron
Veteran
Tursunkhuja asked on 01 Dec 2021, 09:30 AM

Hi,

In our project we are using html5 report viewer and web report designer. There is an issue with the report web designer.

To reproduce it you can use Html5IntegrationDemo project from "..Progress\Telerik Reporting R3 2021\Examples\CSharp\.NET 5\Html5IntegrationDemo" folder.

For the report name we want to get dynamically from URL. To do this we changed webReportDesigner.html file with this custom code:

If you open "Dashboard" report it will work fine: http://localhost:51862/webReportDesigner.html?report=Dashboard.trdp

But, on second time, if you try to open another report it still opening previous report. http://localhost:51862/webReportDesigner.html?report=Barcodes%20Report.trdp

It's opening "Dashboard" report instead of opening "Barcodes" report. 

How we should design to be able to open only correct report?

 

Thank you,

Dimitar
Telerik team
commented on 03 Dec 2021, 12:57 PM

The problem is that the options of the Web Report Designer are respected only once- when the page is loaded. This means that if you want to change a property after the report designer was loaded, you need to reload the whole page with the new setting. This is required because we don't provide a method for setting the report property, similar to what you can do with the HTML5-based report viewers. For example How to Pass Values to Report Parameters.

We have such a feature request that is already logged on our feedback portal--Set report of Web Report Designer dynamically and I voted for it on your behalf. When there is an update, you will receive a notification.

Tursunkhuja
Top achievements
Rank 2
Iron
Iron
Veteran
commented on 06 Dec 2021, 05:41 AM

Hi Dimitar,

I'm not setting report property dynamically without loading the page. I set report name via page url and I always reload the page after set new report name. Does it get new values on reloading the page (or clicking F5) ?

Dimitar
Telerik team
commented on 08 Dec 2021, 02:35 PM

It should be getting the report value on a page reload(not sure if clearing cache is required).

I have attached an example project on how to make the designer load a report dynamically, please check it out.

1 Answer, 1 is accepted

Sort by
1
Byron
Top achievements
Rank 1
Iron
answered on 31 Dec 2021, 11:54 AM

There's a key in local storage LastOpenedReport. If this key exist, the designer will load report from it.

You need to delete this key before init the report designer. Hope it helps.

localStorage.removeItem("LastOpenedReport");

 

Tags
Report Designer - Web
Asked by
Tursunkhuja
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Byron
Top achievements
Rank 1
Iron
Share this question
or