New Blog Post: PDF/A and Metadata

[SOLVED] Problem with Default Printer

edited November 2013 in End User
Dear Delphi Friends.

I have been struggling with this for months.

Problem: Previewing report on screen (TppViewer) is fine, and when you call Print, report is regenerated and some weird stuff happens, like duplicate field on multiple pages, memos with different positions, specially if you have Dynamic bands, with AutoStrech Memos, Shapes StretchWithParent etc...

My problem was this line of code

Report1.PrinterSetup.PrinterName := Printer.Printers[StrToInt(str_Default_Printer)];

Which was firing before Report1.Print, after OnScreen (Preview).

Basically this code is getting a variable (printer) that Users select, and make it default on application.

So I moved this line it to FormCreate, right before Report1.PrintToDevices (SCREEN).

Now it is fine.

What I see on screen, is what I get on printer, no matter what Print is.




--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-
This discussion has been closed.