Spreadsheet Report Designer Control
- 4 minutes to read
The ExpressSpreadSheet Report Designer Control (the Report Designer control, for short) implemented as the TdxSpreadSheetReportDesigner component is designed to create spreadsheet document-based templates and build simple and master-detail tabular reports from one or more bound data sources. The Report Designer is a data-aware Spreadsheet control version that hosts a report template including at least one section with placeholder fields corresponding to the bound dataset’s fields, and therefore, the actual field values in resulting reports.
The Report Designer control can replace the source template with a built report document or show it in a separate Spreadsheet or Report Designer control, depending on the destination passed as the Build procedure’s parameter. The procedure always excludes all cells outside the report section boundaries from the resulting report document:
A simple report template (as in the previous case) always includes the detail section with placeholder fields corresponding to the bound dataset’s fields, and optionally, the header and/or footer sections that include inscriptions identical for all reports (such as column captions and a company’s logo, for example). In addition to these sections, master-detail report templates include at least one nested detail section:
A section within a report template can include simple and formatted cell values, formula expressions, comments and floating containers like any other spreadsheet document. In addition, report sections can have special placeholder fields that correspond to the stored dataset fields obtained from one (in the case of a simple report) or more (for master-detail reports) datasets bound to the Report Designer control via the DataBinding property. All these placeholders are cells with formula expressions that include special report template functions, usable like any other registered function.
The Report Designer provides the Field Chooser that shows a tree-like structure populated with fields from one or more bound datasets. End users can drag-and-drop these fields to cells within report template sections to create placeholder cells. The corresponding report template formula expressions are created automatically.
You can either invoke this UI element as a separate floating form or host it within a specific control (the TcxGroupBox control, for example) by assigning it to the Field Chooser’s Site property.
Once the report template is ready, call the Report Designer’s Build procedure passing the target Spreadsheet control as a parameter. Depending on the Report Designer’s Options.ReportMode property value, the procedure can build grouped and/or multi-level reports on multiple worksheets, or separate documents (if you provide additional target controls as report destinations within the OnNewDocument event handler.
The following table lists the Report Designer-specific class members that complement the core spreadsheet functionality that the TdxSpreadSheet control provides:
Contents | The Data The Data The Set |
Appearance | With the Options. |
Behavior | The Options. Additionally, the Data With the Field |