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

For this type of graph

Use this code for graphType

 

 

 

 

Percent bar

PERCENTBAR

 

 

3-D percent bar

3DPERCENT

Line

LINE

 

 

Area

AREA

 

 

3-D bars

3DBARS

 

 

Pie

PIE

Multiple pie

MULTIPLEPIE

 

 

Weighted pie

WEIGHTEDPIE

 

 

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

Data Type

Arrays of strings

Availability

Runtime

Related Report Engine Functions

PESetGraphType, Volume 2, Chapter 1

GroupCondition

GroupCondition specifies what kind of change in the Group Condition Field will trigger the creation of a group.

Syntax

[form.]Report.GroupCondition(SequentialIndex%) [= group; field; condition; sortDirection$]

For example:

CrystalReport1.GroupCondition(0) = “GROUP1;{order details.ORDER ID};ANYCHANGE;A”

«Specifies that any change in the ordernum field in Group1 will trigger a new grouping.»

Crystal ActiveX Control Reference

199

Remarks

Refer to the following tables for parameter values for this property:

Parameter

Description

Values expected

 

 

 

 

 

 

group

The group in which you want to set the

The outermost group on the report is

 

group condition.

GROUP1, the next group is GROUP2, etc.

 

 

 

field

The name of the field that triggers a

Enter the name in the following format:

 

grouping whenever its value changes.

{table.FIELDNAME}

 

 

 

condition

Enter the condition that triggers the

See the tables below.

 

grouping.

 

 

 

 

sortDirection

The direction in which groups are to be

A = Ascending,

 

sorted.

D = Descending.

 

 

 

Condition (Date Fields)

Condition Code

 

 

 

 

Daily

DAILY

Weekly

WEEKLY

Bi-weekly

BIWEEKLY

 

 

Semi-monthly

SEMIMONTHLY

 

 

Monthly

MONTHLY

 

 

Quarterly

QUARTERLY

Semi-annually

SEMIANNUALLY

 

 

Annually

ANNUALLY

 

 

Condition (Boolean Fields)

Condition Code

 

 

 

 

To Yes

TOYES

 

 

To No

TONO

 

 

Every Yes

EVERYYES

Every No

EVERYNO

 

 

Next Is Yes

NEXTISYES

 

 

Next Is No

NEXTISNO

 

 

 

 

Condition for all other data types

 

 

 

 

 

Any Change

ANYCHANGE

 

 

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

Crystal ActiveX Control Reference

200

Data Type

Array of strings

Availability

Runtime only

Related Report Engine Functions

PESetGroupCondition, Volume 2, Chapter 1

GroupSelectionFormula

GroupSelectionFormula specifies the groups to be used when printing the report.

Syntax

[form.]Report.GroupSelectionFormula [= “GroupSelectionFormula”]

Enter the group selection formula just as you would enter it in the Formula Editor. For example, to limit your report to those groups with a subtotal on the {order details.ORDER AMOUNT} field less than $10,000 (with subtotals triggered by changes in the {customer.CUSTOMER ID field}, you would enter the following as a group selection formula:

Sum ({order details.ORDER AMOUNT}, {customer.CUSTOMER ID}) < $10000

Remarks

If your group selection formula includes internal quotes, change all of the internal double quotes to single quotes and then surround the entire selection formula in double quotes.

NOTE: If you have created a group selection formula in your report at Design Time, any group selection formula you enter here will be appended to that group selection formula, connected by an “and”. Thus, your records will be selected based on a combination of the two formulas.

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

Data Type

String

Availability

Design Time; Runtime

Crystal ActiveX Control Reference

201

Related Report Engine Functions

PESetGroupSelectionFormula, Volume 2, Chapter 1

GroupSortFields

GroupSortFields specifies the group field(s) that are to be used to sort your data when the report is printed.

Syntax

[form.]Report.GroupSortFields(ArrayIndex) [= “+|-GroupField”]

Enter the group field(s) on which you want your report to be sorted.

For example, assume that you have broken your data into state groups and had Seagate Crystal Reports count the number of customers in each group. In order to print the group with the highest count first, then the group with the next highest count, etc. (descending order), enter a string similar to the following:

CrystalReport1.GroupSortFields(0) = “-Count

({customer.CUSTOMER ID},{customer.REGION})”

Remarks

GroupSortFields is an array property available at runtime only.

Use a separate line of code to specify each group sort field.

Enter group sort fields in the order that you want them to sort your report. For example, if you want your report to be sorted first on group sort field A and then on group sort field B, specify group sort field A in your first line of code and group sort field B in your second line of code.

The first group sort field you specify must be assigned array index 0, the second group sort field must be assigned array index 1, etc.

The index values you assign must be continuous; no gaps are allowed (0, 1, 2 = OK, 0, 1, 3 = wrong).

Array index values must be subscripted in the code immediately after the property name (i.e., CrystalReport1.GroupSortFields(0) =).

If you have specified sort fields for your report at Design Time, any sort fields you enter here will replace the sort fields in your report.

If you do not use this property, the program will use the sorting instructions that you specified in the report.

If you want to clear the group sort fields in your report, use an empty string (i.e., CrystalReport1.GroupSortFields(0) = “”).

This property is cleared once the print job is printed. If you print a second time, the program reverts to the group sort fields as originally specified in the report.

Crystal ActiveX Control Reference

202

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