Use the close method to free up the report

Parent Previous Next

 

Report Application Server .NET SDK Developer Guide

Use the close method to free up the report


 







Another way to optimize scalability with RAS is to use the close method to release the memory that is used by the report.

The ReportClientDocument.Close method

When using the RAS API in conjunction with a RAS server, reports are stored on the Report Application Server, but they are represented on the Web server by an instance of ReportClientDocument. If the ReportClientDocument instance passes out of scope without calling the ReportClientDocument.close method, the Report Application Server keeps the report open in memory, even though the report can no longer be accessed. When those circumstances are repeated in a highly scaled situation, the memory on the Report Application Server fills with reports that are no longer being accessed on the Web server.

To resolve that problem, call the ReportClientDocument.Close method. The report is closed on the Report Application Server and the memory is released for further reports.

When to call the ReportClientDocument.Close method

The close method should not be called on the page before the report has been displayed, because the report must remain open on the server until the display process has been completed.

For a ReportClientDocument instance, the close method immediately closes the report and the report cannot be reopened. Therefore, if the close method is called before the report is displayed, the report will be inaccessible and an exception will be thrown.

The right time to call the close method is during the Page_Unload event.

© 2021 SAP AG. All rights reserved.

http://www.sap.com/sapbusinessobjects/

Support services

http://service.sap.com/bosap-support/

Created with the Personal Edition of HelpNDoc: Produce electronic books easily