This document describes the key aspects of publishing, storing and distributing report documents.
Calling the XtraReport.CreateDocument method fills data sources available in the report, supplies bound report controls with the obtained data, and starts building document pages. This method is called internally when loading a report in a Print Preview or exporting a document.
In the Visual Studio Report Designer, you can trigger document creation and preview the document by switching to the Preview tab below a report's design surface.
Creating extensive documents may take a considerable amount of time. You can interrupt the page building process at any time by clicking Stop on the Print Preview's status bar.
When using large data sources, you can reduce the load on your database server that filling the data source causes each time you switch to Preview by limiting the number of times the detail band is printed (see the XtraReportBase.ReportPrintOptions property description).
Saving and Loading Documents
You can save the created document to a file:
Report documents are compressed and stored in archive files with a PRNX extension by default. This file extension is used to filter data in the Save File and Load File dialogs displayed in a Print Preview.
After saving a report's document, you can open it in any desktop report viewer version (WinForms or WPF):
DevExpress reports are backward compatible and do not need to be updated each time you upgrade your product version.
Consider storing report definitions along with published documents to be able to make changes to the document layout at a later time.
Make sure you take the necessary measures to protect your documents from unauthorized access. Consider using third-party tools to encrypt documents containing sensitive data or protect them using digital signatures.
A document provides a snapshot of dynamic data source contents when it is created. Another document created from the same report can contain different information as a result of changes made to the report's data source. Published documents often display a timestamp, user name and information about parameter values assigned to the report to provide the right context for published information and ensure its validity.
Reports are commonly used to create and distribute documents automatically on a schedule.
Consider choosing the DevExpress Report Server - a stand-alone multi-user client-server solution providing advanced mechanisms for management, scheduling, and distribution of reports and dashboards out of the box.
Data presentation in published documents does not depend on the system's culture and locale settings. A document's culture-specific content does not change when viewing it on different machines.
A single exception to this is the XRPageInfo control that uses the current application thread's culture settings to format its date-time values by default.
Use the PrintingSystemBase.Culture property to define a specific culture for rendering this control's content to ensure consistency across various systems.
When publishing a document, the Printing System transforms each report control into a graphical primitive (brick) corresponding to the control's type. A brick renders a control's content and defines its size and location on a document's page.
In most cases, you do not need to access and manipulate individual bricks because you can manipulate elements in a report instead. See Printing-Exporting for more information about the low-level API the printing library uses to create documents.
Was this page helpful?
Thanks for your feedback! Any other suggestions? Tell us here.