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.
I am trying to get the Page count in the report by doing -SET &CNT=1; -*SET PRINTPLUS=ON -REPEAT PRGLOOP 2 TIMES SET FOCFIRSTPAGE = 1 SET COMPOUND = OPEN TABLE FILE CAR ON TABLE SUBHEAD "Page HEADING "COUNTRY " PRINT COUNTRY ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT PDF END -RUN
SET FOCFIRSTPAGE = &FOCNEXTPAGE
TABLE FILE CAR ON TABLE SUBHEAD "Page HEADING "CAR" PRINT CAR ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT PDF END -RUN
-SET &COMPVAL=IF &CNT EQ 2 THEN 'CLOSE' ELSE ''; SET COMPOUND =&COMPVAL ; SET FOCFIRSTPAGE = &FOCNEXTPAGE TABLE FILE CAR ON TABLE SUBHEAD "Page HEADING "MODEL" PRINT MODEL ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT PDF END -RUN -SET &CNT=&CNT+1; -PRGLOOP -EXITThis message has been edited. Last edited by: <Kathryn Henning>,
Firstly, please place your code between code tags, the right hand red icon.
From the documentation: TABLASTPAGE is supported only for a single report, not pooled or compound reports. A separate page count is generated for each report in a compound report.
So this could only be achieved by using Document Composer and that syntax, where ibi-page-number and ibi-total-pages are available.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
In your loop you will have to manage the page number. At the start of the loop you set FOCFIRSTPAGE to 1 every time. This can be a variable. At the end of the loop you will set its value appropriately.
To get the total page count you will basically have to run the report twice. First run you will add a page counter variable to the loop. Second run you will use the page counter variable instead of TABLASTPAGE.
agree with Max. i would suggest that you set your LINES-PER-PAGE to some value that you are sure will fit on a page, taking into account WRAPping, number of lines taken up by your header/footer, phases of the moon, etc. Say you have 3 reports in your output; Run each of the 3 fex bits, just generating the report data lines, with ON TABLE HOLD AS ... Save each of the line counts. -SET &howmany1 = &LINES ; then divide that saved value by your lines-per-page setting (eg 60), to figure out the number of pages, and be sure to round UP. (i'm assuming you'll page-break after each output table); Sum up all three of your final page counts, and then that number is what you put in your footing in place of
<TABLASTPAGE.
This is how i do it, anyway.This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
TABLE FILE CAR ON TABLE SUBHEAD "Page <TABPAGENO of &&NOOFPAGE" HEADING "CAR" PRINT CAR ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT PDF OPEN NOBREAK END -RUN
TABLE FILE CAR ON TABLE SUBHEAD "Page <TABPAGENO of &&NOOFPAGE" HEADING "MODEL" PRINT MODEL ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT PDF CLOSE END -RUN