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

Availability

Design Time; Runtime

Related Report Engine Functions

PEExportTo, Volume 2, Chapter 1

ExchangeFolder

ExchangeFolder specifies the Exchange path to which a file will be exported, when you want to export to Microsoft Exchange.

Syntax

[form.]Report.ExchangeFolder [= ExchangeFolderPath$]

For example:

CrystalReport1.ExchangeFolder = “c:\Microsoft\Exchange\newrpt.rpt”

«Send the report to file “newrpt.rpt” in the subdirectory \Microsoft\Exchange.»

NOTE: ExchangeFolder is case-sensitive. If you enter a value in the wrong case you will receive an error message.

Data Type

String

Availability

Runtime

Remarks

This property/method is available for subreports.

Related Report Engine Functions

PEExportTo, Volume 2, Chapter 1

Crystal ActiveX Control Reference

190

ExchangePassword

Specifies the Exchange password when you want to export to Microsoft Exchange.

Syntax

[form.]Report.ExchangePassword [= Password$]

For example:

CrystalReport1.ExchangePassword = “pickle”

«The Exchange password is “pickle”.»

Data Type

String

Availability

Runtime

Remarks

This property/method is available for subreports.

Related Report Engine Functions

PEExportTo, Volume 2, Chapter 1

ExchangeProfile

ExchangeProfile specifies the Exchange Profile when you want to export to Microsoft Exchange.

Syntax

[form.]Report.ExchangeProfile [= Profile$]

For example:

CrystalReport1.ExchangeProfile = “James Andrews”

«Specifies “James Andrews” as the Exchange Profile.»

Crystal ActiveX Control Reference

191

Remarks

Usually your profile is your name.

This property/method is available for subreports.

Data Type

String

Availability

Runtime

Related Report Engine Functions

PEExportTo, Volume 2, Chapter 1

Formulas

Formulas specifies a new string for an existing formula.

Syntax

[form.]Report.Formulas(ArrayIndex)[= “FormulaName= FormulaText”]

Enter the formula name and the string that you want to replace the existing string for each formula that you want to change in your report.

For example, to change a formula @COMMISSION to {file.SALES}*.1, and a second formula @TOTAL to {file.SALES} + {file.COMMISSION}, enter the following:

CrystalReport1.Formulas(0) = “COMMISSION= {file.SALES} *.1”

CrystalReport1.Formulas(1) = “TOTAL= {file.SALES} + {file.COMMISSION}”

Remarks

Formulas is an array property that is available at runtime only.

Use a separate line of code for each formula you want to change.

Change only those formulas that you want to change.

The first formula you change must be assigned array index (0), the second must be assigned array index (1), etc.

The new formula string must conform to Seagate Crystal Reports syntax requirements.

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

Crystal ActiveX Control Reference

192

NOTE: Spaces are significant in formula names. For this reason, the equals sign must follow the formula name with no intervening spaces.

NOTE: The @ sign is not used when designating a formula name in this property.

NOTE: You can’t use this property to create new formulas. You can only use it to change existing formulas.

Data Type

Array of strings

Availability

Runtime

Related Report Engine Functions

PESetFormula, Volume 2, Chapter 1

GraphData

GraphData specifies the data used for a specified chart.

Syntax

[form.]Report.GraphData(ArrayIndex%) [= sectionCode; graphNum; row; col; field;direction$]

For example:

CrystalReport1.GraphData(0)= “GROUPHDR.0.0; 1; GROUP2; GROUP1; 0; COLANDROW”

«The value in Group 1 is used for the rows of the graph, the value in Group 2 is used for the columns of the graph, the first summarized field added to the report is used to set the value of the risers of the graph, and values in both columns and rows are used to create the graph.»

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 GraphData, you can specify changes to one or more graphs at runtime. Those changes then take place sequentially when you make the “Action=1” call.

Crystal ActiveX Control Reference

193

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

CrystalReport1.GraphData(0) = “GROUPHDR.0.0; 3; Group1; Group2; 666;

COLANDROW”

when making changes to one graph only, but

CrystalReport1.GraphData(0) = “HEADER; 3; Group1; Group2; 666; COLANDROW”

CrystalReport1.GraphData(1) = “GROUPHDR.0.0; 3; Group1; Group2; 666;

COLANDROW”

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 table as a guide in supplying the required values for this property:

Parameter

Description

Expected value

 

 

 

 

 

 

sectionCode

Specifies the section in which you want to

Please refer to Section Codes (32-bit),

 

modify a graph.

Page 172.

 

 

 

graphNum

The number of the graph within the

Graphs in a section are numbered,

 

section you want to modify.

starting with zero, left to right first,

 

 

then top to bottom.

 

 

 

row

The Group number in the report used to

GROUP1, GROUP2, GROUP3,...,

 

create rows in the graph.

GROUP9

 

 

 

col

The Group number in the report used to

GROUP1, GROUP2, GROUP3,...,

 

create columns in the graph.

GROUP9

 

 

 

field

The summarization field containing

The first summary field added to a

 

values to be used as the value of each

report is numbered 0, the second is

 

riser in the graph.

numbered 1, etc.

direction

Whether the values in the rows, the

ROWS, COLS, ROWANDCOL, or

 

columns, or both are used to create the

COLANDROW

 

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

PESetGraphData, Volume 2, Chapter 1

Crystal ActiveX Control Reference

194

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