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

GraphData Methods

GraphData Add method, Page 308

GraphData Clear method, Page 308

GraphData CopyFrom method, Page 309

GraphData Count method, Page 310

GraphData Create method, Page 310

GraphData Delete method, Page 310

GraphData Destroy method, Page 311

GraphData Retrieve method, Page 311

GraphData SectionType method, Page 312

GraphData Send method, Page 313

GraphOptions

Declaration

property GraphOptions: TCrpeGraphOptions;

Type

TCrpeGraphOptions = class(TPersistent)

Description

The GraphOptions object contains all the properties and methods that relate to changing the features of the appearance of Graphs.

The Number property specifies the Graph Number, and can be used as a lookup value to point the GraphOptions object to a specific GraphOptions 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.

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

The Count property will indicate how many GraphOptions items are currently in the GraphOptions object.

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

VCL Reference

32

The Max property specifies the maximum value that will appear in the Graph. Any Graph values above this value are not charted.

The Min property specifies the minimum value that will appear in the Graph. Any Graph values below this value are not charted.

The DataValues property specifies whether or not to display the numeric value associated with each riser on the chart. If set to cTrue, a value appears in the Graph for each riser.

The GridLines property specifies whether or not to display Grid Lines on the Graph.

The BarDirection property specifies which way to display the bars in a Bar Graph: vertically or horizontally.

The Legend property specifies whether or not to display the Graph Legend.

The Font property specifies the Font for all text and values in the entire Graph.

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).

GraphOptions Example

This code sample shows how to retrieve the GraphOptions from a Report, then change various properties for the first Graph:

Crpe1.ReportName := 'C:\Company.rpt'; with Crpe1.GraphOptions do

begin

Retrieve;

Item[0];

GridLines := cTrue;

Font := 'Times New Roman'; DataValues := cFalse; BarDirection := bdVertical; Legend := cTrue;

end; Crpe1.Execute;

GraphOptions Properties

GraphOptions BarDirection property, Page 314

GraphOptions DataValues property, Page 314

GraphOptions Font property, Page 315

GraphOptions GridLines property, Page 315

GraphOptions Item property, Page 316

GraphOptions ItemIndex property, Page 317

GraphOptions Legend property, Page 317

VCL Reference

33

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