Progress® Telerik® Reporting R2 2017

HTML5 Report Viewer and Reporting REST services

The HTML5 Report Viewer is a client-side widget served by a running instance of Telerik Reporting REST Service. The state of the report displayed in the viewer is preserved between requests by the Reporting REST Service and having reports' cache storage is obligatory.

To configure the Reporting REST service cache you you can choose between the available storage implementations - REST Service storage. The cache storage settings must be considered with the type of hosting of the Reporting REST Service.

Cache Management

The following actions are performed on displaying a report in the HTML5 Report Viewer:

  1. On loading the page with the HTML5 Viewer, the viewer sends a request to the Reporting REST service to cache a viewer with an unique clientId;

  2. The client-side report source (report description as a string and parameters collection in a JSON formatted string) is sent to the Reporting REST service;

  3. The Reporting REST service resolves the received string description to a valid server-side report source object through its report resolver set in the service's configuration. Then the service caches the server-side report source with an unique instanceId for the current clientId;

  4. The viewer sends a request for creating a document with appropriate rendering format. The service adds a cache entry for the document with an unique documentId for the current instanceId;

  5. The client (HTML5 Viewer) awaits the report processing and rendering on the server to end. The viewer requests the state of the document and the number of rendered page on an even interval from the Reporting REST service.

  6. When the first page is ready, the viewer requests the page and it is displayed. The polling continues untill all document pages are ready. Additional requests for resources as images may follow. All pages and resources are cached by the service.

The communication between the HTML5 Viewer and Reporting REST Service happens via AJAX requests. More details about the type of each request to the service can be found in the REST API.

Note Note

If you connect a WinForms ReportViewer or WPF ReportViewer to a Reporting REST Service instance, there will be generated a new ClientId on each request sent by the desktop viewer.

On each interaction with the report in the viewer, the service accesses the cache storage provided in the service's configuration (ReportServiceConfiguration property). The current client ID, instance ID and document ID are used to locate the correct resources for the report and return them to the viewer.

The created cache records expiration period as well as other service settings may be setup using an implementation of the IReportServiceConfiguration interface as service configuration. See the Implement the reports controller and the How To: Add Telerik Reporting REST ServiceStack to Web Application help articles accordingly for implementation details.

Important cache management related properties of the IReportServiceConfiguration:

  • ClientSessionTimeout property

    Gets or sets a value in minutes indicating how long a client(viewer) session will be preserved in the service storage after the last interaction from this client. When this timeout expires, there must be registered a new client(viewer).

  • ReportSharingTimeout property

    Gets or sets a value in minutes indicating how long a rendered report document from a client will be availble for reuse, including for reuse by other clients' requests. When a report is rendered once for a given set of report parameters' values, it can be reused for the time set as ReportSharingTimeout. Setting the ReportSharingTimeout to zero(0) will cause each client request for report to produce a new report instance instead of reusing the already cached ones.

    Note Note

    On navigation to reports via NavigateToReportAction there always will be created a new instance of the target report.