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

GraphOptions

GraphOptions specifies several of the options for the specified chart.

Syntax

[form.]Report.GraphOptions(ArrayIndex%) [= sectionCode; graphNum; fontFace; barDirection; labelRisers; gridLines; legend; max; min$]

For example:

CrystalReport1.GraphOptions(0) = “FOOTER;0;Arial;H;T;F;X;max;min”

«Sets the font to Arial, sets horizontal bars, shows a data value on every riser (labelRisers = T), and toggles the grid lines off in the first Graph in the Page Footer section.»

Remarks

With GraphOptions, you can specify changes to one or more graphs at runtime. Those changes then take place sequentially when you make the “Action=1” call. The array index value for GraphOptions simply specifies the sequence number for the change.

Thus:

CrystalReport1.GraphOptions(0) = “GROUPHDR.0.0; 1; Arial; (H; T; F; legend; max; min”

when making changes to one graph only, but

CrystalReport1.GraphOptions(0) = “TITLE; 1 Arial; H; T; F; X; 100; 0" CrystalReport1.GraphOptions(1) = “TITLE; 1 Arial; H; T; F; X; 100; 0"

when making changes to more than one graph.

NOTE: These examples use 32-bit section codes. If you are running a 16-bit system, see Section Codes (16-bit), Page 173.

Use the following chart as a guide in entering the required property values:

Parameter

Description

Values expected

 

 

 

 

 

 

sectionCode

Specifies the section in which you want to

Please refer to Section Codes (32-

 

modify a graph.

bit), Page 172.

 

 

 

graphNum

Specifies which graph in the section you

Graphs in a section are numbered,

 

want to modify.

starting with zero, left to right

 

 

first, then top to bottom.

 

 

 

fontFace

Specifies the font face you want to use for

Actual name of font (i.e., Arial).

 

the entire graph.

 

 

 

 

Crystal ActiveX Control Reference

195

Parameter

Description

Values expected

 

 

 

 

 

 

barDirection

In a bar graph, specifies the direction in

H = horizontal, V = vertical,

 

which you want the graph bars to appear.

X = as is

labelRisers

Specifies whether or not you want to

T= true, F = False, X = as is

 

show the data value on every riser.

 

 

 

 

gridLines

Specifies whether or not you want to

T= true, F = False, X = as is

 

show grid lines.

 

legend

Specifies whether or not you want to

T= true, F = False, X = as is

 

show a legend.

 

 

 

 

max

Specifies the maximum value you want

Enter a number.

 

included in your graph.

 

min

Specifies the minimum value you want

Enter a number.

 

included in your graph.

 

 

 

 

NOTE: If you are currently using the VBX control in your application, you will not be able to print individual subreports.

Data Type

Array of strings

Availability

Runtime

Related Report Engine Functions

PESetGraphOptions, Volume 2, Chapter 1

GraphText

GraphText specifies the various text components for the specified chart.

Syntax

[form.]Report.GraphText(ArrayIndex%)[= sectionCode; graphNum;title; subTitle; footnote;series;group;x;y;z$]

For example:

CrystalReport1.GraphText(0) = “HEADER; 0;;;;;;new x label; new y label;new z label”

«Resets the x, y, and z labels for the first graph in the Page Header section.»

Crystal ActiveX Control Reference

196

Remarks

Select your section code from the section code table (see Section Codes (32-bit), Page 172).

With GraphText, you can specify changes to one or more graphs at runtime. Those changes then take place sequentially when you make the “Action=1” call. The array index value for GraphText simply specifies the sequence number for the change. Thus:

CrystalReport1.GraphText(0) = “ GROUPHDR.0.0; 1; title string; subtitle string; footnote string; series string; group string; x string;y string; z string”

when making changes to one graph only, but

CrystalReport1.GraphText(0) = “TITLE; 1; title string; subtitle string; footnote string; series string; group string; x string; y string; z string”

CrystalReport1.GraphText(1) = “TITLE; 1; title string; subtitle string; footnote string; series string; group string; x string; y string; z string”

when making changes to more than one graph.

NOTE: These examples use 32-bit section codes. If you are running a 16-bit system, see Section Codes (16-bit), Page 173.

title, subTitle, footnote, series, group, x, y, and z are the strings you want to label the appropriate parts of the graph.

NOTE: If you are currently using the VBX control in your application, you will not be able to print individual subreports.

Data Type

Array of strings

Availability

Runtime

Related Report Engine Functions

PESetGraphText, Volume 2, Chapter 1

Crystal ActiveX Control Reference

197

GraphType

GraphType specifies the kind of chart used in the selected section in the specified report.

Syntax

[form.]Report.GraphType(ArrayIndex%)[=sectionCode;graphNum;graphType$]

For example:

CrystalReport1.GraphType(0)= “GROUPHDR.0.0; 0; PIE”

«Specifies a Pie graph as the first graph (graphNum =0) in the Group Header 1 section.»

NOTE: This example uses 32-bit section codes. If you are running a 16-bit system, see Section Codes (16-bit), Page 173.

Remarks

With GraphType, you can specify changes to one or more graphs at runtime. Those changes then take place sequentially when you make the “Action=1” call.

The array index value for GraphType specifies the sequence number for the change. Thus:

CrystalReport1.GraphType(0) = “GROUPHDR.0.0; 0; PIE”

when making changes to one graph only, but

CrystalReport1.GraphType(0) = “HEADER; 0; PIE”

CrystalReport1.GraphType(1) = “GROUPHDR.0.0; 0; PIE”

when making changes to more than one graph.

NOTE: These examples use 32-bit section codes. If you are running a 16-bit system, see Section Codes (16-bit), Page 173.

Select sectionCode from the section code table, see Section Codes (32-bit), Page 172.

Graph numbers are 0 origin; the first graph in a section is number 0, the second is number 1, etc.

Multiple graphs in a section are numbered left to right first, then top to bottom.

Select from the following graph types for the GraphType value for this property:

For this type of graph

Use this code for graphType

 

 

 

 

Side-by-side

SIDEBYSIDE

 

 

3-D side-by-side

3DSIDE

 

 

Stacked bar

STACKEDBAR

 

 

3-D stacked bar

3DSTACKED

Crystal ActiveX Control Reference

198

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