Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
163
Добавлен:
11.05.2015
Размер:
4.73 Mб
Скачать

Methods

These are the Methods that belong specifically to the TCrpe class. Each Sub-class also has its own Methods which can be viewed by going to the section for that particular Sub-class.

BooleanToStr method, Page 132

CancelJob method, Page 133

Clear method, Page 133

Create method, Page 135

CloseEngine method, Page 136

CloseJob method, Page 137

CloseWindow method, Page 137

CopyFrom method, Page 138

DateTimeToStr method, Page 138

DateToStr method, Page 139

Destroy method, Page 139

ExportWindow method, Page 140

ExDateStr method, Page 140

ExDateTimeStr method, Page 141

Execute method, Page 142

ExTimeStr method, Page 144

FloatingToStr method, Page 144

Focused method, Page 145

GetPathFromAlias method, Page 145

GetToken method, Page 146

GetVersionInfo method, Page 147

HideWindow method, Page 147

IsStrEmpty method, Page 148

LogOnPrivateInfo method, Page 148

OpenEngine method, Page 151

OpenJob method, Page 151

PrintWindow method, Page 152

ReportWindowHandle method, Page 153

VCL Reference

131

RetrieveDetailCopies method, Page 153

RetrieveFieldMapping method, Page 154

RetrieveReportTitle method, Page 154

RetrieveWindowState method, Page 154

SectionCodeToStr method, Page 155

SendDetailCopies method, Page 156

SendDialogParent method, Page 156

SendDiscardSavedData method, Page 157

SendFieldMapping method, Page 157

SendOutput method, Page 158

SendProgressDialog method, Page 158

SendReportTitle method, Page 159

SetFocus method, Page 159

ShowWindow method, Page 160

StrToBoolean method, Page 160

StrToDate method, Page 161

StrToDateTime method, Page 161

StrToFloating method, Page 162

StrToSectionCode method, Page 162

StrToTCrBoolean method, Page 163

StrToTime method, Page 163

TCrBooleanToStr method, Page 164

TimeToStr method, Page 164

TruncStr method, Page 165

VerifyDatabase method, Page 165

BooleanToStr method

Declaration

function BooleanToStr(const bValue: boolean; ResultAsNum: boolean): string;

VCL Reference

132

Description

BooleanToStr is used internally in the Crystal component, but has been exposed for general purpose use. It takes a Boolean value and returns either a string ('True' or 'False') or a numeric string equivalent of the Boolean value ('1' or '0'), if the ResultAsNum parameter is True.

str1 := Crpe1.BooleanToStr(True, False); {str1 is now 'True'}

str1 := Crpe1.BooleanToStr(True, True); {str1 is now '1'}

CancelJob method

Declaration

procedure CancelJob;

Description

CancelJob can be used to stop the processing of a Report. It can be called after the Execute method has been called. Normally the CancelJob method would be associated with a button click, or some other user event, therefore it is particularly useful when building a custom button bar to replace the standard Crystal Preview Window button bar.

Example

The following code cancels the running of the Report right after Execute. Normally the CancelJob call would be associated with a button click, or some other user event:

Crpe1.ReportName := 'C:\Report1.rpt';

Crpe1.Execute;

Crpe1.CancelJob;

Clear method

Declaration

procedure Clear;

VCL Reference

133

Description

The Clear method for the Crystal component invokes the following Sub-class Clear methods for the main Report as well as any subreports:

AreaFormat.Clear;

AreaFormatFormulas.Clear;

Connect.Clear;

Formulas.Clear;

GraphData.Clear

GraphOptions.Clear;

GraphText.Clear;

GraphType.Clear;

GroupCondition.Clear;

GroupOptions.Clear;

GroupSelection.Clear;

GroupSortFields.Clear;

LogOnInfo.Clear;

Margins.Clear;

ParamFields.Clear;

PrintDate.Clear;

SectionFont.Clear;

SectionFormat.Clear;

SectionFormatFormulas.Clear;

SectionHeight.Clear;

Selection.Clear;

SessionInfo.Clear;

SortFields.Clear;

SQL.Clear;

SQL.Params.Clear;

SQL.Expressions.Clear;

Tables.Clear;

DetailCopies := TCRPE_DEFAULT_DETAILCOPIES;

FieldMapping := fmAuto;

ReportTitle := '';

It then clears the following component Sub-class objects:

Export.Clear;

LogOnServer.Clear;

Printer.Clear;

PrintOptions.Clear;

ReportOptions.Clear;

Subreports.Clear;

SummaryInfo.Clear;

WindowButtonBar.Clear;

WindowCursor.Clear;

WindowSize.Clear;

WindowStyle.Clear;

WindowZoom.Clear;

VCL Reference

134

Соседние файлы в папке crystal