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

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

PESetSectionFormat, Volume 2, Chapter 1

SectionLineHeight

SectionLineHeight specifies the line height in twips.

Syntax

[form.]Report.SectionLineHeight(SequentialIndex%)[=sectionCode; line; height; ascent$]

For example:

CrystalReport1.SectionLineHeight(0) = “GH0; 1; 500; 300“

«Sets the line height for the second line in the group header zero section to a height of 500 twips with an ascent of 300 twips.»

Remarks

A twip is 1/1440 inch; there are 20 twips in a point.

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

CrystalReport1.SectionLineHeight(0)= “DETAIL;1;500;300”

when making changes to the DETAIL section only, but

CrystalReport1.SectionLineHeight(0) = “HEADER;1;500;300”

CrystalReport1.SectionLineHeight(1) = “DETAIL;1;500;300”

when making changes to more than one section.

Crystal ActiveX Control Reference

239

Use the following table as a guide in supplying the required values for this property:

sectionCode

Specifies the section code for the report section(s) for which you want to set a new line

 

height. See Section Codes (32-bit), Page 172.

 

 

lineN

Specifies the line(s) for which you want to set the line height. Line numbers in a section

 

are 0 origin: the first line number is 0, the second is 1, etc.

 

 

height

Specifies the line height in twips. A twip is 1/1440 inch; there are 20 twips in a point.

ascent

Specifies the ascent in twips. Ascent is the distance from the top of the allotted line space

 

(line height) to the baseline of the font. The ascent parameter is used to specify the

 

position of the baseline if you specify an oversized or undersized line height. If you set

 

ascent to 0, the program puts the baseline at the top of the space; if you set ascent to the

 

same value as height, the program sets the baseline at the bottom of the space. For any

 

other baseline, specify the ascent 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

Arrays of strings

Availability

Runtime

SectionMinHeight

SectionMinHeight specifies the minimum section height for the specified report section.

Syntax

[form.]Report.SectionMinHeight (SequentialIndex%)[=sectionCode;minHeight$]

For example:

CrystalReport1.SectionMinHeight(0) = “DETAIL;500”

«Sets the minimum height for details section to 500 twips.»

Remarks

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

Crystal ActiveX Control Reference

240

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

CrystalReport1.SectionMinHeight(0)= “DETAIL;500”

when making changes to the DETAIL section only, but

CrystalReport1.SectionMinHeight(0) = “HEADER;500”

CrystalReport1.SectionMinHeight(1) = “DETAIL;500”

when making changes to more than one section.

Data Type

Array of strings

Availability

Runtime

Related Report Engine Functions

PESetNDetailCopies, Volume 2, Chapter 1

SelectionFormula

SelectionFormula specifies the records to be used when printing the report.

Syntax

[form.]Report.SelectionFormula[= SelectionFormula$]

For example:

CrystalReport1.SelectionFormula = “{file.QTY} > 5“

«Include only those records that have a quantity greater than 5 in the {file.Qty} field.»

Remarks

Enter the selection formula just as you would enter it in the Formula Editor.

Make certain that you enclose your selection formula in double quotes.

Crystal ActiveX Control Reference

241

If your selection formula includes internal quotes, for example:

{file.STATE} = “CA”

change all of the internal double quotes to single quotes and then surround the entire selection formula in double quotes as follows:

“{file.STATE} = 'CA'”

If you have created a selection formula in your report at Design Time, any selection formula you enter here will be appended to that selection formula. Thus, your records will be selected based on a combination of the two selection formulas.

Data Type

String

Availability

Design Time; Runtime

Related Report Engine Functions

PESetSelectionFormula, Volume 2, Chapter 1

SessionHandle

SessionHandle specifies the session handle for a user once the UserName, Page 248, and Password, Page 210, properties have opened an Access.mdb file for use by the report.

Syntax

[form.]Report.SessionHandle[= Handle%]

Remarks

If you have already opened a Jet session in your Visual Basic application, you can set this property to be the current session handle. Otherwise, you will have to use the Password, Page 210 and UserName, Page 248 properties to establish the Jet session.

For example:

CrystalReport1.SessionHandle = CurrentSessionHandle

«Sets the session handle to the session handle returned elsewhere in the application and stored in the variable CurrentSessionHandle.»

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

242

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