Print.property
property (DataWindow object)
Description
Properties that control the printing of a DataWindow.
Applies to
DataWindows
Syntax
PowerBuilder dot notation:
|
1 |
dw_control.Object.DataWindow.Print.property |
Describe and Modify argument:
|
1 |
"DataWindow.Print.property { = value }" |
SyntaxFromSql:
|
1 |
DataWindow ( Print.property = value ) |
|
Parameter |
Description |
|---|---|
|
property |
A property for printing. Properties and their |
|
value |
The value to be assigned to the property. Value |
|
Property for Print |
Value |
|---|---|
|
Background |
Whether the background settings of the DataWindow Values Yes — Display background on report. This No — (Default) Do not Painter: Print Shows |
|
Buttons |
Whether buttons display on the printed Values are: Yes — Buttons are No — Buttons are not Painter: Display Buttons – |
|
CanUseDefaultPrinter |
Whether a report can be printed on the default Painter: Can Use Default |
|
ClipText |
Whether the text of a static text field on a Values Yes — The printed text does not overrun the No — (Default) The entire text can Text is automatically Painter: Clip Text |
|
Collate |
Whether printing is collated. Note that collating Values are: Yes — No — Painter: Collate Copies |
|
Color |
An integer indicating whether the printed output Values 1 — Color 2 — The user can specify the value in the |
|
Columns |
An integer specifying the number of newspaper-style Painter: Newspaper Columns Across |
|
Columns.Width |
An integer specifying the width of the Painter: Newspaper Columns Width |
|
Copies |
An integer indicating the number of copies to be The user can also specify this value in the If you use both the Print.Copies property and |
|
CustomPage.Length |
A long indicating the desired length of a custom |
|
CustomPage.Width |
A long indicating the desired width of a custom |
|
DocumentName |
A string containing the name that will display in Painter: Document |
|
Duplex |
An integer indicating duplex or double-sided Values are: 0 — 1 — Normal (nonduplex) 2 — Short-edge binding (the long edge of 3 — Long-edge binding (the The user can |
|
Filename |
A string containing the name of the file to which Painter: Cannot be set in |
|
Margin.Bottom |
An integer indicating the width of the bottom You can set Margin.Bottom when using Painter: Bottom Margin |
|
Margin.Left |
An integer indicating the width of the left margin You can set Margin.Left when using Painter: Left Margin option. |
|
Margin.Right |
An integer indicating the width of the right margin You can set Margin.Right when using Painter: Right Margin option. |
|
Margin.Top |
An integer indicating the width of the top margin You can set Margin.Top when using Painter: Top Margin option. |
|
Orientation |
An integer indicating the print orientation. This Values are: 0 — The default 1 — 2 — Portrait Painter: Paper |
|
OverridePrintJob |
Whether you want to override the print job print Values Yes — Override the print job print No — (Default) Do not override the print Painter: Override Print Job |
|
Page.Range |
A string containing the numbers of the pages you The user can specify the value in the system’s |
|
Page.RangeInclude |
An integer indicating what pages to print within Values are: 0 — 1 — Print all even pages. 2 The user can specify the |
|
Paper.Size |
An integer indicating the size of the paper used 0 — Default paper size for the 1 — Letter 8 1/2 x 11 in 2 — 3 — Tabloid 17 x 11 4 — Ledger 17 x 11 in 5 — Legal 8 6 — Statement 5 1/2 x 8 1/2 7 — Executive 7 1/4 x 10 1/2 in 8 — 9 — A4 210 x 297 mm 10 11 — A5 148 x 210 12 — B4 250 x 354 mm 13 — B5 182 x 14 — Folio 8 1/2 x 13 in 15 — 16 — 10×14 in 17 — 18 — Note 8 1/2 x 11 in 19 — 20 — Envelope #10 4 1/8 x 21 — Envelope #11 4 1/2 x 10 22 — Envelope #12 4 x 11 1/276 23 24 — C size 25 — D size sheet 26 — E size 27 — Envelope DL 110 x 220 mm 28 29 — Envelope C3 324 x 30 — Envelope C4 229 x 324 mm 31 32 — Envelope C65 114 x 33 — Envelope B4 250 x 353 mm 34 35 — Envelope B6 176 x 36 — Envelope 110 x 230 mm 37 — 38 — 6 3/4 Envelope 39 — US Std Fanfold 14 7/8 x 11 40 — German Std Fanfold 8 1/2 x 12 41 — German Legal Fanfold 8 1/2 x 13 255, 256 — User-defined paper size (see “Usage” Painter: Paper Size option. |
|
Paper.Source |
An integer indicating the bin that will be used as Typical values are: 0 1 — Upper 2 — 3 — Middle 4 — 5 — Envelope 6 — Envelope 7 — Auto 8 — 9 — Smallfmt 10 — 11 — Large capacity 14 — Painter: Paper Source |
|
Preview |
Whether the DataWindow object is displayed in Values are: Yes — Display No — (Default) Do not display in |
|
Preview.Background |
Whether the background settings of the DataWindow Values Yes — Display in preview mode. No Painter: Preview Shows Background |
|
PrinterName |
A string containing the name of the printer you Painter: Printer |
|
Prompt |
Whether a Printer Setup dialog displays before a Values are: Yes No — Choosing For DataStores, this property is ignored; a Painter: Prompt Before |
|
Quality |
An integer indicating the quality of the Values are: 0 — 1 — High 2 — 3 — Low 4 — The user can specify the value in the system’s |
|
Scale |
An integer specifying the scale of the printed The scaling percentage is The user can specify the value in the 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 2 3 4 5 6 |
// DataWindow Units set to 1/1000 inch dw1.Modify("DataWindow.Print.Paper.Size=255") //9.875 inches long dw1.Modify("DataWindow.Print.CustomPage.Length=9875") //7.375 inches wide dw1.Modify("DataWindow.Print.CustomPage.Width=7375") |
With Paper.Size set to 256, Length and Width are in
millimeters:
|
1 2 3 4 5 |
dw1.Modify("DataWindow.Print.Paper.Size=256") //25.4 centimeters long dw1.Modify("DataWindow.Print.CustomPage.Length=254") //19.5 centimeters wide dw1.Modify("DataWindow.Print.CustomPage.Width=195") |
Examples
|
1 2 3 4 5 6 7 8 |
strData = dw1.Object.DataWindow.Print.Scale dw1.Object.DataWindow.Print.Paper.Size = 3 strData = dw1.Describe("DataWindow.Print.Scale") dw1.Modify("DataWindow.Print.Paper.Size = 3") dw1.Modify("DataWindow.Print.Margin.Top=500") dw1.Object.DataWindow.Print.Buttons = 'Yes' setting = dw1.Describe("DataWindow.Print.Buttons") dw1.Modify("DataWindow.Print.Buttons = 'Yes'") |
See also