Class TrXMLReport

DescriptionHierarchyFieldsMethodsProperties

Unit

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

  • TComponent
  • TrXMLReport

Overview

Fields

Public ExtendedInfo: TStrings;
Public PrinterName: string;
Public PrintCopies: byte;
Public RaiseUnknownField: boolean;

Methods

Public procedure Execute(DataSets: array of TDataSet);
Public procedure FormatText(const TextToFormat: string; FormatTypes: TXMLTextFormats; WholeWordOnly: boolean = false; const SeekFrom: string = ''; const SeekTo: string = '');
Public procedure ReplaceText(const OldText, NewText: string; WholeWordOnly: boolean = false; const SeekFrom: string = ''; const SeekTo: string = '');

Properties

Published property ReportFile: string read FReportFile write FReportFile;
Published property OutputFile: string read FOutputFile write FOutputFile;
Published property TemplateFormat: TTemplateFormat read FTemplateFormat write FTemplateFormat default tfAutoDetect;
Published property DefaultCalcFormat: string read FDefaultCalcFormat write FDefaultCalcFormat;
Published property DefaultNumericFormat: string read FDefaultNumericFormat write FDefaultNumericFormat;
Published property DefaultBooleanFormat: string read FDefaultBooleanFormat write FDefaultBooleanFormat;
Published property DefaultDateFormat: string read FDefaultDateFormat write FDefaultDateFormat;
Published property DefaultTimeFormat: string read FDefaultTimeFormat write FDefaultTimeFormat;
Published property JoinTouchingTables: boolean read FJoinTouchingTables write FJoinTouchingTables default false;
Published property ConvertScientificFormat: boolean read FConvertScientificFormat write FConvertScientificFormat default false;
Published property ConvertInlineFormatting: boolean read FConvertInlineFormatting write FConvertInlineFormatting default false;
Published property InlineFormatting: TStrings read FInlineFormatting write SetInlineFormatting;
Published property Variables: TStrings read FVariables write SetVariables;
Published property FieldNotFoundValue: string read FFieldNotFoundValue write FFieldNotFoundValue;
Published property MemoReplaces: TStrings read FMemoReplaces write SetMemoReplaces;
Published property ActionAfter: TActionAfter read FActionAfter write FActionAfter default aaShow;
Published property ShowMaximized: boolean read FShowMaximized write FShowMaximized default false;
Published property OnReadInfo: TNotifyEvent read FOnReadInfo write FOnReadInfo;
Published property OnUserCalc: TOnUserCalc read FOnUserCalc write FOnUserCalc;
Published property OnReportProcess: TReportProcessEvent read FOnReportProcess write FOnReportProcess;
Published property OnModifyBeforeSave: TModifyContent read FModifyBeforeSave write FModifyBeforeSave;
Published property OnGetTemplateStr: TModifyContent read FOnGetTemplateStr write FOnGetTemplateStr;
Published property ShowSaveErrorDialog: boolean read FShowSaveErrorDialog write FShowSaveErrorDialog default false;
Published property ShowProgressBar: boolean read FShowProgressBar write FShowProgressBar default false;

Description

Fields

Public ExtendedInfo: TStrings;

content of INFO tag in report template, INFO tag is used for backward comunication from report to application

Public PrinterName: string;

define name of printer which will be used if Action=aaPrint

Public PrintCopies: byte;

define number of copies, used if Action=aaPrint

Public RaiseUnknownField: boolean;

defines whether exception is raised for unknown fields in template

Methods

Public procedure Execute(DataSets: array of TDataSet);

execute creating of report

Public 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

Public 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

Properties

Published property ReportFile: string read FReportFile write FReportFile;

Define DOCX or ODT file name with report template

Published property OutputFile: string read FOutputFile write FOutputFile;

Define output file name

Published property TemplateFormat: TTemplateFormat read FTemplateFormat write FTemplateFormat default tfAutoDetect;

define format type of template (auto, DOCX, ODT)

Published property DefaultCalcFormat: string read FDefaultCalcFormat write FDefaultCalcFormat;

Define default format for calculated values

Published property DefaultNumericFormat: string read FDefaultNumericFormat write FDefaultNumericFormat;

Define default format for numeric fields

Published property DefaultBooleanFormat: string read FDefaultBooleanFormat write FDefaultBooleanFormat;

Define default format for boolean fields

Published property DefaultDateFormat: string read FDefaultDateFormat write FDefaultDateFormat;

Define default format for date fields

Published property DefaultTimeFormat: string read FDefaultTimeFormat write FDefaultTimeFormat;

Define default format for time fields

Published 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)

Published 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

Published property ConvertInlineFormatting: boolean read FConvertInlineFormatting write FConvertInlineFormatting default false;

Define whether inline format is converted to XML format accordign InlineFormatting property, only for DOCX

Published 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

Published property Variables: TStrings read FVariables write SetVariables;

Define list of variables and their values which can be used in report template

Published property FieldNotFoundValue: string read FFieldNotFoundValue write FFieldNotFoundValue;

Defines default value used for fields which is not found

Published 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

Published property ActionAfter: TActionAfter read FActionAfter write FActionAfter default aaShow;

Define executed action after report is created

Published property ShowMaximized: boolean read FShowMaximized write FShowMaximized default false;

Define whether DOCX file is opened in maximized window (if DOCX editor supports)

Published property OnReadInfo: TNotifyEvent read FOnReadInfo write FOnReadInfo;

define event which is called for each INFO tag

Published property OnUserCalc: TOnUserCalc read FOnUserCalc write FOnUserCalc;

define event which is called for getting value of undefined properties

Published property OnReportProcess: TReportProcessEvent read FOnReportProcess write FOnReportProcess;

define event which is called for each dataset records to show progress of execution

Published property OnModifyBeforeSave: TModifyContent read FModifyBeforeSave write FModifyBeforeSave;

define event which is called just before saving of result

Published property OnGetTemplateStr: TModifyContent read FOnGetTemplateStr write FOnGetTemplateStr;

define event called instead of loading of template file

Published property ShowSaveErrorDialog: boolean read FShowSaveErrorDialog write FShowSaveErrorDialog default false;

define whether re-save dialog is shown in case of saving error

Published property ShowProgressBar: boolean read FShowProgressBar write FShowProgressBar default false;

indicate whether progress bar is shown


Generated by PasDoc 0.13.0 on 2016-02-19 08:14:11