This article provides tips that can help you prevent reports that run for a long time from timing out.
Paginated reports and documents are generated by using Microsoft SQL Server Reporting Services. Reporting Services retrieves report data from Application Object Server (AOS) by using a custom extension that uses Windows Communication Foundation (WCF) to communicate with AOS. The size of the data set and the complexity of the report that is generated can affect the time that is required to display the report. Additionally, if various time-outs and other thresholds are reached, report generation might fail. Service time-outs in deployments are fixed and limit interactive connections to 10 minutes. Any data set generation process that exceeds this service time-out limit won't be completed. This article describes the extensions that support long-running reports. These extensions help guarantee that long-running reports can be generated even if the process exceeds the 10-minute service time-out limit.
Preprocess the data source
If the report uses the Report Data Provider (RDP) to retrieve data, the report should be modified to use a pre-processed RDP class as the data source. In this way, processing logic is invoked before a call is made to Reporting Services. For more information about RDP classes, see Using Report Data Provider Classes to Access Report Data and Report Programming Guide. How do I migrate a regular RDP to a pre-process data access solution by using TempDB?
- Change the RDP base class from SRSReportDataProviderBase to SRSReportDataProviderPreProcessTempDB.
- Update the table type from InMemory to TempDB.
- Rebuild the report's RDP class.
- Restore the data source that is linked to the RDP class in the report designer.
- Redeploy the report.
- Introduce a Controller class to run the report.
- Update the Output Menu Item so that it points to the Controller class instead of the report.
The following video demonstrates the process:
Use batch processing
To improve performance when you print statements or reports that include large amounts of data, use batch processing. When you use batch processing, you can run specific tasks as batch jobs and then schedule those batch jobs to run on a different computer (a batch server). By moving the processing of these tasks to a batch server, you can improve the report performance on the client computer. You can also apply range restrictions to limit the size of each batch. To further improve performance, don't submit one large batch. Instead submit multiple smaller batches for processing at the same time on different servers. Many tasks can be run as part of batch jobs. For more information, see Batch processing overview.