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

Section Object

Report areas contain at least one section. The Section Object includes properties for accessing information regarding a section of your report. This object holds on to a report object, then releases the report object when it is destroyed.

Section Object Properties

Property

Description

Read/Write

 

 

 

 

 

 

Application

Returns a reference to the Application Object (page 290), that this

Read only

 

object is associated with.

 

 

 

 

Height

Returns/Sets the height of the section in twips.

Read/Write

 

 

 

Number

Returns the number associated with the section in the area (that is, if

Read only

 

the first section in an area, the number returned is 1).

 

 

 

 

Options

Returns SectionOptions Object (page 361).

Read only

 

 

 

Parent

Reference to the Parent object (Area Object (page 294)).

Read only

 

 

 

Report

Reference to Report Object (page 349).

Read only

ReportObjects

Returns ReportObjects Collection (page 358), a heterogeneous

Read only

 

collection of report objects.

 

 

 

 

Width

Returns the width of the section in twips.

Read only

 

 

 

SectionOptions Object

The SectionOptions Object represents a section found in a report. A section is a part of a report area that can be formatted separately from other sections in the report. This object provides properties for retrieving information and setting options for a section in your report (that is, background color, new page after, etc.). A SectionOptions Object is obtained from the Options property of the Section Object, Page 361.

Each report area is comprised of sections that can be formatted independently of each other using the SectionOptions object. These section options are combined with the options set by using the AreaOptions Object, Page 295, to make up the final appearance of a section and an area of the report. The settings in the AreaOptions object will affect all sections within the area, while settings in the SectionOptions object will affect only the section they are set to.

If there is a conflict of settings between the AreaOptions object and the SectionOptions object, the object with an option set to TRUE will override the setting for the other object. For example, if the AreaOptions object has the KeepTogether property set to TRUE, all sections within the area will have KeepTogether applied, even if the SectionOptions object for a section has KeepTogether set to FALSE. If, however, the AreaOptions object has KeepTogether set to FALSE, but a section within that area has KeepTogether set to TRUE, that section will have the KeepTogether format option applied.

Crystal Report Engine Object Model for the Automation Server

361

If an area has only a single section, all options will be combined between both the AreaOption object and the SectionOptions object. All TRUE settings set in either object will result in a TRUE setting for the entire area and section. While changing format options for areas and sections in reports, be sure to keep track of settings in both the AreaOptions and SectionOptions objects.

SectionOptions Object Properties

Property

Description

 

 

 

Read/Write

 

 

 

 

 

 

 

 

 

 

 

 

Application

Returns a reference to the Application Object (page 290),

 

Read only

 

that this object is associated with.

 

 

BackColor

Returns/Sets CRColor (see table below) indicating OLE

 

Read/Write

 

color. You can use CRColor values or declare your own

 

 

 

colors by using OLE colors (that is, by using RGB function).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Constant

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

crAqua

16776960

 

 

 

 

 

 

 

 

 

 

crBlack

0

 

 

 

 

crBlue

16711680

 

 

 

 

 

 

 

 

 

 

crFuchsia

16711935

 

 

 

 

 

 

 

 

 

 

crGray

8421504

 

 

 

 

 

 

 

 

 

 

crGreen

32768

 

 

 

 

crLime

65280

 

 

 

 

 

 

 

 

 

 

crMaroon

128

 

 

 

 

 

 

 

 

 

 

crNoColor

-1

 

 

 

 

 

 

 

 

 

 

crOlive

32896

 

 

 

 

 

 

 

 

 

 

crPurple

8388736

 

 

 

 

crRed

255

 

 

 

 

 

 

 

 

 

 

crSilver

12632256

 

 

 

 

 

 

 

 

 

 

crTeal

8421376

 

 

 

 

 

 

 

 

 

 

crWhite

16777215

 

 

 

 

crYellow

65536

 

 

 

 

 

 

 

 

 

 

 

 

BackColorFormula

Returns/Sets string specifying a formula for

 

Read/Write

 

conditionally setting the background color of a section.

 

 

 

 

 

 

 

FreeFormPlacement

Returns/Sets Boolean value indicating if section has free

 

Read/Write

 

form placement.

 

 

 

 

 

 

 

 

KeepTogether

Returns/Sets Boolean indicating if section keeps together

 

Read/Write

 

(doesn’t break) across pages.

 

 

 

 

 

 

 

 

 

Crystal Report Engine Object Model for the Automation Server

362

KeepTogetherFormula

Returns/Sets string specifying the formula for

Read/Write

 

conditionally setting if a section should keep together

 

 

(doesn’t break) across pages.

 

 

 

 

NewPageAfter

Returns/Sets Boolean value indicating if there is a new

Read/Write

 

page after the section is printed.

 

 

 

 

NewPageAfterFormula

Returns/Sets string specifying the formula for

Read/Write

 

conditionally setting the report to start a new page after

 

 

this section is printed.

 

 

 

 

NewPageBefore

Returns/Sets Boolean value indicating if there is a new

Read/Write

 

page before the section is printed.

 

NewPageBeforeFormula

Returns/Sets string specifying the formula for

Read/Write

 

conditionally setting the report to start a new page before

 

 

this section is printed.

 

 

 

 

Parent

Reference to the Parent object (Section Object (page 361)).

Read only

PrintAtBottomOfPage

Returns/Sets Boolean indicating if the section is printed

Read/Write

 

at the bottom of the page.

 

 

 

 

PrintAtBottomOfPage-

Returns/Sets string specifying formula for conditionally

Read/Write

Formula

printing section at the bottom of the page.

 

Report

Reference to Report Object (page 349).

Read only

 

 

 

ResetPageNumberAfter

Returns/Sets Boolean value indicating if the page

Read/Write

 

number will be reset after the section is printed.

 

 

 

 

ResetPageNumberAfter-

Returns/Sets string specifying the formula for

Read/Write

Formula

conditionally resetting the page number.

 

 

 

 

SuppressIfBlank

Returns/Sets Boolean value indicating if the section is

Read/Write

 

suppressed when containing no data.

 

 

 

 

SuppressIfBlankFormula

Returns/Sets string specifying the formula for conditionally

Read/Write

 

suppressing a section when containing no data.

 

 

 

 

UnderlaySection

Returns/Sets Boolean value indicating if the section

Read/Write

 

underlays the following sections.

 

 

 

 

UnderlaySectionFormula

Returns/Sets string specifying the formula for

Read/Write

 

conditionally underlaying a section.

 

 

 

 

Visible

Returns/Sets Boolean value indicating whether a section

Read/Write

 

is shown (visible).

 

 

 

 

VisibleFormula

Returns/Sets string specifying the formula for

Read/Write

 

conditionally showing (making visible) a section.

 

 

 

 

Crystal Report Engine Object Model for the Automation Server

363

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