Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ReportListener.PageNo not accurate?
Message
From
18/10/2006 16:54:36
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
ReportListener.PageNo not accurate?
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01163117
Message ID:
01163117
Views:
64
Hi Y'all,

Any idea if .PageNo is accurate during the processing of a report - at least at the detail row level?

My client has a printout where a "notice" ("Minimum Guarantee") prints part way through the report with "payments" before and after this "notice" line. They do not want this line to print as the very first line on the 2nd or 3rd page (etc) of the report (kinda like not wanting a subtotal line to print at the top of a page - looks funny because all the detail lines are on the previous page).

Bo Durban gave me some good ReportListener code that "bumps" detail lines from one page to the next if they are too close to the bottom of the page. The code worked "mostly" but it gets thrown off when there is a summary printing for the report (the code he suggested checks the value of .MaxHeightAvailable and if there is not enough room to print the payment row plus the "notice", they both get bumped to the next page).

So I changed tactics and instead did a two pass where I check to see if the payment just before the notice falls on the same page as the notice and if it does not, then the notice must be at the top of the next page e.g. payment of $500,000.00 falls on page 2 and "Minimum Guarantee" falls on page 3 and therefore, we should bump the payment ahead so they both fall on page 3 (on the next pass).

Trouble is, when I ran it the test, both of the rows had a value of 2 for the pageno (as pulled from the report object .PageNo). Note that I did the default code for .Render() first figuring that I would have to render the object before the .PageNo would be updated.

So is the page number not incremented after running .Render() when a detail overflows onto the next page?

Or maybe I cannot rely upon .PageNo and have to do this a totally different way.

Thanks,

Albert
Next
Reply
Map
View

Click here to load this message in the networking platform