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

GraphText SubTitle property

Declaration

property SubTitle: TCrGraphTextType;

Type

TCrGraphTextType = string[128];

Description

The SubTitle property specifies the sub title text that will appear directly under the main Title.

Example

The following example retrieves the GraphText information from the Report, then changes the SubTitle for the first Graph:

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

if Crpe1.GraphText.Count > 0 then Crpe1.GraphText[0].SubTitle := 'New Sub Title';

Crpe1.Output := toWindow; Crpe1.Execute;

GraphText Title property

Declaration

property Title: TCrGraphTextType;

Type

TCrGraphTextType = string[128];

Description

The Title property specifies the main title text that will appear above the Graph.

VCL Reference

334

Example

The following example retrieves the GraphText information from the Report, then changes the Title for the first Graph:

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

if Crpe1.GraphText.Count > 0 then Crpe1.GraphText[0].Title := 'New Title';

Crpe1.Output := toWindow; Crpe1.Execute;

GraphText XAxisTitle property

Declaration

property XAxisTitle: TCrGraphTextType;

Type

TCrGraphTextType = string[128];

Description

The XAxisTitle property specifies the title text that will appear for the X axis. Not valid for Pie graphs.

Example

The following example retrieves the GraphText information from the Report, then changes the XAxisTitle for the first Graph:

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

if Crpe1.GraphText.Count > 0 then Crpe1.GraphText[0].XAxisTitle := 'New XAxis Title';

Crpe1.Output := toWindow; Crpe1.Execute;}

GraphText YAxisTitle property

Declaration

property YAxisTitle: TCrGraphTextType;

VCL Reference

335

Type

TCrGraphTextType = string[128];

Description

The YAxisTitle property specifies the title text that will appear for the Y axis. Not valid for Pie graphs.

Example

The following example retrieves the GraphText information from the Report, then changes the YAxisTitle for the first Graph:

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

if Crpe1.GraphText.Count > 0 then Crpe1.GraphText[0].YAxisTitle := 'New YAxis Title';

Crpe1.Output := toWindow; Crpe1.Execute;

GraphText ZAxisTitle property

Declaration

property ZAxisTitle: TCrGraphTextType;

Type

TCrGraphTextType = string[128];

Description

The ZAxisTitle property specifies the title text that will appear for the Z axis. This value is only valid for 3D graphs.

Example

The following example retrieves the GraphText information from the Report, then changes the ZAxisTitle for the first Graph:

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

if Crpe1.GraphText.Count > 0 then Crpe1.GraphText[0].ZAxisTitle := 'New ZAxis Title';

Crpe1.Output := toWindow; Crpe1.Execute;

VCL Reference

336

GraphText Methods

GraphText Add method

Declaration

procedure Add(GraphNumber: TCrGraphTextNumber);

Type

TCrGraphTextNumber = integer;

Description

The Add method adds an item to the GraphText object and sets the internal index to that item. It requires a Graph number as a parameter, which should be a number corresponding to a Graph in the Report. Graphs are numbered starting from zero, from the top of the Report down, and left to right in each Section. If the Add method is used, the steps to using GraphText are:

1Add an item to the GraphText object (you must specify the Graph number).

2Fill the item's properties (Title, SubTitle, etc.) with values.

3When Execute is called, the properties will be sent to the Print Engine.

NOTE: It is easier to use the Retrieve method instead of Add, since it ensures that the number of items, and the Graph numbers are correct for the current Report.

Example

The Add method can be used to manually add an item to the GraphText object, instead of using Retrieve:

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

{Specify Graph number - must be same as in Report} Crpe1.GraphText.Add(0);

{Section must also be specified when using Add} Crpe1.GraphText.Section := 'PH'; Crpe1.GraphText.Title := 'Company Graph'; Crpe1.Output := toWindow;

Crpe1.Execute;

VCL Reference

337

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