Peter
msd heeft geschreven in bericht <37C106CA...@home.sti.jnu.edu.cn>...
I have tried in this way too, but the result is 0.
why? Who can tell me?
I used a integer variable "Sum_pages" in the frmReport. And
in it's OnStartPage event, Sum_pages:=PageNumber. Then after
prepare , I show the Sum_page , the result=0 , and run again the
result is 2(it's right).
I found that when i show the Sum_pages the prepare hasn't ended.
So it show 0 and the second time it shows the right answer because
prepare procedure has ended. So I think why the result is 0 as blow:
QuickRep1.Prepare;
QuickRep1.ReportTitle := 'This report has ' +
IntToStr(QuickRep1.QRPrinter.PageCount) + ' pages';
QuickRep1.QRPrinter.Free;
QuickRep1.QRPrinter := nil;
QuickRep1.Preview;
may be when it show the pagecount the prepare procedure had not ended.
Can you tell me how to descide when the prepare is ended? Or if I
can't I think I have to run preview 2 times to solve such problems. The
first time i get the total pages of the report and the second time I will
use the right count. But there will be a new problem. I dont't know how I
can close the preview window and preview again?
Help me , please.
Your friend , dong.
msd wrote in message <37C21D95...@home.sti.jnu.edu.cn>...
Dong.
TQuickRep.QRPreview.QRPrinter.PageCount
Hope this helps
regards/angshu
Try to put an "Application.ProcessMessages" just after de "Prepare"... Tell
me if it works.
Best regards,
Paulo Dias
IBM Global Services
Rio de Janeiro - Brazil
can get the exact result but i don't know when i will end the loop. Can you
help me.
actually it should've been ...
MyReportForm.QuickRep.Prepare;
m_nPageCount := MyReportForm.QuickRep.QrPrinter.PageCount;
I am looking at a report which results in more than 15 pages at this moment
.. which has got two Group bands (nested) ... (may be your substitute for
loop band)and a subdetailband ...
and instead of straight away calling
MyReportForm.QuickRep.Preview;
if i write the above written lines it works just fine ...
Hope this helps ...
if you can work it out someother way ... would you please let me know?
Thanks
Regards/angshu
Angshu wrote in message <7q0es8$lf...@forums.borland.com>...