Syntax 1 For DataWindows and DataStores
Description
Cancels the printing of a DataWindow or DataStore that was printed
using Syntax 1 of Print.
Applies to
|
DataWindow type |
Method applies to |
|---|---|
|
PowerBuilder |
DataWindow control, DataWindowChild object, |
Syntax
PowerBuilder
|
1 |
integer dwcontrol.PrintCancel ( ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to a DataWindow control, DataStore |
Return value
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.
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:
|
1 |
dw_Employee.Print(FALSE) |
This statement in the PrintStart event cancels printing:
|
1 |
dw_employee.PrintCancel() |
See also