Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dw.Print <-> PrintDataWindow()

331 views
Skip to first unread message

Klaus Adam

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
I am using Powerbuilder 6.5 and have a little problem with printing
datawindows.

If I use the dw.Print() function there is always that dialog-box for
choosing some parameters for the selected printer. Great, but there is no
way to select an amount of pages to print or the chance of changing the
printer.

OK, what I did was, that I wrote a dialog to set the parameters (pages,
copies, printer) that sets the dw.print. - properties.
To prevent the other dialog-box, I took the PrintDataWindow()-function. Fine
again, but there is no way to change the orientation of the paper.
The print-preview of my datawindow is landscape, but the printer is set up
to portrait, then my datawinow prints protrait and nothing is fine. If I use
dw.Print(), the printer does landscape as needed, but with additional
dialog-box.

Is there any way to set the printer to landscape or portrait by code, so tht
I'm still be able to use PrintDataWindow()?

Klaus Adam

power...@my-deja.com

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
Yeah there is an easy way to fix this
Get the Printer Utility from www.powerwhizz.com

In article <#vl1Z7vy$GA....@forums.sybase.com>,


Sent via Deja.com http://www.deja.com/
Before you buy.

Klaus Adam

unread,
Jun 2, 2000, 3:00:00 AM6/2/00
to
By now I understand, that PrintDataWindow() ignores the
datawindow-properties, while dw.Print() uses them.

I would use dw.Print(), but there is the additional dialog-box for the
printer-properties. Is there a way to prevent that dialog from appearing?

Klaus Adam


Klaus Adam <ka...@dp-gruppe.de> schrieb in im Newsbeitrag:
#vl1Z7vy$GA....@forums.sybase.com...

Klaus Adam

unread,
Jun 2, 2000, 3:00:00 AM6/2/00
to
Finaly I solved the problem.

I tried to use the checkbox (Prompt before printing) in the datawindow
painter. Nothing happend. The datawindow prompted every time regardeless
whether the box was checked or not.

I tried to set the property by code like this just before printing with
dw.Print():
dw.Modify('datawindow.print.prompt=No')

I could not believe the result. Everything works like I wanted to.

cluebeck

unread,
Jun 27, 2000, 3:00:00 AM6/27/00
to
Das setzen der Eigenschaften von Druckern sollte eigentlich in den DataWindows
gehen. Das eigentliche Problem ist das Umsetzen des Druckers. Bisher kenne ich
nur die Möglichkeit den Standarddrucker in der Registry umzusetzen. Es gibt
allerdings API-Funktionen mit denen das Lösen könnte:
SetPrinter
EnumPrinters
DeviceCapabities

Ich arbeite zur Zeit an einer Lösung, den Drucker und dessen EIgenschaften
mittels API-Funktionen für DataWindows umzusetzen.

mfg.
Christian Lübeck

clue...@messerknecht.de

Klaus Adam schrieb:

> By now I understand, that PrintDataWindow() ignores the
> datawindow-properties, while dw.Print() uses them.
>
> I would use dw.Print(), but there is the additional dialog-box for the
> printer-properties. Is there a way to prevent that dialog from appearing?
>

0 new messages