Class TRTFReport2

Unit

Declaration

type TRTFReport2 = class(TComponent)

Description

non visual component which provides functionality for generating reports according prepared RTF template with special TAGs

Hierarchy

  • TComponent
  • TRTFReport2

Overview

Fields

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

Methods

Public procedure Execute(DataSets: array of TDataSet);
Public procedure FormatText(const TextToFormat: string; FormatTypes: TRTFTextFormats; 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 = '');
Public function GetFieldTagValue(FieldTag: string): string;

Properties

Public property ExtractEOLAfterIf: boolean read FExtractEOLAfterIf write FExtractEOLAfterIf;
Public property ExtendedInfo: TStrings read FExtendedInfo;
Published property ReportFile: string read FReportFile write FReportFile;
Published property OutputFile: string read FOutputFile write FOutputFile;
Published property DefaultCharset: integer read FDefaultCharset write FDefaultCharset default 0;
Published property DefaultMemoFormat: TMemoFormat read FDefaultMemoFormat write FDefaultMemoFormat default mfAutoDetect;
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 ConvertScientificFormat: boolean read FConvertScientificFormat write FConvertScientificFormat default false;
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: TUserCalc read FOnUserCalc write FOnUserCalc;
Published property OnUserCalcParams: TUserCalcParams read FOnUserCalcParams write FOnUserCalcParams;
Published property OnGetPictureContent: TOnGetPictureContent read FOnGetPictureContent write FOnGetPictureContent;
Published property OnReportProcess: TReportProcessEvent read FOnReportProcess write FOnReportProcess;
Published property TemplateFormat: TTemplateFormat read FTemplateFormat write FTemplateFormat default tfAutoDetect;
Published property TxtCodePage: integer read FTxtCodePage write FTxtCodePage default 0;
Published property AppendToFile: boolean read FAppendToFile write FAppendToFile default false;
Published property OnModifyBeforeSave: TModifyContent read FModifyBeforeSave write FModifyBeforeSave;
Published property OnGetTemplateStr: TOnGetTemplateStr 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 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: TRTFTextFormats; 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

Public function GetFieldTagValue(FieldTag: string): string;

return value for specific FieldTag

Properties

Public property ExtractEOLAfterIf: boolean read FExtractEOLAfterIf write FExtractEOLAfterIf;

Define whether EOL after IF, IIF, ELSEIF, ELSEIIF is removed

Public property ExtendedInfo: TStrings read FExtendedInfo;

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

Published property ReportFile: string read FReportFile write FReportFile;

Define RTF file name with report template

Published property OutputFile: string read FOutputFile write FOutputFile;

Define output file name

Published property DefaultCharset: integer read FDefaultCharset write FDefaultCharset default 0;

Define charset number, which will be used in report

Published property DefaultMemoFormat: TMemoFormat read FDefaultMemoFormat write FDefaultMemoFormat default mfAutoDetect;

Define default format for BLOB fields

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 ConvertScientificFormat: boolean read FConvertScientificFormat write FConvertScientificFormat default false;

Define whether scientific format is converted to 123 x 10ˆ3 format using superscript

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 rtf file is opened in maximized window (if rtf editor supports)

Published property OnReadInfo: TNotifyEvent read FOnReadInfo write FOnReadInfo;

define event which is called for each INFO tag

Published property OnUserCalc: TUserCalc read FOnUserCalc write FOnUserCalc;

define event which is called for getting value of undefined properties

Published property OnUserCalcParams: TUserCalcParams read FOnUserCalcParams write FOnUserCalcParams;

define event which is called for getting value of undefined tags, supports also parameters

Published property OnGetPictureContent: TOnGetPictureContent read FOnGetPictureContent write FOnGetPictureContent;

define event which is called to get bitmap content for Picture tag

Published property OnReportProcess: TReportProcessEvent read FOnReportProcess write FOnReportProcess;

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

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

define format type of template (auto, TXT, RTF)

Published property TxtCodePage: integer read FTxtCodePage write FTxtCodePage default 0;

define used codepage for inserted data in case of TXT temlate format

Published property AppendToFile: boolean read FAppendToFile write FAppendToFile default false;

define whether output is appended to existing file (used only for TXT format)

Published property OnModifyBeforeSave: TModifyContent read FModifyBeforeSave write FModifyBeforeSave;

define event which is called just before saving of result

Published property OnGetTemplateStr: TOnGetTemplateStr 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.15.0.