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

For example:

CrystalReport1.MarginBottom = 720

«Sets a 1/2 inch bottom margin for the report (1 inch = 1440 twips).»

Remarks

MarginSetting is the margin you want, in twips. A twip is 1/20th of a point. There are 72 points and thus 1440 twips in an inch.

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

Data Type

Integer

Availability

Design Time; Runtime

Related Report Engine Functions

PESetMargins, Volume 2, Chapter 1

MarginLeft

MarginLeft specifies the left margin for the specified report.

Syntax

[form.]Report.MarginLeft[=MarginSetting%]

For example:

CrystalReport1.MarginLeft = 1440

«Sets a 1 inch left margin for the report (1 inch = 1440 twips).»

Remarks

MarginSetting is the margin you want, in twips.

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

207

Data Type

Integer

Availability

Design Time; Runtime

Related Report Engine Functions

PESetMargins, Volume 2, Chapter 1

MarginRight

MarginRight specifies the right margin for the specified report.

Syntax

[form.]Report.MarginRight[=MarginSetting%]

For example:

CrystalReport1.MarginRight=1440

«Sets a 1 inch right margin for the report (1 inch = 1440 twips).»

Remarks

MarginSetting is the margin you want, in twips.

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

Data Type

Integer

Availability

Design Time; Runtime

Related Report Engine Functions

PESetMargins, Volume 2, Chapter 1

Crystal ActiveX Control Reference

208

MarginTop

MarginTop specifies the top margin for the specified report.

Syntax

[form.]Report.MarginTop[=MarginSetting%]

For example:

CrystalReport1.MarginTop = 720

«Sets a 1/2 inch top margin for the report (1 inch = 1440 twips).»

Remarks

MarginSetting is the margin you want, in twips.

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

Data Type

Integer

Availability

Design Time; Runtime

Related Report Engine Functions

PESetMargins, Volume 2, Chapter 1

ParameterFields

ParameterFields specifies the default value of the specified parameter field. When the prompting dialog box appears for the parameter field, the value specified with this property will be the default value that appears.

Syntax

[form.]Report.ParameterFields(ArrayIndex)[=”ParameterName;

NewValue;SetCurrentValue”]

Crystal ActiveX Control Reference

209

Remarks

The parameter, SetCurrentValue can either be set to TRUE or FALSE.

If set to TRUE, the parameter value is passed to the current value in the report; the user is not prompted to enter the parameter value.

If set to FALSE, the parameter value is passed to the default value for the parameter; the user is prompted to enter the parameter value, with the value you set showing as the default value.

The default value for SetCurrentValue is FALSE.

This property does not eliminate the prompt by specifying a current value for the parameter field. You will still be prompted but the default value in the prompt will be the value you specify.

Use a separate line of code for each parameter field for which you want to change the value.

The order of values in the array must conform to the order of parameter fields in the report.

The first parameter field in the report is array index (0), the second is (1), etc.

For example, to change the value of the first parameter field in a report (parameter1) to “red” use the following syntax (user will not be prompted to enter a value):

CrystalReport1.ParameterFields(0) = “parameter1;red;TRUE”

Or, to prompt the user to change the value of the third parameter field in a report (parameter3) use the following syntax (user will be prompted to use the default value set using the NewValue parameter below - “blue”):

CrystalReport1.ParameterFields(2) = “parameter3;blue;FALSE”

Data Type

Array of strings

Availability

Runtime only

Related Report Engine Functions

PESetNthParameterField, Volume 2, Chapter 1

Password

Password specifies the password needed to use database tables on a restricted Access .MDB file.

Syntax

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

Crystal ActiveX Control Reference

210

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