Report Service Life Cycle
- 3 min to read
During the life cycle, a report service may pass through several stages that serve different aspects of server-side report management. This document lists the main operations exposed by the report service, and describes how to customize report service functionality at different stages within a life cycle.
All stages of the report service life cycle serve the report publishing (report preview, print, and export) purpose.
Each stage of the report service life cycle is maintained by a set of service operations.
Some of the operations are long running (e.g., building, printing, and exporting). Before trying to obtain the result of such operations, you need to check if the operation has finished. For each long running operation there is a method allowing you to check its status.
This section describes the stages of the report service life cycle that are related to report publishing. These stages include the preview, print, and export functionalities.
Prepare the Print Preview
At this stage, the document to be displayed in the preview is built on the server side.
- ReportService.GetReportParameters - obtains the parameters available in a report before starting to build the report document.
- ReportService.StartBuild - starts building a report document on the server side. This method initiates a long running operation. To obtain the operation status, the ReportService.GetBuildStatus method is used.
- ReportService.GetBuildStatus - gets the current build status of a report.
- ReportService.GetPages - obtains an array of report pages.
- ReportService.GetDocumentData - gets the data related to a document.
If the IReportBuildInterceptor extension is implemented, its methods are called to process a report before and after building a temporary document from it.
If the IDocumentDataStorageProvider extension is implemented, its properties determine settings to store a temporary document generated from a report at this stage.
To obtain a report from the server using a custom name, implement the IReportResolver MEF extension.
You can provide a separate storage for the document's binary data by implementing the IBinaryDataStorageExtension extension.
At this stage the document is printed.
- ReportService.StartPrint - starts printing the specified document. This method initiates a long running operation. To obtain the operation status, the ReportService.GetPrintStatus method is used.
- ReportService.GetPrintStatus - the current status of a printing process.
- ReportService.GetPrintDocument - gets the document that is ready to be printed.
At this stage, the document is exported to one of the supported third-party formats.
- ReportService.StartExport - starts exporting the specified document. This method initiates a long running operation. To obtain the operation status, the ReportService.GetExportStatus method is used.
- ReportService.GetExportStatus - returns the current status of the exported document.
- ReportService.GetExportedDocument - writes the exported document to a stream.
If the IReportBuildInterceptor extension is implemented, its methods are called to process a document before and after it is exported to a third party format.