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

GraphOptions Max property, Page 318

GraphOptions Min property, Page 318

GraphOptions Number property, Page 319

GraphOptions Section property, Page 320

GraphOptions SectionAsCode property, Page 321

GraphOptions Methods

GraphOptions Add method, Page 321

GraphOptions Clear method, Page 322

GraphOptions CopyFrom method, Page 323

GraphOptions Count method, Page 324

GraphOptions Create method, Page 324

GraphOptions Delete method, Page 324

GraphOptions Destroy method, Page 325

GraphOptions Retrieve method, Page 325

GraphOptions SectionType method, Page 326

GraphOptions Send method, Page 327

GraphText

Declaration

property GraphText: TCrpeGraphText;

Type

TCrpeGraphText = class(TPersistent)

Description

The GraphText object contains the properties and methods required to change the text on a Graph.

The Number property specifies the Graph Number, and can be used as a lookup value to point the GraphType object to a specific GraphType item. See How Graphs are Numbered, Page 37, for more information on the numbering scheme.

The Section property specifies the section that the Graph is located in, and uses the "short" section naming convention used in the Crystal Reports Designer. See About Section Names, Volume 1, Chapter 7, for more information.

VCL Reference

34

The Retrieve method can be used to fill the GraphText object with information from the Report.

The Count method will indicate how many GraphText items are currently in the GraphText object.

The Item and ItemIndex properties can be used to navigate through the GraphText items in the GraphText object.

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

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

The FootNote property specifies the footnote text that will appear under the Graph.

The GroupsTitle property specifies the title of the Groups which are being graphed.

The SeriesTitle property specifies the title of the Series which is being graphed.

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

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

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

The SectionAsCode property offers the ability to treat the Section name as a Section Code Number, which can be useful for doing mathematical expressions to filter out certain sections.

The SectionType method returns just the first characters of the Section name, so for GH1 (Group Header 1), the SectionType would be GH (Group Header).

GraphText Example

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

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

if Crpe1.GraphText.Count > 0 then begin

Crpe1.GraphText[0].Title := 'New Title'; Crpe1.GraphText[0].SubTitle := 'New Sub Title'; Crpe1.GraphText[0].SeriesTitle := 'New Series Title'; Crpe1.GraphText[0].FootNote := 'New FootNote'; Crpe1.GraphText[0].GroupsTitle := 'New Groups Title'; Crpe1.GraphText[0].SeriesTitle := 'New Series Title'; Crpe1.GraphText[0].XAxisTitle := 'New XAxis Title'; Crpe1.GraphText[0].YAxisTitle := 'New YAxis Title'; Crpe1.GraphText[0].ZAxisTitle := 'New ZAxis Title';

end;

Crpe1.Output := toWindow; Crpe1.Execute;

VCL Reference

35

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