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 Overview of Section Codes.

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.

Data Type

Arrays of strings

Availability

Runtime

Related Report Engine Functions

PESetSectionFormat



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com