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.
Hi everyone! I have a user who wants to compound several reports but doesn't want the consecutive page numbering. She wants each report in the compound document to start with page 1. I've tried using tabpageno and focfirstpage independently, but it doesn't seem to work. Now you're asking then why compound the report? She needs the output all in one file. We are using WebFOCUS release 5.2.4 Any ideas?
Thanks and have a great day, Carol
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003
Hi Mickey, Still can't get it right, here's the simplified code..... I've tried it with a SET and a -SET
APP PREPENDPATH CARTST -SET &FOCFIRSTPAGE = 1 ; -RUN TABLE FILE CAR SUM COUNTRY BY COUNTRY ON TABLE PCHOLD FORMAT PDF OPEN HEADING CENTER "REPORT NUMBER 1" END -SET &FOCFIRSTPAGE = 1 ; -RUN TABLE FILE CAR SUM MODEL BY MODEL ON TABLE PCHOLD FORMAT PDF HEADING CENTER "REPORT NUMBER 2" END -SET &FOCFIRSTPAGE = 1 ; -RUN TABLE FILE CAR PRINT COUNTRY MODEL ON TABLE PCHOLD FORMAT PDF CLOSE HEADING CENTER "REPORT NUMBER 3" END
Thanks! Carol
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003
Hi reFOCUSing, I have not found a workaround for this problem and we are living with it for now since it's not a show stopper. I'm not sure if it's fixed in WF7, but will test that soon as I can. We have WF7 living on a standalone server and I'm going to be testing. I'll be happy to post my results.
Thanks, Carol
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003
The workaround! The trick is to manipulate the page number. It's important that the HEADING is after the COMPUTE REP_PAGE.
-SET &ECHO=ALL;
USE C:\ibi\apps\Samples\CENTORD.FOC END -RUN
SET PAGE-NUM=OFF SET ORIENTATION=LANDSCAPE -RUN
-*-- Report 1 --------------------------
SET COMPOUND = OPEN -RUN
TABLE FILE CENTORD SUM LINEPRICE BY PLANT BY PRODCAT HEADING "Sales Report " "Page<TABPAGENO" " " ON TABLE SET STYLE * TYPE=REPORT, TITLETEXT='Sales', $ TYPE=HEADING, STYLE=BOLD, COLOR=BLUE, $ ENDSTYLE ON TABLE PCHOLD FORMAT PDF END -RUN
-*-- Report 2 --------------------------
TABLE FILE CENTORD SUM QUANTITY COMPUTE REP_PAGE/I4 = TABPAGENO - &FOCNEXTPAGE + 1; NOPRINT BY PLANT BY PRODCAT HEADING "Inventory Report 1" "Page<REP_PAGE" " " ON TABLE SET STYLE * TYPE=REPORT, TITLETEXT='Inventory 1', $ TYPE=HEADING, STYLE=BOLD, COLOR=RED, $ ENDSTYLE ON TABLE PCHOLD FORMAT PDF END -RUN
-*-- Report 3 --------------------------
TABLE FILE CENTORD SUM QUANTITY COMPUTE REP_PAGE/I4 = TABPAGENO - &FOCNEXTPAGE + 1; NOPRINT BY PLANT BY PROD_NUM HEADING "Inventory Report 2" "Page<REP_PAGE" " " ON TABLE SET STYLE * TYPE=REPORT, TITLETEXT='Inventory 2', $ TYPE=HEADING, STYLE=BOLD, COLOR=ORANGE, $ ENDSTYLE ON TABLE PCHOLD FORMAT PDF END -RUN
-*-- Report 4 --------------------------
SET COMPOUND = CLOSE -RUN
TABLE FILE CENTORD SUM LINE_COGS COMPUTE REP_PAGE/I4 = TABPAGENO - &FOCNEXTPAGE + 1; NOPRINT BY PLANT BY PRODCAT HEADING "Cost of Goods Sold Report" "Page<REP_PAGE" " " ON TABLE SET STYLE * TYPE=REPORT, TITLETEXT='Cost of Goods Sold', $ TYPE=HEADING, STYLE=BOLD, COLOR=GREEN, $ ENDSTYLE ON TABLE PCHOLD FORMAT PDF END -RUN
Francis, Thanks for the workaround. I modified your code a little and figured I would share.
Since our reports could be in any order (don't know which is the first report). I added the COMPUTE of REP_PAGE to every report (with some changes) and then changed the HEADING to not use TABPAGENO.
Here are my changes: -* REP_PAGE was changed to this for all reports. COMPUTE REP_PAGE/I4 = IF &FOCNEXTPAGE EQ 0 THEN TABPAGENO ELSE TABPAGENO - &FOCNEXTPAGE + 1; NOPRINT
-* HEADING was changed to this for all reports. "Page<REP_PAGE of <TABLASTPAGE"
Posts: 406 | Location: Canada | Registered: May 31, 2004
Figured I would share this. When doing some searching on TABLASTPAGE I came across this case. Which uses REPAGE to workaround this problem for PDF. What's great is this solution will work for EXL2K, HTML and PDF with no custom coding. I'm sooo glad techsupport was so quick in telling me there is no workaround, when a solution is on the IBI site.
I cleaned the code up a bit:
-DEFAULT &WFFMT = PDF DEFINE FILE CAR BLANK/A1 = ' '; END -RUN -***************************** -* REPORT #1 -***************************** TABLE FILE CAR PRINT DEALER_COST RETAIL_COST BY BLANK NOPRINT REPAGE HEADING "Page "THIS IS REPORT #1" ON TABLE SET PAGE-NUM ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT &WFFMT OPEN END -RUN -***************************** -* REPORT #2 -***************************** TABLE FILE CAR PRINT STANDARD BODYTYPE BY BLANK NOPRINT REPAGE HEADING "Page "THIS IS REPORT #2 " ON TABLE SET PAGE-NUM ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT &WFFMT END -RUN -***************************** -* REPORT #3 -***************************** TABLE FILE CAR PRINT COUNTRY CAR MODEL BY BLANK NOPRINT REPAGE HEADING "Page "THIS IS REPORT #3 " ON TABLE SET PAGE-NUM ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT &WFFMT END -RUN -***************************** -* REPORT #4 -***************************** TABLE FILE CAR PRINT COUNTRY BY BLANK NOPRINT REPAGE BY CAR BY MODEL ON CAR PAGE-BREAK HEADING "Page "THIS IS REPORT #4 " ON TABLE SET PAGE-NUM ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT &WFFMT CLOSE END -RUN
This message has been edited. Last edited by: <Maryellen>,
Posts: 406 | Location: Canada | Registered: May 31, 2004
Thanks reFOCUSing, my user is very happy! Focal Point rules in getting answers, so many great developers out there and as always, many ways to do things in FOCUS.
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003
I'm not totally sure, but I think this has to be in a string to get translated. I have put this in the master layout and as far as I know, it takes overflow pages into account if put in the master page. But it's been a while since I even looked at it, so I may be wrong.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007