Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 1 Jahr, 3 Monaten
Letzter Beitrag:
vor 1 Jahr, 3 Monaten
Beteiligte Autoren:
Erik Schwarz, Klaus Pusch, Al, DarrenF

[WD19] Closing preview window after printing

Startbeitrag von Erik Schwarz am 04.07.2016 10:26

Hi,

I'm trying to close the preview window after report has been printed.
When I put 'iclosereport()' in the 'after printing end of document', the report preview flashes up, then is closed immediately, but no printing occurs.

Need to be closed after user has really printed the Report.
Any ideas?

Erik

Antworten:

Hello Erik

Because the print preview is a black box, I think the standard procedure is to move the existing print button offscreen and make it invisible. Put your own print button in its place and call the original button as the first command in the click event of your button and then after the print runs it should retuurn to your button code and you can close the preview window

Regards
Al

von Al - am 04.07.2016 10:34
Hi Erik,

Is it essential that the Preview window opens in the first place? If not, then why not just print directly or open the printer selection dialog (if there are multiple printers defined) before printing?

von DarrenF - am 04.07.2016 10:40

Re: [WD19] Custom around

Hi Al and Darren,

thanks for your suggestions. In case of short time I finally got the easiest way and let the user give two options (with or without preview).

Erik

von Erik Schwarz - am 04.07.2016 14:18
IF NOT iDocumentPrinted() is your friend

von Klaus Pusch - am 04.07.2016 16:50
Hello Klaus,

I have tried this after calling iprintreport using a Loop to wait until idocumentprinted = true with no success.

Where did you put that code in?

Erik

von Erik Schwarz - am 05.07.2016 06:31
Hello Eric,

direct after ipreview(i100)
iprintreport(Report)
IF not iDocumentPrinted() then

von Klaus Pusch - am 05.07.2016 10:05
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.