Data Printing
- 2 minutes to read
Sometimes a user may wish to print out data displayed by the ExpressQuantumGrid. In order to print out the ExpressQuantumGrid, a user can export it to any available format (CSV, HTML, TXT, XML, XLSX, and XLS) and then print the exported file as usually done for these formats. However, these methods are not as convenient and comprehensive as you might wish, because they allow you only to print the current data display without customization being available.
The best way to print out the ExpressQuantumGrid is to use the ExpressPrinting System (installed separately). This component introduces a Grid Report Link, optimized for printing the ExpressQuantumGrid. This report link publishes various sets of options controlling the appearance of the report displaying data from the ExpressQuantumGrid. These options include:
The visibility and position of View elements within a report – OptionsView and OptionsOnEveryPage;
Whether the group or master rows are displayed expanded or collapsed – OptionsExpanding;
Whether the detail Views are printed, including the appropriate master and detail Views – OptionsDetails;
Processing of the selection when creating a report – OptionsSelection.
The Grid Report Link also implements a custom draw mechanism. This is implemented by several events, corresponding to the drawing of particular areas of the report. The TdxGridReportLink class publishes events that fire before drawing the following areas:
Band headers – OnCustomDrawBandCell;
Column headers – OnCustomDrawHeaderCell;
Cell contents – OnCustomDrawCell;
Footer panel – OnCustomDrawFooterCell.
You can handle these events to customize the report’s appearance.