Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QuickReports QRBand1BeforePrint looping twice at start

Status
Not open for further replies.

tryn2learn

Programmer
Jun 26, 2000
24
0
0
US
I am using Delphi 5 in a Windows 2000 environment and printing to an HP 8150 printer. I am experiencing a problem that no one seems able to explain. It is related to using the QRBand1BeforePrint event. The problem is that the first time into the report QRBand1BeforePrint is being executed twice before moving on to the next procedure. After this the subsequent procedures are executed in the order expected. There are no statements in the procedure which would trigger this procedure to be executed again. In fact, I have even gone as far as commenting out all of the coding statements in the procedure [with the exception of a message statement so that I can see it hits the procedure] and it STILL loops thru it twice. I have viewed the form as text and searched for the procedure name(QRBand1BeforePrint) and it only shows up once (as an event off of the Band1). The QRBand1BeforePrint can only be found twice in the .pas file – once in the declaration above the implementation section and then again in the implementation section where the procedure actually resides.

I have spent HOURS trying to fix this, but as of now have no resolution. Any suggestions would be greatly appreciated.
 
Hard to tell, but if I was you I would look at the data. Maybe there is something unexpected in the data - maybe a blank record at the beginning or two identical records that you haven't realised. Put in messages to examine the data within each record.

Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top