Print.property DataWindow object property
Description
Properties that control the printing of a DataWindow.
Controls
DataWindows
Syntax
PowerBuilder dot notation:
|
1 |
<span>dw_control</span>.Object.DataWindow.Print.<span>property</span> |
Describe and Modify argument:
|
1 |
"DataWindow.Print.<span>property</span> { = <span>value</span> }" |
DataWindowSyntaxFromSql:
|
1 |
DataWindow ( Print.<span>property </span>= <span>value </span>) |
|
Parameter |
Description |
|---|---|
|
property |
A property for printing. Properties and |
|
value |
The value to be assigned to the property. Value cannot |
|
Property for Print |
Value |
|---|---|
|
Background |
Whether the background settings of the Values are:
Painter: Print Shows Background option. |
|
Buttons |
Whether buttons display on the printed Values are:
Painter: Display Buttons – Print. |
|
CanUseDefault |
Whether a report can be printed on the Painter: Can Use Default Printer option. |
|
ClipText |
Whether the text of a static text field Values are:
Text is automatically clipped for text fields with visible Painter: Clip Text option. |
|
Collate |
Whether printing is collated. Note that Values are:
Painter: Collate Copies option. |
|
Color |
An integer indicating whether the printed Values are:
The user can specify the value in the system’s Print |
|
Columns |
An integer specifying the number of newspaper-style Painter: Newspaper Columns Across option. |
|
Columns.Width |
An integer specifying the width of the Painter: Newspaper Columns Width option. |
|
Copies |
An integer indicating the number of copies The user can also specify this value in the system’s If you use both the Print.Copies property |
|
CustomPage.Length |
A long indicating the desired length |
|
CustomPage.Width |
A long indicating the desired width of |
|
DocumentName |
A string containing the name that will Painter: Document Name option. |
|
Duplex |
An integer indicating duplex or double-sided Values are:
The user can specify the value in the system’s Print |
|
Filename |
A string containing the name of the file Painter: Cannot be set in painter. |
|
Margin.Bottom |
An integer indicating the width of the You can set Margin.Bottom when using DataWindowSyntaxFromSql to generate Painter: Bottom Margin option. |
|
Margin.Left |
An integer indicating the width of the You can set Margin.Left when using DataWindowSyntaxFromSql to generate Painter: Left Margin option. |
|
Margin.Right |
An integer indicating the width of the You can set Margin.Right when using DataWindowSyntaxFromSql to generate Painter: Right Margin option. |
|
Margin.Top |
An integer indicating the width of the You can set Margin.Top when using DataWindowSyntaxFromSql to generate Painter: Top Margin option. |
|
Orientation |
An integer indicating the print orientation. Values are:
Painter: Paper Orientation option. |
|
OverridePrintJob |
Whether you want to override the print Values are:
Painter: Override Print Job option. |
|
Page.Range |
A string containing the numbers of the The user can specify the value in the system’s Print |
|
Page.RangeInclude |
An integer indicating what pages to print Values are:
The user can specify the value in the system’s Print |
|
Paper.Size |
An integer indicating the size of the
Painter: Paper Size option. |
|
Paper.Source |
An integer indicating the bin that will Typical values are:
Painter: Paper Source option. |
|
Preview |
Whether the DataWindow object is displayed Values are:
|
|
Preview.Background |
Whether the background settings of the Values are:
Painter: Preview Shows Background option. |
|
PrinterName |
A string containing the name of the printer Painter: Printer Name option. |
|
Prompt |
Whether a Printer Setup dialog displays Values are:
Choosing Cancel in the Printer Setup dialog dismisses the For DataStores, this property is ignored; a dialog is never Painter: Prompt Before Printing check box. |
|
Quality |
An integer indicating the quality of Values are:
The user can specify the value in the system’s Print |
|
Scale |
An integer specifying the scale of the The scaling percentage is passed to the print driver. If you The user can specify the value in the system’s Print For more information, see your print driver |
Usage
In the painter
Select the DataWindow by deselecting all controls; then set values
in the Properties view, Print Specifications tab.
To specify a user-defined paper size, set the Paper.Size property
to 255 or 256, then set the Print.CustomPage.Length and Print.Custom.Page.Width
properties to the desired size. With Paper.Size set to 255, Length
and Width are in the units specified for the DataWindow on the General
page in the Properties view. For example:
|
1 |
// DataWindow Units set to 1/1000 inch<br>dw1.Modify("DataWindow.Print.Paper.Size=255")<br>//9.875 inches long<br>dw1.Modify("DataWindow.Print.CustomPage.Length=9875")<br>//7.375 inches wide<br>dw1.Modify("DataWindow.Print.CustomPage.Width=7375") |
With Paper.Size set to 256, Length and Width are in millimeters:
|
1 |
dw1.Modify("DataWindow.Print.Paper.Size=256")<br>//25.4 centimeters long<br>dw1.Modify("DataWindow.Print.CustomPage.Length=254")<br>//19.5 centimeters wide<br>dw1.Modify("DataWindow.Print.CustomPage.Width=195") |
Examples
|
1 |
strData = dw1.Object.DataWindow.Print.Scale |
|
1 |
dw1.Object.DataWindow.Print.Paper.Size = 3 |
|
1 |
strData = dw1.Describe("DataWindow.Print.Scale") |
|
1 |
dw1.Modify("DataWindow.Print.Paper.Size = 3") |
|
1 |
dw1.Modify("DataWindow.Print.Margin.Top=500") |
|
1 |
dw1.Object.DataWindow.Print.Buttons = 'Yes' |
|
1 |
setting = dw1.Describe("DataWindow.Print.Buttons") |
|
1 |
dw1.Modify("DataWindow.Print.Buttons = 'Yes'") |