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

Property

Description

Read/Write

Restriction in event handler

 

 

 

 

 

 

 

 

PrintAtBottom

Returns or sets the option that

Read/Write

Can be written only when

OfPage

indicates whether to print the

 

formatting idle or active.

 

current section at the bottom of

 

 

 

the page.

 

 

 

 

 

 

ReportObjects

Returns Report Object (page

Read only

None

 

93). A heterogeneous collection

 

 

 

of report objects.

 

 

 

 

 

 

ResetPageNumber

Returns or sets the option that

Read/Write

Can be written only when

After

indicates whether to reset the

 

formatting idle or active.

 

page number after the current

 

 

 

section.

 

 

 

 

 

 

Suppress

Returns or sets the section

Read/Write

Can be written only when

 

visibility.

 

formatting idle or active.

 

 

 

 

SuppressIfBlank

Returns or sets the option that

Read/Write

Can be written only when

 

indicates whether to suppress

 

formatting idle or active.

 

the current section if it’s blank.

 

 

 

 

 

 

UnderlaySection

Returns or sets the underlay

Read/Write

Can be written only when

 

following section option.

 

formatting idle or active.

Width

Returns the width of the

Read only

None

 

section in twips.

 

 

 

 

 

 

Section Object Event

Format Event (Section Object), Page 108

Format Event (Section Object)

The Format event is fired before the print engine starts formatting a section. In the Format event handler you can use the object model to write some code to change the outcome of the formatted section. Be aware, however, that not all of the properties and methods provided in the object model are accessible at all times in the event handler.

Parameters

Parameter

Description

 

 

 

 

IDispatch*FormattingInfo

The FormattingInfo object which will contain formatting information to be

 

used by the Format event handler.

Report Designer Component Object Model

108

Returns

Void

Remarks

The following comments regarding Restrictions and Rules apply to Format Event:

Restrictions

The Format event handler does not have any state. No matter when or how many times it is called it will always behave the same way. It should not keep track of how many times it is called then, based on how many times it is called, change the background color. The print engine formatting procedure is very complicated and one section can be formatted many times depending on different situations.

NOTE: Because the Format event for each section may be fired more than once during page printing you should not use it to do any totaling in which values are carried over from one section to another.

There are three formatting modes:

FormattingIdle

No formatting occurs. This can be before going to preview or print or between

 

changing pages in the viewer.

 

 

FormattingActive

The start of formatting an object. The object mode is marked as formatting active.

 

 

FormattingInactive

When the print engine is formatting and one object is in FormattingActive mode

 

the rest of the objects are in FormattingInactive mode.

Since there is only one section Format event when one section is formatting all of the objects in that section are in FormattingActive mode and all the rest of the sections and objects are in FormattingInactive mode.

Rules

The read property can be accessed in any formatting mode. (There are a few exceptions, please see the object model reference section.)

Top level Report, Areas and Area write properties and methods can only be accessed in formatting idle mode.

When in FormattingIdle mode you should make changes before going to preview or print. Making changes between changing pages may result in an unexpected result.

For sections and objects within sections write property or method access is denied when the section is in FormattingInactive mode.

For sections and objects within sections some write property or method access is permitted and some denied while the section is in FormattingActive mode. Please refer the object model reference for details.

Report Designer Component Object Model

109

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