Rosi ComponentsUnits Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers |
Class TrXMLReport
Unit
rXMLReport
Declaration
type TrXMLReport = class(TComponent)
Description
rXMLReport is non visual component which provides functionality for generating reports according prepared DOCX or ODT template with special TAGs
Hierarchy
Overview
Fields
Methods
 |
procedure Execute(DataSets: array of TDataset); |
 |
procedure FormatText(const TextToFormat: string; FormatTypes: TXMLTextFormats; WholeWordOnly: boolean = false; const SeekFrom: string = ''; const SeekTo: string = ''); |
 |
procedure ReplaceText(const OldText, NewText: string; WholeWordOnly: boolean = false; const SeekFrom: string = ''; const SeekTo: string = ''); |
 |
function NamedTables_LoadContent(const FileName: string; const TableNamePrefix: string = ''): integer; |
 |
procedure NamedTables_DefineContent(const TableNameID: string; const CellXMLContent: string; const PlainText: string); |
 |
procedure NamedTables_ClearContent; |
Properties
Description
Fields
 |
PrinterName: string; |
define name of printer which will be used if Action=aaPrint
|
 |
PrintCopies: byte; |
define number of copies, used if Action=aaPrint
|
 |
RaiseUnknownField: boolean; |
defines whether exception is raised for unknown fields in template
|
 |
NamedTables_Content: array of TTableContentRec; |
defines content of all named tables in DOCX file, set by NamedTables_LoadContent or NamedTables_DefineContent, read and used during report generation by method Execute
|
Methods
 |
procedure Execute(DataSets: array of TDataset); |
execute creating of report
|
 |
procedure FormatText(const TextToFormat: string; FormatTypes: TXMLTextFormats; WholeWordOnly: boolean = false; const SeekFrom: string = ''; const SeekTo: string = ''); |
can be called in OnModifyBeforeSave event, formats selected text bold, italic, underline
|
 |
procedure ReplaceText(const OldText, NewText: string; WholeWordOnly: boolean = false; const SeekFrom: string = ''; const SeekTo: string = ''); |
can be called in OnModifyBeforeSave event, replace selected text, new string can contain tag to start/stop superscript or subscript \ˆ => start superscript; \_ => start subscript; \= => end superscipt or subsript
|
 |
function NamedTables_LoadContent(const FileName: string; const TableNamePrefix: string = ''): integer; |
load all named table content with TableNamePrefix to NamedTables_Content variable
|
 |
procedure NamedTables_DefineContent(const TableNameID: string; const CellXMLContent: string; const PlainText: string); |
add or modify item of NamedTables_Content variable for TableNameID
|
 |
procedure NamedTables_ClearContent; |
clear all items from NamedTables_Content variable
|
Properties
 |
property ExtendedInfo: TStrings read FExtendedInfo; |
content of INFO tag in report template, INFO tag is used for backward comunication from report to application
|
 |
property ReportFile: string read FReportFile write FReportFile; |
Define DOCX or ODT file name with report template
|
 |
property OutputFile: string read FOutputFile write FOutputFile; |
Define output file name
|
 |
property TemplateFormat: TTemplateFormat read FTemplateFormat write FTemplateFormat default tfAutoDetect; |
define format type of template (auto, DOCX, ODT)
|
 |
property DefaultCalcFormat: string read FDefaultCalcFormat write FDefaultCalcFormat; |
Define default format for calculated values
|
 |
property DefaultNumericFormat: string read FDefaultNumericFormat write FDefaultNumericFormat; |
Define default format for numeric fields
|
 |
property DefaultBooleanFormat: string read FDefaultBooleanFormat write FDefaultBooleanFormat; |
Define default format for boolean fields
|
 |
property DefaultDateFormat: string read FDefaultDateFormat write FDefaultDateFormat; |
Define default format for date fields
|
 |
property DefaultTimeFormat: string read FDefaultTimeFormat write FDefaultTimeFormat; |
Define default format for time fields
|
 |
property JoinTouchingTables: boolean read FJoinTouchingTables write FJoinTouchingTables default false; |
Define whether tables without any text between is redefined as one table (influences columns width in ODT)
|
 |
property ConvertScientificFormat: boolean read FConvertScientificFormat write FConvertScientificFormat default false; |
Define whether scientific format is converted to 123 x 10ˆ3 format using superscript, only for DOCX
|
 |
property ConvertInlineFormatting: boolean read FConvertInlineFormatting write FConvertInlineFormatting default false; |
Define whether inline format is converted to XML format accordign InlineFormatting property, only for DOCX
|
 |
property InlineFormatting: TStrings read FInlineFormatting write SetInlineFormatting; |
Define list of tag used as formatting tag in text (StartTag #9 EndTag #9 FormatTag), only for DOCX
|
 |
property Variables: TStrings read FVariables write SetVariables; |
Define list of variables and their values which can be used in report template
|
 |
property FieldNotFoundValue: string read FFieldNotFoundValue write FFieldNotFoundValue; |
Defines default value used for fields which is not found
|
 |
property MemoReplaces: TStrings read FMemoReplaces write SetMemoReplaces; |
Defines list of strings which is replaced it memo field, e.g.: <TAB>=; - replace #9 by ; ;=\line - replace ; by end of line
|
 |
property ActionAfter: TActionAfter read FActionAfter write FActionAfter default aaShow; |
Define executed action after report is created
|
 |
property ShowMaximized: boolean read FShowMaximized write FShowMaximized default false; |
Define whether DOCX file is opened in maximized window (if DOCX editor supports)
|
 |
property OnReadInfo: TNotifyEvent read FOnReadInfo write FOnReadInfo; |
define event which is called for each INFO tag
|
 |
property OnUserCalc: TUserCalc read FOnUserCalc write FOnUserCalc; |
define event which is called for getting value of undefined properties
|
 |
property OnReportProcess: TReportProcessEvent read FOnReportProcess write FOnReportProcess; |
define event which is called for each dataset records to show progress of execution
|
 |
property OnModifyBeforeSave: TModifyContent read FModifyBeforeSave write FModifyBeforeSave; |
define event which is called just before saving of result
|
 |
property OnGetTemplateStr: TModifyContent read FOnGetTemplateStr write FOnGetTemplateStr; |
define event called instead of loading of template file
|
 |
property ShowSaveErrorDialog: boolean read FShowSaveErrorDialog write FShowSaveErrorDialog default false; |
define whether re-save dialog is shown in case of saving error
|
 |
property ShowProgressBar: boolean read FShowProgressBar write FShowProgressBar default false; |
indicate whether progress bar is shown
|
 |
property OnGetRowHeight: TGetRowHeight read FOnGetRowHeight write FOnGetRowHeight; |
define event used by InserTable tag, event is called once for each row
|
 |
property OnGetColumnWidth: TGetColumnWidth read FOnGetColumnWidth write FOnGetColumnWidth; |
define event used by InserTable tag, event is called once for each column
|
 |
property OnGetCellParams: TGetCellParams read FOnGetCellParams write FOnGetCellParams; |
define event used by InserTable tag, event is called for each cell to define content and formats
|
Generated by PasDoc 0.13.0 on 2016-10-19 12:19:01
|