Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Lengthy Subhead not considered in calculating the page count on groupby fiel

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Lengthy Subhead not considered in calculating the page count on groupby fiel
 Login/Join
 
Member
posted
I am calculating the PAGE COUNT based on GROUPBY field.
Example: In CAR table, I am displaying the page count for each and every country
For ENGLAND, I am displaying Page 1 of 3(as I have 3 cars) , likewise I am doing for each and every country.

Now the problem is, I have lengthier subhead and subfoot and due to that each group is extending to next page but page numbers are not getting changed.

Still for ENGLAND, it is displaying Page 1 of 3 (but I have 10 pages including subhead and subfoot).
Please help me in achieving this

---------------------------------------------------------------------------------------------------------
SET PAGE=OFF
TABLE FILE CAR
SUM CNT.CAR WITHIN COUNTRY NOPRINT
MODEL
BODYTYPE
COMPUTE COUNTER1/I9 = IF COUNTRY EQ LAST COUNTRY THEN COUNTER1+1
ELSE 1; NOPRINT
COMPUTE COUNTER2/I9 = C1; NOPRINT
BY COUNTRY
BY CAR PAGE-BREAK
ON CAR SUBHEAD
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
ON CAR SUBFOOT
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"test report"
"test report neW"
"test report old"
"Dummy report"
"Dummy report new"
FOOTING BOTTOM
"Group Page Count "Total page count ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
LEFTMARGIN=0.500000,
RIGHTMARGIN=0.500000,
TOPMARGIN=0.500000,
BOTTOMMARGIN=0.500000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
ENDSTYLE
END
---------------------------------------------------------------------------------------------------------

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS8
Windows 7
AHTML,Excel,PDF,HTML
 
Posts: 22 | Registered: October 12, 2009Report This Post
Virtuoso
posted Hide Post
Praneeth,
Please put your code between tags (use the right-most icon). In your FOOTING you have fields which are not shown...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Please find my code below

  

SET PAGE=OFF
TABLE FILE CAR
SUM  CNT.CAR WITHIN COUNTRY  NOPRINT
        MODEL
        BODYTYPE
COMPUTE  COUNTER1/I9  = IF COUNTRY EQ LAST COUNTRY THEN COUNTER1+1
                    ELSE 1; NOPRINT
COMPUTE  COUNTER2/I9  = C1;     NOPRINT
BY COUNTRY
BY CAR PAGE-BREAK
ON CAR SUBHEAD
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
"THIS IS A TEST HEADER TO SPAN ACROSS ALL COLUMNS AT THE TOP OF THE REPORt"
ON CAR SUBFOOT
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"THIS IS A TEST FOOTER TO SPAN ACROSS ALL COLUMNS AT THE BOTTOM OF THE REPORt"
"test report"
"test report neW"
"test report old"
"Dummy report"
"Dummy report new"
FOOTING BOTTOM
"Group Page Count <COUNTER1 of <COUNTER2"
"Total page count <TABPAGENO of <TABLASTPAGE"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
LEFTMARGIN=0.500000,
RIGHTMARGIN=0.500000,
TOPMARGIN=0.500000,
BOTTOMMARGIN=0.500000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
ENDSTYLE
END



WebFOCUS8
Windows 7
AHTML,Excel,PDF,HTML
 
Posts: 22 | Registered: October 12, 2009Report This Post
Master
posted Hide Post
Probably your best bet is to create a compound report. So your header and footer are entirely separate from the computed data portion. You can have the lengthy header on a page of its own and similarly for the footer, with the data portion starting at the top of page 2 and the page breaks computing correctly.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Member
posted Hide Post
quote:
Probably your best bet is to create a compound report. So your header and footer are entirely separate from the computed data portion. You can have the lengthy header on a page of its own and similarly for the footer, with the data portion starting at the top of page 2 and the page breaks computing correctly.


Even if I use compound report, I think page numbers will not be calculated based on sub headers and sub footers. In this case, also I will get Page 1 of 3 (for ENGLAND as I have 3 cars) but I have to get Page 1 of 10(including sub header and sub footer for ENGLAND)


WebFOCUS8
Windows 7
AHTML,Excel,PDF,HTML
 
Posts: 22 | Registered: October 12, 2009Report This Post
Platinum Member
posted Hide Post
Try "SET PRINTPLUS=ON"?


WebFOCUS 7.7.05 (Someday 8)
Windows 7, All Outputs
In Focus since 1983.
 
Posts: 103 | Registered: April 27, 2011Report This Post
Member
posted Hide Post
quote:
Originally posted by Kevin W:
Try "SET PRINTPLUS=ON"?


No SET PRINTPLUS will just enhance the displaying offered by WebFOCUS. My problem is subhead and subfoot are not being considered in calculating the group page numbers.


WebFOCUS8
Windows 7
AHTML,Excel,PDF,HTML
 
Posts: 22 | Registered: October 12, 2009Report This Post
Master
posted Hide Post
If you use the built-in page numbering you won't get a page number on the header page (which I would call a cover page)or on the footer page, but does that really matter in the long run?

You could in theory run the data part of the report first without printing it just to figure out the number of pages. Hold that number. The header page will always be page 1 and you calculate the data numbering to start at page 2. Getting really fancy you could also figure out a page number for the separate footer, but honestly, why bother?


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Member
posted Hide Post
quote:
Originally posted by George Patton:
If you use the built-in page numbering you won't get a page number on the header page (which I would call a cover page)or on the footer page, but does that really matter in the long run?

