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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I calculate page numbers and subtract the last 4 pages? 1

Status
Not open for further replies.
Aug 2, 2005
31
US
I am trying to callculate the total page numbers, subtract the last 4 pages, then use the result to suppress the headers (report header, page header) sections on the last 4 pages.

The items I want to display on the last 4 pages of the report ( is a static document from a subreport, or I can put these static info directly on the last 4 pages) does not need the headers, it has its own headers.

I am having difficulty coming up with this formula.

Thanks.

bons

 
If the four last pages are truly always four pages, then you could use a suppression formula like:

pagenumber in totalpagecount-3 to totalpagecount

-LB
 
Thanks LB. But does it matter if the last 4 pages are in a subreport, as in my case? Is that the formula you are just put up there. I have to try this out when I get to work this morning.
 
Should work. Please try it and then report back with any issues.

-LB
 
It works but for some reason, the suppressed headers is hidden behind the scene and not allowing the full page display, therefore the page is breaking up and extending into new pages, thus distorting the formula. I am using version 8.0 of CR. Is this a known issue that u are aware of? I am thinking maybe I shoud run available CR8 updates.

Please chime in. Thanks.
 
I cannot follow what you are doing. I am unclear whether you are using the formula in the main report or in the subreport. Please explain your report structure, including groups, and indicate where the subreport is located. Then identify on what sections you are applying the conditional suppression.

-LB
 
I did not think its going to be complicated. I am using the subreport at the group footer. The subreport has the four static pages. These pages are general terms and conditions, not from DB, just testboxes with the text. The text boxes are placed in details section, forming 4 pages on the subreport.

On the main report, the subreports are placed in report footer, since the only need to appear at the end of the contract document generated dynamically.

The suppression formula is (pagenumber in totalpagecount-3 to totalpagecount) is placed on Page Headers and Footers, and on report header.

That is the structure. Thanks.
 
Your response is still confusing me. You say that you are using the subreport at the group footer and then you refer to multiple subreports in the report footer.

Secondly, you say you are using the suppression formula on the page header and footer and on the report header. It would have no affect at all on the report header, which is at the beginning of the report. I'm guessing that you mean group footer or report footer here.

Please clarify whether this subreport containing the T and C is in a group footer or report footer, i.e., does your report have multiple contracts?

Also, please clarify whether you are attempting to use the conditional suppression within the section expert of the subreport or within the section expert of the main report (where it was intended to be used).

Finally, your description of the problem is very confusing:
It works but for some reason, the suppressed headers is hidden behind the scene and not allowing the full page display, therefore the page is breaking up and extending into new pages, thus distorting the formula.

In other words, I can't tell what the remaining problem is. I would like to help, but I can't seem to follow.

-LB
 
Subreport is in Report Footer

There are multiple contracts, always same T & C

suppression formular is in report header, page header, and page footer.

I have got this to work (not as I would like it though. The other problem I seem to have now is, I cant get the page numbers (page NofM) to pass from main report to the subreport.

This wouldn't have been a problem, but because the section where the page number is located is in one of the page footer that is suppressed.

To work around this, I created another page footer and created a boolean formula with suppression logic above -
pagenumber in totalpagecount-3 to totalpagecount .

This seem to work well. I think this is the best solution for me now, but I don't mind a better idea.
What I want is for Example,

if total pages is 12.

I want this second page footer to only print from page 8 - 12, since pages 8 - 12 is always available (T & C pages).

In my case, the boolean return false for pages 1 - 7 , and true from 8-12.

Any suggestions will be appreciated. Thanks.

-b

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top