Two Pass report and masterdata over more than 1 page detection?
Fast-Reports 5.6.8 in Tokyo
I have a need to modify headers when data cross over in the next page and so on. Basically i need to modify a part of a memo field on the header
to say "continued on next page" , sounds silly but what I have to duplicate from a very old report.
I figure I have to do a two pass report possibly, then on one of the events of the header to check the masterdata band to see if it passes over into more than 1 page.
So if it crossed 3 pages
I would see something like
My Header text < Continued on next page >
My Header text < Continued on next page >
My Header text
That way first 2 pages get the < Continued on next page > added, while the 3rd page being the final page it was on, doesn't need it as it ended there.
I have a need to modify headers when data cross over in the next page and so on. Basically i need to modify a part of a memo field on the header
to say "continued on next page" , sounds silly but what I have to duplicate from a very old report.
I figure I have to do a two pass report possibly, then on one of the events of the header to check the masterdata band to see if it passes over into more than 1 page.
So if it crossed 3 pages
I would see something like
My Header text < Continued on next page >
My Header text < Continued on next page >
My Header text
That way first 2 pages get the < Continued on next page > added, while the 3rd page being the final page it was on, doesn't need it as it ended there.
Comments
Hmmm ok.... possibly I guess could use a preset variable to store? So first time its set thats the inital page its on... then on the other pages it checks to see to compare its page to the stored one to determine?
Ill see what I can go from there.
I can get it so a variable is set the first time to store the page #
then any page after that just compares its active page # to the one stored. If its greater than, modify the header.
I can get it working on the the 2page and so on... but can't nail down the 1st page know theres gonna be a 2nd page to it.
This is lazy mock up of what i'm trying to do.
The first page of the data knows there is a second page to it... so the first page header will have that note that this data band is continued to next page.
On the 2nd page in this instance, is the last page of the data. So there is no need for a modified header.. its "done" now.
Tried for about 3 hours today.. still no go. About 15 hrs into this now.
Just cant figure out how to make the very first instance of the header to change if there is more data to be printed for that band.
I've come up with 1001 ways to do this for every page after the first page instance.. but never can seem to trigger something to happen on the first page instance.
Even tried to hook into the query object to check record number vs record count.
My footer is only at the very end. So i can't use that to trigger anything.
You can't have dual header / footer for the same band.
100% stumped here.
Only thing I can think of is when the footer is hit, if there is anyway via the script language access each instance of my header for that band. So if five instances of it, the first four get modified to say "continued" on them while
leaving the 5th instance alone.
I am sure its something stupid simple but can't for life of me figure out wtf to do
The demo worked.. but once I tried it in my report, i get the on every page instance.. from first instance to last instance.
Two Pass Report
Footer I store <Page> as hEndPage Variable
then on the 2nd pass on my label I want to modify