Syntax 1 For DataWindows and DataStores – PB Docs 150

Syntax 1 For DataWindows and DataStores

Description

Cancels the printing of a DataWindow or DataStore that was
printed using Syntax 1 of Print.

Controls

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object, DataStore
object

Web ActiveX

DataWindow control, DataWindowChild object

Syntax

[PowerBuilder]

[Web ActiveX]

Argument

Description

dwcontrol

A reference to a DataWindow control,
DataStore object, or child DataWindow.

Return Values

Returns 1 if it succeeds and –1 if an error occurs.
If dwcontrol is null, PrintCancel returns
null.

Usage

PrintCancel cancels the printing of the
specified DataWindow or DataStore by deleting the spool file, if
any, and closing the job.

note.png PowerBuilder environment

When you use the Print method to print
the DataWindow or DataStore, without using PrintOpen,
use Syntax 1 to cancel printing. When you use the PowerScript system
function PrintDataWindow to print a DataWindow as
part of a print job, use Syntax 2 to cancel printing.

When you use Print for DataWindow controls or DataStores,
it triggers a PrintStart event just before any data is sent to the
printer (or spooler), a PrintPage event for each page break, and
a PrintEnd event when printing is complete. You can use PrintCancel
in the PrintStart or PrintPage event to cancel printing.

Examples

This statement sends the contents of the DataWindow
dw_employee to the current printer without displaying the
Cancel dialog:

This statement in the PrintStart event cancels printing:

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