Class TTXTExport

Unit

Declaration

type TTXTExport = class(TComponent)

Description

non visual component which provides functionality for exporting of database data to StringList or TXT file

Hierarchy

  • TComponent
  • TTXTExport

Overview

Methods

Public function Execute(DBGrid: TCustomDBGrid): boolean; overload;
Public function Execute(Dataset: TDataSet): boolean; overload;
Public function Execute(rDBRecView: TrDBRecView): boolean; overload;
Public function Execute(TreeView: TCustomTreeView): boolean; overload;
Public function Execute(rStringGridEd: TrStringGridEd): boolean; overload;
Public procedure ExportLine(const Text: string);

Properties

Public property ExportResult: TStrings read FExportResult;
Public property ExportStructureOnly: boolean read FExportStructureOnly write FExportStructureOnly;
Public property ExportAllAsText: boolean read FExportAllAsText write FExportAllAsText;
Published property ExportFile: string read FExportFile write FExportFile;
Published property TextApostrophe: string read FTextApostrophe write FTextApostrophe;
Published property FieldSeparator: string read FFieldSeparator write FFieldSeparator;
Published property FillChar: Char read FFillChar write FFillChar default ' ';
Published property TrimData: boolean read FTrimData write FTrimData default false;
Published property ExportFieldName: boolean read FExportFieldName write FExportFieldName default true;
Published property RealFieldNamesAsTitle: boolean read FRealFieldNamesAsTitle write FRealFieldNamesAsTitle default false;
Published property ExportOnlyVisibleFields: boolean read FExportOnlyVisibleFields write FExportOnlyVisibleFields default true;
Published property ExportOnlySelectedRows: boolean read FExportOnlySelectedRows write FExportOnlySelectedRows default false;
Published property AppendToFile: boolean read FAppendToFile write FAppendToFile default false;
Published property ActionAfter: TActionAfter read FActionAfter write FActionAfter default aaShow;
Published property OnBeforeExport: TNotifyEvent read FOnBeforeExport write FOnBeforeExport;
Published property OnAfterExport: TNotifyEvent read FOnAfterExport write FOnAfterExport;
Published property UseDisableControl: boolean read FUseDisableControl write FUseDisableControl default true;
Published property ShowProgressBar: boolean read FShowProgressBar write FShowProgressBar default false;
Published property OnProgressEvent: TProgressEvent read FOnProgressEvent write FOnProgressEvent;

Description

Methods

Public function Execute(DBGrid: TCustomDBGrid): boolean; overload;

execute creating export for DBGrid (columns collection is used)

Public function Execute(Dataset: TDataSet): boolean; overload;

execute creating export for Dataset (fields collection is used)

Public function Execute(rDBRecView: TrDBRecView): boolean; overload;

execute creating export for one record from rDBRecView (rows/fields collection is used)

Public function Execute(TreeView: TCustomTreeView): boolean; overload;

execute creating export for TreeView (Items collection is used)

Public function Execute(rStringGridEd: TrStringGridEd): boolean; overload;

execute creating export for rStringGrid (columns and rows collection is used)

Public procedure ExportLine(const Text: string);

Export one line of text, used only for user defined export

Properties

Public property ExportResult: TStrings read FExportResult;

lines with result of exporting

Public property ExportStructureOnly: boolean read FExportStructureOnly write FExportStructureOnly;

define that only structure (name of fields) will be exported

Public property ExportAllAsText: boolean read FExportAllAsText write FExportAllAsText;

define that all fields are exported as text field (with apostrophe)

Published property ExportFile: string read FExportFile write FExportFile;

Defines output file name, if empty file is not saved and use ExportResult

Published property TextApostrophe: string read FTextApostrophe write FTextApostrophe;

Defines string which is used as apostrophe for string field

Published property FieldSeparator: string read FFieldSeparator write FFieldSeparator;

Defines string which is used as separator

Published property FillChar: Char read FFillChar write FFillChar default ' ';

Defines char which is used for extension of string to needed length

Published property TrimData: boolean read FTrimData write FTrimData default false;

Defines whether exported data is trimmed (spaces and EOL is removed from beginning and end)

Published property ExportFieldName: boolean read FExportFieldName write FExportFieldName default true;

Defines whether firts exported line contains name of Fields

Published property RealFieldNamesAsTitle: boolean read FRealFieldNamesAsTitle write FRealFieldNamesAsTitle default false;

Defines whether firts exported line contains real names of Fields instead of Captions

Published property ExportOnlyVisibleFields: boolean read FExportOnlyVisibleFields write FExportOnlyVisibleFields default true;

Defines whether visible columns/fields or all columns/fields is exported

Published property ExportOnlySelectedRows: boolean read FExportOnlySelectedRows write FExportOnlySelectedRows default false;

Defines whether selected rows from DBGrid is exported

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 ActionAfter: TActionAfter read FActionAfter write FActionAfter default aaShow;

Defines action after exporting (None, Show, Print)

Published property OnBeforeExport: TNotifyEvent read FOnBeforeExport write FOnBeforeExport;

Defines event for user defined action

Published property OnAfterExport: TNotifyEvent read FOnAfterExport write FOnAfterExport;

Defines event for user defined action

Published property UseDisableControl: boolean read FUseDisableControl write FUseDisableControl default true;

indicate whether DisableControls is used during dataset scan

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

indicate whether progress bar is shown

Published property OnProgressEvent: TProgressEvent read FOnProgressEvent write FOnProgressEvent;

Defines event used periodically during exporting of data


Generated by PasDoc 0.15.0.