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

ReportSource

ReportSource specifies the source of the report as a report file, a Visual Basic data control, or a True Grid data control.

Syntax

[form.]Report.ReportSource

For example:

CrystalReport1.ReportSource = 1

«Specifies the report source as the TrueDBGrid control.»

Data Type

Integer

Availability

Design Time and Runtime

Remarks

This property/method is available for subreports.

ReportStartPage

ReportStartPage specifies the first page printed in the specified report.

Syntax

[form.]Report.ReportStartPage

For example:

StartPage% = CrystalReport1.ReportStartPage

«Fetches the number of the first page printed and stores it in the StartPage variable.»

Data Type

Integer

Availability

Runtime

Crystal ActiveX Control Reference

235

Remarks

This property/method is available for subreports.

Related Report Engine Functions

PEGetJobStatus, Volume 2, Chapter 1

ReportTitle

ReportTitle specifies a title for the report.

Syntax

[form.]Report.ReportTitle[= rptTitle$]

For example:

CrystalReport1.ReportTitle = "My Report"

«Applies the title "My Report" to the report.»

Data Type

String

Availability

Design Time; Runtime

Related Report Engine Functions

PESetReportSummaryInfo, Volume 2, Chapter 1

SectionFont

SectionFont specifies the font for one or more sections in the specified report.

Syntax

[form.]Report.SectionFont(SequentialIndex%)[= sectionCode; fontName; size; italic; bold;underline;strikethru$]

For example:

CrystalReport1.SectionFont(0)=”Footer;Arial;12;N;N;N;Y”

«Sets the font for the footer section to 12 point, Arial, strikethrough.»

Crystal ActiveX Control Reference

236

Remarks

With SectionFont, 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 array index value for SectionFont simply specifies the sequence number for the change. Thus:

CrystalReport1.SectionFont(0)= “DETAIL;Arial;12;N;N;N;Y”

when making changes to the DETAIL section only, but

CrystalReport1.SectionFont(0) = “HEADER;Arial;12;N;N;N;Y”

CrystalReport1.SectionFont(1) = “DETAIL;Arial;12;N;N;N;Y”

when making changes to more than one section.

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

Parameter

Data type

Value expected

 

 

 

 

 

 

sectionCode

string

Please refer to the Section Codes (32-bit),

 

 

Page 172.

fontName

string

The actual font name (i.e., Arial or

 

 

Helvetica).

 

 

 

size

number

The size of the font in points (i.e., 12 or 16).

italic

character

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

bold

character

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

 

 

 

underline

character

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

 

 

 

strikethrough

character

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

 

 

 

*X (as is) uses the value saved with the report.

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

PESetFont, Volume 2, Chapter 1

Crystal ActiveX Control Reference

237

SectionFormat

SectionFormat specifies the format for one or more sections in the specified report.

Syntax

[form.]Report.SectionFormat(SectionArrayIndex%)[= sectionCode; visible; newPageBefore; newPageAfter; keepTogether; SuppressBlankSection; resetPageNAfter; printAtBottomOfPage; underlaySection; backgroundColor]

For example:

CrystalReport1.SectionFormat(0)= “GH2;F;X;X;X;X;X;X;X;255.0.0”

«Hides the Group Header 2 section (visible = F) and changes the background color to red while maintaining default settings for all other switches.»

Remarks

With SectionFormat, 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 SectionFormat simply specifies the sequence number for the change. Thus:

CrystalReport1.SectionFormat(0)= “DETAIL;T;F;F;X;X;X;X;X;255.0.0”

when making changes to the DETAIL section only, but

CrystalReport1.SectionFormat(0) = “HEADER;T;F;F;X;X;X;X;X;255.0.0”

CrystalReport1.SectionFormat(1) = “DETAIL;T;F;F;X;X;X;X;X;255.0.0”

when making changes to more than one section.

Use the following table as a reference when entering parameter values for this property:

sectionCode

Please refer to the Section Codes (32-bit), Page 172.

 

 

Visible

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

 

 

newPageBefore

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

 

 

newPageAfter

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

keepTogether

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

 

 

suppressBlank

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

 

 

resetPageNAfter

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

 

 

printAtPageBottom

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

 

 

underlaySection

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

backgroundColor

Supply a RGB (Red, Green, Blue) value in the following format:

 

<R>.<G>.<B> where R, G, and B are each integers with a range from 0 to

 

255. For example: 189.210.100. If you do not want to change the color, do

 

not place anything in this parameter.

* X (as is) uses the settings saved with the report.

Crystal ActiveX Control Reference

238

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