UNITS
CLASSES, INTERFACES, OBJECTS
TYPES
VARIABLES
CONSTANTS
FUNCTIONS, PROCEDURES
IDENTIFIERS

Class TARWordReport

Unit

ARWordReport

Declaration

type TARWordReport = class(TComponent)

Description

ARWordReport - Simple and powerful component for report generation in Microsoft® Word.

Fields

NameDescription
W Word.Application OLE object. All OLE objects becomes available after calling OpenTemplate
WDoc Word.Application.ActiveDocument object which becomes the complete report after processing
xPause Temporary property for this version. Pause msec against "Clopboard error" message. Increase xPause for big reports if you meet this error

Methods

Overview

constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure ChangeFileOpenDir(Dir: string);
procedure CloseWord;
function GetWordMainVer: integer;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure OpenTemplate;
procedure Parse;
procedure PreParse;
procedure Preview;
procedure Print;
procedure SaveDoc(FileName: string);
procedure ShowWord;
procedure xParse;
procedure xPrint(Copies: integer);

Description

constructor Create(AOwner: TComponent); override;

Constructor

destructor Destroy; override;

Destructor

procedure ChangeFileOpenDir(Dir: string);

Sets default folder for Word dialogs 'Open..' and 'Save as..'

procedure CloseWord;

Close Word document (if it is not visible)

function GetWordMainVer: integer;

Getting Word main version number

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

 

procedure OpenTemplate;

Open .doc or .txt file as template

procedure Parse;

Open template + call xParse

procedure PreParse;

Auto-detect needed parameters (not used)

procedure Preview;

Open template+ Parse + Show Report in Word

procedure Print;

Print document (1 copy). You must open Template before calling Print (by calling Parse or by calling OpenTemplate+xParse etc.)

procedure SaveDoc(FileName: string);

Save document

procedure ShowWord;

Make Word document visible (else it`s invisible)

procedure xParse;

Process opened template

procedure xPrint(Copies: integer);

Print document. You must open Template before calling xPrint (by calling Parse or by calling OpenTemplate+xParse etc.)

Properties

Overview

Aggregation:
AutoTables:
CustTagValues:
DataSetList:
Filename:
Marks:
OnGetSQLValue:
OnGetTXTValue:
OnNeedSQL:
OnTag:
SavePrompt:
Steps:
TableCaptionsBold:
TextTables:
Version:
Word_Visible:

Description

Aggregation:

Perform aggregated values calculation

AutoTables:

if AutoTables=True then <#table:datasetname> tags (not in MS Word tables) will be replaced with automatic-generated tables

CustTagValues:

List of values you can use in template (Name=Value pairs)

DataSetList:

List of named datasets, which prepared in your application and may be used in report

Filename:

Report template (.doc, .txt)

Marks:

prefix and postfix for markup tags in report template

OnGetSQLValue:

Here you are able to assign string for DataField value, which will be then pasted to DataPool area

OnGetTXTValue:

Here you are able to assign string for DataField value, which will be then pasted to report area

OnNeedSQL:

In this event you need to assign Dataset to the event parameter depending on passed text from Template`s DataPool

OnTag:

Custom replacing for tags not processed during automatic report generation

SavePrompt:

Set this property to True if you want Word prompts user to save changes in report (Default value is False)

Steps:

Set of steps executable during template processing. Set off unused ones to optimize processing speed

TableCaptionsBold:

Draw bold captions for auto-tables (see AutoTable property)

TextTables:

if TextTables=True then table templates with <#txttable:datasetname> tags will be processed. See ARWordMarkup description.

Version:

ARWord version information

Word_Visible:

Word document is visible (read only)

Author

Anton Ryazanov <vsoft@vector-ski.ru>


Generated by pasdoc 0.6.20 on Tue 24 Sep 2002 01:13:32