PrintPage – PB Docs 150

PrintPage event

Description

Occurs before each page of the DataWindow or DataStore is
formatted for printing.

PowerBuilder event information

Event ID: pbm_dwnprintpage

Argument

Description

pagenumber

Long by value. The number of the page
about to be printed.

copy

Long by value. The number of the copy
being printed.

Web ActiveX event information

Event name: beforePrintPage

Argument

Description

PageNumber

Number. The number of the page about
to be printed.

Copy

Number. The number of the copy being
printed.

Return Values

Set the return code to affect the outcome of the event:

  • 0 Do not skip the page

  • 1 Skip the page

For information on setting the return code in a particular
environment, see “About return values for
DataWindow events”
.

Usage

The PrintPage event for a DataWindow control recalculates
DataWindow pages before each page of a DataWindow object is formatted
for printing. However, you cannot use this event to modify the page
number of the current page or the remaining pages in the DataWindow.

Examples

After a script prints a DataWindow control, you can
limit the number of pages to be printed by suppressing every page
after page 50.

This statement in a CommandButton’s Clicked event
script prints the contents of the DataWindow control:

This code in the PrintPage event of dw_1
cancels printing after reaching page 50:

If you know every fifth page of the DataWindow contains
the summary information you want, you can suppress the other pages
with some arithmetic and a RETURN statement:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x