Class TSLKExport

Unit

Declaration

type TSLKExport = class(TComponent)

Description

non visual component which provides functionality for exporting of database data to SLK file

Hierarchy

  • TComponent
  • TSLKExport

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 ExportText(const Text: string; X, Y: integer);
Public procedure ExportNum(Num: extended; X, Y: integer);
Public procedure SetCellFormat(CellFormat: slkCellFormat; X, Y: integer);
Public procedure ExportLine(const Text: string);

Properties

Public property ExportResult: TStrings read FExportResult;
Public property ExportStructureOnly: boolean read FExportStructureOnly write FExportStructureOnly;
Published property SLKIdHeaderLine: string read FSLKIdHeaderLine write FSLKIdHeaderLine;
Published property StartRow: integer read FStartRow write SetStartRow default 1;
Published property StartCol: integer read FStartCol write SetStartCol default 1;
Published property ExportFile: string read FExportFile write FExportFile;
Published property SetFontName: string read FSetFontName write FSetFontName;
Published property DefaultDateFormat: string read FDefaultDateFormat write FDefaultDateFormat;
Published property DefaultTimeFormat: string read FDefaultTimeFormat write FDefaultTimeFormat;
Published property DefaultNumFormat: string read FDefaultNumFormat write FDefaultNumFormat;
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 SetColWidth: boolean read FSetColWidth write FSetColWidth default true;
Published property MakeSumRow: boolean read FMakeSumRow write FMakeSumRow default false;
Published property ActionAfter: TActionAfter read FActionAfter write FActionAfter default aaShow;
Published property OnBeforeExport: TOnExport read FOnBeforeExport write FOnBeforeExport;
Published property OnAfterExport: TOnExport 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 ExportText(const Text: string; X, Y: integer);

Exports text to defined cell, used only for user defined export

Public procedure ExportNum(Num: extended; X, Y: integer);

Exports numeric to defined cell, used only for user defined export

Public procedure SetCellFormat(CellFormat: slkCellFormat; X, Y: integer);

Sets format of defined cell, used only for user defined export

Public procedure ExportLine(const Text: string);

Export one already formatted line in SLK format, 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

Published property SLKIdHeaderLine: string read FSLKIdHeaderLine write FSLKIdHeaderLine;

Defines content of first slk line ID;PWXL;N;E or ID;PCALCOOO32 or similar

Published property StartRow: integer read FStartRow write SetStartRow default 1;

Defines first row for export

Published property StartCol: integer read FStartCol write SetStartCol default 1;

Defines first collumn for export

Published property ExportFile: string read FExportFile write FExportFile;

Defines output file name

Published property SetFontName: string read FSetFontName write FSetFontName;

Defines FontName which will be set in output file

Published property DefaultDateFormat: string read FDefaultDateFormat write FDefaultDateFormat;

Defines default format for date fields

Published property DefaultTimeFormat: string read FDefaultTimeFormat write FDefaultTimeFormat;

Defines default format for time fields

Published property DefaultNumFormat: string read FDefaultNumFormat write FDefaultNumFormat;

Defines default format for numeric fields

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 SetColWidth: boolean read FSetColWidth write FSetColWidth default true;

Defines whether output file contains definition of collumn width

Published property MakeSumRow: boolean read FMakeSumRow write FMakeSumRow default false;

Defines whether last exported row contains sum

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

Defines action after exporting (None, Show, Print)

Published property OnBeforeExport: TOnExport read FOnBeforeExport write FOnBeforeExport;

Defines event for user defined action

Published property OnAfterExport: TOnExport 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.