BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Qreport bug...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting
View previous topic :: View next topic  
Author Message
Bob Bedford
Guest





PostPosted: Wed Feb 28, 2007 7:41 pm    Post subject: Qreport bug... Reply with quote



Hi all,

I'm facing a strange problem in QR 3.5

GroupClient is the header for every group (every client)
GroupNewPage is an empty header I print since the second page as the text
shouldn't go too high,
PageFooter is the footer with page count....for every group.

Now the are called in order listed above but the NewPageBeforePrint isn't
called once (the 4th page) and I don't know why. So all my text in sticked
on the top of the page.
It's there any workaround ?
- GroupClientAfterprint is called only when a new client is detected
- GroupNewPageBeforeprint should be called on all pages and it's not on the
4th ????
- PageFooter is called on all pages and that's ok.

Strange thing: I do a prepare, all this code is executed, then I call
"preview" and the code is called again...why ? and with the trick of the
page/group count the preview isn't the same as the print result.

I've this code:
procedure TFormReport.GroupClientAfterPrint(Sender: TQRCustomBand;
BandPrinted: Boolean);
begin
groupcount.add('0');
groupname.add(QClientAddressClientName.Value);
inc(pagecount,pages);
inc(group);
pages := 0;
end;

procedure TFormReport.GroupNewPageBeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
PrintBand := pages > 0;
end;

procedure TFormReport.PageFooterBandBeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
inc(pages);
GroupCount.Strings[GroupCount.count-1] := inttostr(pages);
if(groupcount.Count > group) then begin
lblpage.caption := 'page
'+inttostr(pages)+'/'+groupcount[group-prepared];
lblname.Caption := groupname[group-1]; //print client name on right
end;
end;

Bob
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.