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.
Heres my issue, I'm trying to create a compound report that shows the current page and the total number of pages on each page of the report. Normally, what I've done in the footing is "Page Does anyone have any ideas how do to this?
What I'm thinking I will have to do is concatenate the data sets together using MORE or MATCH FILE to create one large data set. I so don't know if playing with FOCFIRSTPAGE will help me.
Here is some sample code of what I'm trying to do:
SET COMPOUND = OPEN NOBREAK TABLE FILE CAR FOOTING "Page PRINT RETAIL_COST DEALER_COST BY COUNTRY BY CAR ON TABLE PCHOLD FORMAT PDF END
SET COMPOUND = OPEN NOBREAK TABLE FILE CAR FOOTING "Page SUM RETAIL_COST BY COUNTRY ON TABLE PCHOLD FORMAT PDF END
SET COMPOUND = CLOSE TABLE FILE CAR FOOTING "Page PRINT DEALER_COST BY CAR ON TABLE PCHOLD FORMAT PDF ENDThis message has been edited. Last edited by: <Mabel>,
Posts: 406 | Location: Canada | Registered: May 31, 2004
At the moment the only solution is to run the reports twice and use the final value of &focnextpage -1
I've moded the code for an example. Notice I'e removed the NOBREAK as this screws the page numbers, also added some PAGE_BREAK's on the BY fields to gen multiple pages
-SET &CNT=0; -SET &OFPAGE=0; -REPEAT ENDREPEAT 2 TIMES -SET &CNT=&CNT+1; -SET &PCHOLD=IF &CNT EQ 1 THEN 'HOLD' ELSE 'PCHOLD'; SET FOCFIRSTPAGE = 1 SET COMPOUND = OPEN TABLE FILE CAR FOOTING "Page <TABPAGENO of &OFPAGE" PRINT RETAIL_COST DEALER_COST BY COUNTRY PAGE-BREAK BY CAR ON TABLE &PCHOLD.EVAL FORMAT PDF END SET FOCFIRSTPAGE = &FOCNEXTPAGE -RUN TABLE FILE CAR FOOTING "Page <TABPAGENO of &OFPAGE" SUM RETAIL_COST BY COUNTRY PAGE-BREAK ON TABLE &PCHOLD.EVAL FORMAT PDF END -RUN SET FOCFIRSTPAGE = &FOCNEXTPAGE SET COMPOUND = CLOSE TABLE FILE CAR FOOTING "Page <TABPAGENO of &OFPAGE" PRINT DEALER_COST BY CAR PAGE-BREAK ON TABLE &PCHOLD.EVAL FORMAT PDF END -RUN -SET &OFPAGE=IF &CNT EQ 1 THEN &OFPAGE + &FOCNEXTPAGE -1 ELSE &OFPAGE; -ENDREPEAT
The reason is that the HOLD in the first loop through does not return the output to the user but runs the reports so that you can get the final page value that you need.
The second loop using PCHOLD generates the output that is returned to the user