• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Report Builder Paging

New Here ,
Jul 06, 2006 Jul 06, 2006

Copy link to clipboard

Copied

I am trying to get specific control over the page numbers that print in my report. I am using the Report Header band for a cover sheet and muti-page invoices (grouped on invoice number) follow. I want each invoice group to have its own page numbering: "Page X of Y". All of the groups work except the first - its count is off by one too many because it counts the cover sheet.

Is there any way to subtract 1 from the page number in only the first report group?

I also want the coversheet to have the total number of pages. I can't get it to add this correctly, even when using the Evaluation Time parameter.

Also, is there a reference somewhere that details all of the built-in fields - or is there only the few I've found in help?
TOPICS
Reporting

Views

4.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 07, 2006 Jul 07, 2006

Copy link to clipboard

Copied

This should work for you:

1. For the Report Header, add a "Print When" condition of: calc.PAGE_NUMBER IS 1
2. For the remaining sections, add a "Print When" conditin of calc.PAGE_NUMBER GT 1
3. In the page footer, change: calc.PAGE_NUMBER to: calc.PAGE_NUMBER -1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 07, 2006 Jul 07, 2006

Copy link to clipboard

Copied

I'm sorry, but I don't really understand this reply. When using "PAGE_NUMBER -1" in the footer, all group sections, other than the first, are correct. The first group section is off by +1 as it is counting the cover page.

Why do I want to use a "Print When" condition on the header (cover sheet) or any other band?

Tthanks!
Gary

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2007 Feb 03, 2007

Copy link to clipboard

Copied

Has anyone figured out how to do this yet? I'm having the same problem...basically, I don't want cover sheet included in the page count. There has to be a way to basically force a page count reset or to evaluate which group I am on so that I could at least hack the CALC.PAGE_NUMBER with a -1 for that group. If it's not possible, can I get this filed as an enhancement request for next version. I'm trying to convert an old MS Access report to CFReport and this is the only thing I can't do. Access allows you to force page breaks and numbering before and after bands, not just on grouping changes.

Help! Dean? Anyone?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

Has this issue been addressed in CF8? I still really need the ability to add a cover page (a whole page, with a page break following) which is not included in the page count of the first group.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

This is the way I handled page numbers when I have a cover page that I do not want to count:

<CFDOCUMENTITEM TYPE="footer">
<cfif cfdocument.currentpagenumber GT 1>
<cfset pnum = #cfdocument.currentpagenumber# - 1>
<cfoutput>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="center" BGCOLOR="##FFFFFF">
<TR>
<TD ALIGN="left" HEIGHT="30"><FONT SIZE="1" COLOR="##000000">#dateformat(now(), "mm/dd/yy")#</FONT></TD>
<TD ALIGN="right"><FONT SIZE="1" COLOR="##000000">Page #pnum#</FONT></TD>
</TR>
</TABLE>

</cfoutput>
</cfif>
</CFDOCUMENTITEM>

It looks at the current page number and if it is 1 then it does not print anything out. If it is greater than 1 it subtracts a 1 from the page number and uses that for the page number in the footer.

Does that help?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

Unfortunately, Mat, it does not help. This topic is referring specifically to the ColdFusion Report Builder and the cfreport tag rather than the cfdocument tag. I have to use the report builder in this case.

I believe the answer is that I have to upgrade to CF8. In poking around some, I saw somewhere that the new report builder does indeed support arbitrary page breaks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2007 Nov 15, 2007

Copy link to clipboard

Copied

Jeff,

Sorry I misunderstood the problem: Good luck with the report builder. Every time I try to use it I give up.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 15, 2007 Nov 15, 2007

Copy link to clipboard

Copied

Hi,

What happens when you put one calculated field on your report header (for displaying the current page number) and then put another calculated field on the report footer with an evaluation time set to report?.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 09, 2010 Jul 09, 2010

Copy link to clipboard

Copied

LATEST

The trick here is to create two separate boxes and use the print evaluation control.

(1) containing: "Page " & calc.PAGE_NUMBER & " of " in it

(2) the other with calc.PAGE_NUMBER

Now set the first to: Evaluation time: Now and the second to Evaluation Time: Report

This will then give you the desired effect.

Hope this helps.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation