0
votes

Im using Delphi7 and QuickReport 3. Im new to Delphi and QuickReport.

When I debug my application I got an error at the procedure TQRPreview.UpdateZoom;

if assigned(FQRPrinter)

The exception is Access violation

In my form Im calling , QuickRep.Prepare;and QuickRep.Preview.

When Im calling QuickRep.Preview I'm geeting the error.

Any help is appreciated.

1
The exception can't happen at that line, based on what you've provided here. There's absolutely nothing there that would cause it. Please edit your question to provide more information. (The only thing I can suggest based on what you've posted is that you make sure there's at least one printer installed - QR had a famous bug related to AVs when there was none.) - Ken White
@KenWhite If self=nil then access to FQRPrinter will raise an Access Violation. So I guess the TQRPreview instance was not properly created - perhaps due to the lack of default printer in the system... - Arnaud Bouchez
@ArnaudBouchez, I said "based on what you've provided here". There's no indication of whether or not the TQRPreview was created properly or not in the code posted, which is why I asked for more information. :-) - Ken White
@ Arnaud Bouchez, u r right. The TQRPreview instance was not properly created. Thanks Rightnow My TQRPreview is not filled with data. ie I want to populate data from database to Preview. So can anybody suggest a good tutorial or code for how to load the data from database to preview - user1469630
You can see demos in Delphi7\Demos\Quickrpt\Qr3 folder. You can get tutorials in youtube, from delphi.com and from (quickreport.co.uk/WebInfoPage.aspx?WebInfoID=651) - Hendra

1 Answers

0
votes

Double check your code when you are creating some form with that QReport. You are freeing it after it is no longer needed.

Secondly, try to add Application.Processmessages; after you're done with any printing.