<< Click to display table of contents >> TrvrActionReportWizard |
TrvrActionReportWizard generates a new master-detail report template.
Unit RVReportActions;
Syntax
TrvrActionReportWizard = class (TrvAction)
TObject TPersistent TComponent TBasicAction TContainedAction TCustomAction TAction TrvCustomAction TrvAction |
Report wizard
The action displays a wizard dialog to generate a new master-detail report template.
In this dialog, the user selects a master data table, chooses fields of this data table, and how they are displayed. Then the process is repeated for a detail table, then for a detail table of this detail table, and so on. The wizard finishes when:
•the user chooses to finish
•there are no more detail tables
•at the last level, the user chose a way of data representation that does not support details.
The resulting report template can have any number of master-detail levels; but there can be only one detail at each level. This limitation comes from the step-by-step nature of a wizard dialog.
Data tables (datasets)
Data for a report template are provided by DataProvider (required).
The following types of data providers can be used:
•data providers with predefined master-detail relationships (such as TRVReportDBDataProvider);
•data providers that support SQL data queries (see the list of data providers); see also AllowSelfReferences;
•TRVReportDbfDataProvider for Lazarus
Clearing the editor
The action clears the target editor and resets its properties before the report template generation. It uses ActionNew for this task (required).
Visual appearance
If the report template contains tables, their appearance is defined by ActionInsertTable and FullWidthTables properties.
If the target editor's UseStyleTemplates = True, appearance of text and paragraph is defined by style templates (otherwise, the action uses Style.TextStyles[0] and Style.ParaStyles[0] of the target editor for all text).
Depending on the value of UseCurrentStyleTemplates, the action uses either style templates of the target editor, or ActionNew.StyleTemplates.
Some names of used style templates are hard-coded ('Normal', 'heading 1', 'List Paragraph'), some names are defined in properties. See the topic about AccentedTextStyleTemplateName, ReportFooterStyleTemplateName for additional information.
Tables can have either 100% width, or a fixed size that depends on the current width of the target editor window, see FullWidthTables.