QReport @@#!!!! grrrrrr

Posted on 1998-12-23
Last Modified: 2010-04-04

Hi all,
I hate QReport...this is the most stupid prog. i have ever seen... OK, now i feel much better....

Is it the way to explain to QReport that it does not have to do the following:
If you create report end preview it, everithing is OK, but when you print it the stupid QReport will create it again ?!!, and you will have bunch of stupiditi on it (if you are using Befor and After print events on Bands). So now you have to use some Variables to determin if the report is printing or previewing etc.
So, one more time... is it possible for QReport to act like any other Windows  program and print previewed picture to  printer?
Question by:rpetruni
  • 2

Expert Comment

ID: 1352698
What about prepare method.

Author Comment

ID: 1352699
please, be more specific... what prepare method does?

Expert Comment

ID: 1352700
sorry, thought it would help, but it doesn't. It's only usefull for preparing the report and then save it to file in QRP file...

Accepted Solution

AG112297 earned 20 total points
ID: 1352701
from the KB.txt file available at
When you print from the preview, the report is rendered again.  The reason is the preview is rendered to a metafile, and the output looks better if it's directly rendered to the printer canvas.  You can override this behaviour, when you print a previously saved report, the preview metafile is sent to the printer.
Set the OnGenerateToPrint event of the report's qrprinter object to nil.  This will force the report to not render the report a second time.
procedure Tfrmqr.QuickRep1BeforePrint(Sender: TQuickRep; var PrintReport: boolean);
  QuickRep1.qrprinter.OnGenerateToPrinter := nil;


Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question