<< Click to display table of contents >> TrvrActionInsertTable |
TrvrActionInsertTable is an action for inserting a report table at the caret position of the target editor.
Unit RVReportActions;
Syntax
TrvrActionInsertTable = class (TrvActionInsertTable)
TObject TPersistent TComponent TBasicAction TContainedAction TCustomAction TAction TrvCustomAction TrvAction TrvActionInsertTable |
Inserting a blank table
By default, this action works exactly like RichViewActions' TrvActionInsertTable, but inserts TRVReportTableItemInfo instead of TRVTableItemInfo.
In this mode, this action is redundant: you can use TrvActionInsertTable instead, and the actions for editing report table properties may convert normal tables to report tables.
Generating from a data table
If you assign DataProvider property, this action works in a different mode: generating a report table by a data table (i.e., from a dataset). The action displays a dialog window where the user can:
•select a data table (from a list of data tables returned by DataProvider)
•choose which fields of this data table will be included in a report table (see OnIsIDFieldName event)
•rearrange these fields
•define the report table heading lines.
Each column in the resulting report table corresponds to a chosen data field.
The table has from 1 to 3 rows (1 data row and up to 2 heading rows).
Heading rows
The first heading row is added if the user types a table heading text. This row has a single cell that occupies all columns.
The second optional heading row contains names of fields.
If the target editor uses style templates, HeadingTextStyleTemplateName and HeadingParaStyleTemplateName are applied to cells in heading rows.
HeadingRowColor property is used only if the table has heading row(s).
Data row
The action adds a row generation rule to the table. The rule name is equal to the name of the selected table.
The last row contains field codes. They can be short form ({FIELDNAME}) or in the full form ({RULENAME:FIELDNAME}) depending on the value of FullFieldNames property.