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 saving a report as pdf to disk. I added code so there will be an even number of pages using this code. If it is an odd number pages things work great but my issue is if it is an even number of pages how do I get the file to close without another page being created.
-IF IMOD(&FOCNEXTPAGE -1 ,2,'I5') EQ 0 GOTO OVER1; TABLE FILE FINAL BY TEMPHEAD NOPRINT HEADING " Blank Page " ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE SAVE AS 'BJKPDF' FORMAT &formtype1 CLOSE END -RUN -OVER1
Product WF 7.1.6 Windows Database Oracle outputs PDF, HTML, EXCEL
Ok I am creating Webfocus reports and appending about 10 reports together to send to our printshop. We print duplex to save paper so I need a blank page at the end of an odd page report so we don't put say a department meat on the back of a produce report. Like I said if I have an odd page report I use the code that was provided and that puts a extra page at the end making it an even number of pages. But if I have an even number page I can't seem to close the report that is build so far. I am doing this because this will save that department about 15 hrs a week in scanning documents and do all this by hand.
I haven't tried to duplicate it with the car file
Product WF 7.1.6 Windows Database Oracle outputs PDF, HTML, EXCEL
Well put. Thanks for your explanation. We'd have to us a file which is larger then the CAR file to demo this. But, I do see your very valid point here. I’ll try to look into that.
First thought is to track the pages, as you have and branch around an EMPTYREPORT as per your branching logic. Perhaps you can print a "This page was intentionally left blank (positive feedback) report instead of an EMPTYREPORT. You'd have to know before hand (perhaps &LINES to a HOLD file) how many lines / pages you have before you determine whether or not to CLOSE or NOBREAK your initial report.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
The key to a solution to this is to know how many page willoduced, so you can add a page when needed. If you cannot work out if you need an extra page, then here is a possibility.
A technique that we use here for a complex report, is to get the number of pages by checking the PDF document after its created. Then if its the wrong number of pages add a blank page to the produced document.
The command used is a unix command, but can be done from windows as well.
In WebFOCUS, you can use a loop of 2 to determine howmany pages (&LINES / LPP) and work with the result. The loop also sets the hold file as when counter = 1 then HOLD else PCHOLD it also sets the CLOSE of BREAK. Then brach around a PDFBOX (blank PDF report). It's "tricky" but doable.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
This checks for even number of pages -IF IMOD(&FOCNEXTPAGE -1 ,2,'I5') EQ 0 GOTO OVER1;
This code is what adds a page if odd number of pages in report. TABLE FILE FINAL BY TEMPHEAD NOPRINT HEADING " Blank Page MI102g" ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE SAVE AS 'BJKPDF' FORMAT &formtype1 CLOSE END -RUN -GOTO DODEPT1
-OVER1 This code with force the close on even number of pages but I have put "REMOVE THIS PAGE" so printshop can remove this page before printing. For them to remove this will be 30 secs rather than 15 hours. Can't force the close without printing something
TABLE FILE FINAL BY TEMPHEAD NOPRINT HEADING "REMOVE THIS PAGE" ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE SAVE AS 'BJKPDF' FORMAT &formtype1 CLOSE ON TABLE SET STYLE * UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $ TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=1, FONT='ARIAL', SIZE=28, STYLE=BOLD, $ ENDSTYLE END -RUN
Product WF 7.1.6 Windows Database Oracle outputs PDF, HTML, EXCEL