You could in theory run the data part of the report first without printing it just to figure out the number of pages. Hold that number. The header page will always be page 1 and you calculate the data numbering to start at page 2. Getting really fancy you could also figure out a page number for the separate footer, but honestly, why bother?


Yes, but in this case, I have SUBHEAD & SUBFOOT for each groupby field and I need to consider for all the records

Consider I have 3 CARS for ENGLAND, so in this case, I have calculate 3+3(3 SUBHEAD)+ 3(SUBFOOT)--so in total 9

So from beginning for ENGLAND I have to get
Page 1 of 9
Page 2 of 9
------
PAge 9 of 9

Can you please provide some example?


WebFOCUS8
Windows 7
AHTML,Excel,PDF,HTML
 
Posts: 22 | Registered: October 12, 2009Report This Post
Master
posted Hide Post
I just ran your code and what I see is the massive header followed by a single line of data followed by the footer. Then the header again, followed by a single line of data, followed by the footer, etc.

It would be helpful if you could give us an idea what the final output should look like. I was assuming that it was:

HEADER

ALL THE CALCULATED DATA

FOOTER

(not repeated)


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Member
posted Hide Post
quote:
Originally posted by George Patton:
I just ran your code and what I see is the massive header followed by a single line of data followed by the footer. Then the header again, followed by a single line of data, followed by the footer, etc.

It would be helpful if you could give us an idea what the final output should look like. I was assuming that it was:

HEADER

ALL THE CALCULATED DATA

FOOTER

(not repeated)


Yes I want like below

SUBHEADER
DATA
SUBFOOTER

SUBHEADER
DATA
SUBFOOTER

I Want repeated headings for each data similar to the code what I posted here.

The only issue is with Group Page numbers


WebFOCUS8
Windows 7
AHTML,Excel,PDF,HTML
 
Posts: 22 | Registered: October 12, 2009Report This Post
Master
posted Hide Post
Is the text in your subhead the same for each group? And the subfoot as well?

You are asking for some complex page numbering code that I'm afraid I don't have time to dig into.

How about just running separate reports for each group? That would make dealing with the huge headers and footers easier.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Member
posted Hide Post
quote:
Originally posted by George Patton:
Is the text in your subhead the same for each group? And the subfoot as well?

You are asking for some complex page numbering code that I'm afraid I don't have time to dig into.

How about just running separate reports for each group? That would make dealing with the huge headers and footers easier.


Yes I can break the report per group but for each record I want legnthy subheader and subfooter with correct page numbers


WebFOCUS8
Windows 7
AHTML,Excel,PDF,HTML
 
Posts: 22 | Registered: October 12, 2009Report This Post
Master
posted Hide Post
It looks to me like you are going to have to use a looping technique to get anywhere close to what you want. You can create a compound report as I suggested earlier and put this within a repeating loop. The result will be a separate PDF for each group but with some clever counters you should be able to carry the page numbers from one to the other and change the text in each of the headers to identify the group that each report references.

You didn't say if the group list is static or dynamic. If it is static you can create a permanent file that contains the selection criteria or group ID, one group on each line. If it is dynamic, then the first part of your program will need to create the list of groups.

The next part of the program will be a loop that reads the group ID from the previously created file and creates a compound report based on that ID.

I'm not going to write the code for you, but the basic structure would look like this, assuming that your groups are dynamic.

Step 1: Create the list of groups. Save the GROUP_ID list in format ALPHA as GROUPFILE

Step 2:
Create a file to hold PAGECOUNT

Step 3:

BEGIN REPEATING LOOP
READ NEXT GROUP_ID FROM GROUPFILE
READ LAST PAGE_NUM FROM PAGECOUNT

Step 3: Create compound report
HEADER
CALCULATE ALL THE DATA
USE COUNTERS TO INCREMENT PAGE_NUM
WHERE GROUP EQ GROUP_ID
FOOTER
SAVE AS AS PDF
UPDATE PAGE_NUM IN FILE PAGECOUNT

END REPEATING LOOP

This is probably not exactly what you had in mind to start with, and if you are using InfoAssist I'm not even sure if it's doable. But it will allow you to have those full-page headers and footers that seem to be the root of your problem while carrying the page numbering from one group to the next. If your output will eventually be printed then the resulting printed PDFs can be assembled as a single document with the page numbering correct. On the other hand, if each group is going to get just the portion of the document that relates to that group, then this method is actually superior.

You can get quite fancy with this by having multiple counters going. So you can have an overall page count for the entire document, which includes all groups, and a separate page count within the group like this:

Document Page 1    Group 1 Page 1
Document Page 2    Group 1 Page 2
Document Page 3    Group 1 Page 3
....
Document Page 15   Group 2 Page 1
Document Page 16   Group 2 Page 2
Document Page 17   Group 2 Page 3
....
Document Page 22   Group 3 Page 1
Document Page 23   Group 3 Page 2
Document Page 24   Group 3 Page 3

etc.


Good luck with your project.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Lengthy Subhead not considered in calculating the page count on groupby fiel

Copyright © 1996-2020 Information Builders