Home Subreports

Recalculation of Reportbuilder

edited March 2003 in Subreports
Hao to do that if I go to a specific page with ppViewer.GotoPage(PageNr) to
recalc all pages to this page, so like it does Ms Word. I have the problem,
that only so the Page has the correct data. Momentanly i do the folloing,
but it is not looks not good:

liPage := StrToInt(edtRecordNumber.Text);
ppViewer.LastPage;

laPage := ppViewer.AbsolutePageNo;

ppViewer.RegenerateReport;

while (liPage <> ppViewer.AbsolutePageNo) and (laPage <>

ppViewer.AbsolutePageNo) do

begin

if liPage > ppViewer.AbsolutePageNo then

ppViewer.NextPage

else

ppViewer.PriorPage;

end;



thank you



Klaus Astner

Comments

  • edited March 2003
    You should set the Report.PassSetting to psTwoPass. This way the report
    calculates the Report.AbsolutePageCount before the report generates to the
    screen device (TppViewer). Then you should be able to simply say
    Viewer.GoToPage(liPage) and not have to call Next and Prior. If you still
    can't get it to work, then send a simple example to
    support@digital-metaphors.com and we'll take a look at it to see what is
    going wrong.

    What version of ReportBuilder are you using? The latest version of RB is
    7.02.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.