New to Telerik Reporting? Download free 30-day trial

Remove Opened Reports with Code in the Web Report Designer

Environment

Product Progress® Telerik® Reporting

Description

The Web Report Designer utilizes the browser local storage to keep the previously opened reports. For that reason, if you close the designer without closing the reports, on the next designer opening in the same browser, all the previously opened reports will be re-opened. In some scenarios, this may cause failures.

Suggested Workarounds

  1. We have introduced the web designer property 'Preserve open reports on exit'. You may find it under Preferences > GENERAL when you open the Workspace preferences Menu option. The user may uncheck it to disable displaying the opened reports on a refresh of the browser. If you need to do this with code, you may use the following function in the initialization of the designer, and the keeping of the opened reports on refresh will be disabled:

    window.localStorage.setItem("RestoreReports", "false");
    
  2. You may use JavaScript to remove the previously opened reports and the last one that is kept separately:

    window.localStorage.removeItem("PreviouslyOpenedReports");
    window.localStorage.removeItem("LastOpenedReport")
    

Notes

In Blazor you may invoke JavaScript functions as explained in the Microsoft article Call JavaScript functions from .NET methods in ASP.NET Core Blazor.

In this article