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

Example

This code sample retrieves the SummaryInfo from a Report and displays the AppName value:

Crpe1.ReportName := 'Company.rpt';

Crpe1.SummaryInfo.Retrieve;

ShowMessage(Crpe1.SummaryInfo.AppName);

SummaryInfo Author property

Declaration

property Author: TCrSummaryString;

Type

TCrSummaryString = string[128];

Description

The Author property specifies the author of the current Report.

Example

This code sample retrieves the SummaryInfo from a Report and displays the Author value:

Crpe1.ReportName := 'Company.rpt';

Crpe1.SummaryInfo.Retrieve;

ShowMessage(Crpe1.SummaryInfo.Author);

SummaryInfo Comments property

Declaration

property Comments: TCrpeString;

Type

TCrpeString = class(TStringList)

Description

The Comments property specifies any comments for the current Report. The Comment strings should not be longer than 512 characters, or an error will be generated (this is a Print Engine limitation at the moment).

VCL Reference

662

Example

This code sample retrieves the SummaryInfo from a Report and displays the Comments value in a Memo:

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

Crpe1.SummaryInfo.Retrieve;

Memo1.Lines.Assign(Crpe1.SummaryInfo.Comments);

SummaryInfo Keywords property

Declaration

property Keywords: TCrSummaryString;

Type

TCrSummaryString = string[128];

Description

The Keywords property specifies the keywords included for the current report.

Example

This code sample retrieves the SummaryInfo from a Report and displays the Keywords value:

Crpe1.ReportName := 'Company.rpt';

Crpe1.SummaryInfo.Retrieve;

ShowMessage(Crpe1.SummaryInfo.Keywords);

SummaryInfo Subject property

Declaration

property Subject: TCrSummaryString;

Type

TCrSummaryString = string[128];

Description

The Subject property specifies the subject of the current report.

VCL Reference

663

Example

This code sample retrieves the SummaryInfo from a Report and displays the Subject value:

Crpe1.ReportName := 'Company.rpt';

Crpe1.SummaryInfo.Retrieve;

ShowMessage(Crpe1.SummaryInfo.Subject);

SummaryInfo Template property

Declaration

property Template: TCrSummaryString;

Type

TCrSummaryString = string[128];

Description

The Template property specifies the ReportTemplate for the current report.

Example

This code sample retrieves the SummaryInfo from a Report and displays the Template value:

Crpe1.ReportName := 'Company.rpt';

Crpe1.SummaryInfo.Retrieve;

ShowMessage(Crpe1.SummaryInfo.Template);

SummaryInfo Title property

Declaration

property Title: TCrSummaryString;

Type

TCrSummaryString = string[128];

Description

The Title property specifies the Report Title of the current Report, and holds the same information as the ReportTitle property, or the Report Title field in Crystal Reports Designer.

VCL Reference

664

Example

This code sample retrieves the SummaryInfo from a Report and displays the Title value:

Crpe1.ReportName := 'Company.rpt';

Crpe1.SummaryInfo.Retrieve;

ShowMessage(Crpe1.SummaryInfo.Title);

SummaryInfo Methods

SummaryInfo Clear method

Declaration

procedure Clear;

Description

This method can be used to set the SummaryInfo properties to their default values:

AppName := '';

Title := '';

Subject := '';

Author := '';

Keywords := '';

Comments.Clear;

Template := '';

It is called automatically if the Clear method is called for the main component, but may be called in code as needed.

Example

This line of code clears the SummaryInfo properties:

Crpe1.SummaryInfo.Clear;

SummaryInfo CopyFrom method

Declaration

function CopyFrom(Source: TCrpeSummaryInfo): boolean;

VCL Reference

665

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