Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GF1 new page after conditional reset total page #

Status
Not open for further replies.

DiegoSedai

Technical User
Feb 3, 2003
8
CA
My report uses GF1 to list summaries of transaction amts by district groups. I need a new page after each GF1 summary section, but not for the final district summary since the report footer has the grand total for all districts. I can do this using the GF1 "new page after" value with the conditional formula:

(PageNumber+1 < TotalPageCount);

this does suppress the last page throw...

Problem: the last page has page number format of Page 2 of 3

But there are now only 2 pages. How can I reset the total page count since the &quot;last page&quot; doesn't ever print?

I tried setting the GF1 &quot;reset page number after&quot; value using a conditional suppression formula :

(PageNumber+1 = TotalPageCount);

This doesn't help... Maybe my page # logic is off or maybe you just can't mess with page numbers this way. Any ideas??

Diego
 
If you never plan to print the last page, why not replace the canned Page N of M function with a formula of your own;

&quot;Page &quot; + ToText(PageNumber,0,&quot;&quot;) + &quot; of &quot; + ToText((TotalPageCount -1),0,&quot;&quot;)

This will always ensure that the last (grand totals) page is exluded from the total page count.
 
Ehhhhxcellent!!! Works like a charm!! Thanks a bunch!
 
I expanded on this formula in case this is ever a 1 page report. I was getting Page 1 of 0.

if TotalPageCount <> 1 then
&quot;Page &quot; + ToText(PageNumber,0,&quot;&quot;) + &quot; of &quot; + ToText((TotalPageCount -1),0,&quot;&quot;) else
&quot;Page &quot; + ToText(PageNumber,0,&quot;&quot;) + &quot; of &quot; + ToText((TotalPageCount),0,&quot;&quot;)

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top