Endless Pages / ResetFromPageNo
Hello
I' have a Main Report (two pass) with two subreports.
It works fine until following situation:
========================
The first subreport has a sum placed in a group footer.
When detecting that sum is printed on another page than last position i'm
changing the group of the last position to force a page break.
(I ensure position of underlaying dataest is same (eof) as before)
Unfortunately the new grouping situation is not recognized by pass two.
Terefore im calling ResetFromPageNo(1) from OnEndFirstPass to recalculate
everything.
(I have a FReset property set when recognizing the missing page break)
But the report will never finish.
In Preview when clicking a Button the endless pagecounting stops and the
Report is shown as expected.
Where is the right point to call a ResetFromPageNo() ??
What's going wrong ?
(Main report and second subreport has Autostop , first subreport does not ,
All Reports have Datapipe's )
Thanks for any help
Christian
I' have a Main Report (two pass) with two subreports.
It works fine until following situation:
========================
The first subreport has a sum placed in a group footer.
When detecting that sum is printed on another page than last position i'm
changing the group of the last position to force a page break.
(I ensure position of underlaying dataest is same (eof) as before)
Unfortunately the new grouping situation is not recognized by pass two.
Terefore im calling ResetFromPageNo(1) from OnEndFirstPass to recalculate
everything.
(I have a FReset property set when recognizing the missing page break)
But the report will never finish.
In Preview when clicking a Button the endless pagecounting stops and the
Report is shown as expected.
Where is the right point to call a ResetFromPageNo() ??
What's going wrong ?
(Main report and second subreport has Autostop , first subreport does not ,
All Reports have Datapipe's )
Thanks for any help
Christian
This discussion has been closed.
Comments
to prepare the report to be regenerated. The report will not regenerate
automatically.
As far as the second pass, it should loop through the pages which have been
generated, but if you've called ResetFromPageNo, there are no cached pages
from the first pass. The first pass is what is used to generate the report
pagination. During the second pass, what isn't happening, and what do you
expect the results to be for this group? Perhaps there is another way to
achieve your goal.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I want last position printed on the next side.
Therfore I change the group on the dataset as described (Group has option
to start on new page)
What I'm doing is to check on every region, need's to be on the same page as
last position, if PageNo is same as PageNo where
last position has been printed on. If not - I change the mentioned group to
force a pagebreak. before last position.
The problem is that it already has been printed.
What happens without ResetFromPageNo is that last position isn't printing on
any page.
What's wrong with calling ResetFromPageNo from OnEndFirstPass ?
Is there another method to recreate the Report from within the Report ?
Regards
Christian
of these situations, where you want to move the group's last detail band to
the next page with the orphaned group footer. There is a
Group.HeaderForOrphanedFooter property which is an alternative solution to
trying to move the detail band.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
the property is checked but I have to do position printing manually and
reprinting of every part with should be keept together on last page.
IMHO its much more flexible and usable when checking for desired comonents
if they have been printed on the same page during first pass. Again Isn't
there a way to force a complete new generation after first pass ? The
ResetFromPageNo will result in no output when printing directly to printer
(And endless printing (on Preview) if subreports exist. ).
Regeneration is no Problpem because most Documents only have 1 -3 Pages.
I'm a little bit in trouble now because Documents are Order and Billings and
some of them are not printed.
If this is not implemented please give me a hint where to start changing
code.
Thanks & best regards
Christian
pages, then you can regenerate the report and not have to worry about taking
a large performance hit, which you would have with a 100 page report.
To handle the worse case scenario, create a list of which records cause this
situation. Generate the report, until the first time you encounter an
orphaned group footer. Add the previous detail record to the list. Then,
start the report over. This time, when you get to that detail record, in
the DetailBand.BeforePrint, set Detailband.OutOfSpace := True. Now the
detail band will print on the next page, and then the orphaned fotter will
print. THen generate to the next time you encounter an orphaned group
footer. Then note that detail record in the list. Regenerate the report
from page 1, and repeat until the report is done.
Since you have short reports with only one special case to handle, then you
can do as shown in this demo:
http://www.digital-metaphors.com/tips/NoOrphanedFooters.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com