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 using report caster to produce a whole bunch of reports as PDFs. The reports get sent to Xerox and are assembled into a pack before being printed double sided. The Xerox software joins the PDFs together before printing so if the first report is 3 sides (so one and a half pieces of paper), the 2nd reports starts on the back of the 2nd page. What I need to do is make sure that Report 1 is 4 sides, so report 2 starts on a new page.
Any ideas ?
I need a simple solution as I don't have the time to put in lots of code to sort this out. I have 40 odd reports !
Cheers RichardThis message has been edited. Last edited by: Lambo911,
There is no built in function that will print a report on the front page when using Duplex printing. The compound report may be on the back of one of a printed page. Solution: To address this issue, use the following example:
-* This code will tell if the page is odd or even if the last report ended on -* an odd page. We then want to print a blank page (report) before continue -* to the next report. -SET &PageDiv2 = (&Page / 2); -SET &EvenPageCount = &PageDiv2 * 2; -SET &PageTest = &PageDiv2 * 2; -IF &PageTest NE &Page THEN GOTO BlankPg ELSE GOTO OUT; -BlankPg TABLE FILE TestOutX PRINT DST.ListBillSummaryID NOPRINT ON TABLE SET STYLE * UNITS=IN, PAGESIZE='Letter', ORIENTATION=LANDSCAPE, SIZE=1, COLOR=WHITE, $ ENDSTYLE ON TABLE SET PAGE-NUM OFF -*ON TABLE PCHOLD AS IBS_TEST FORMAT PDF CLOSE ON TABLE PCHOLD AS IBS_TEST FORMAT PDF OPEN END -OUT
HTH
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
Posts: 252 | Location: USA | Registered: April 15, 2003
Since ReportCaster will only distribute the last report in a scheduled fex, you might be able to do something like this. If the original report ends on an odd page, the report is re-run with a final blank page. This may require more code modification than you'd prefer - especially if report performance is slow and an initial HOLD file would be practical in case a re-run is necessary to produce the blank page.
-SET &BLANK_PAGE = 'N';
-*
-REPLAY
TABLE FILE CAR
PRINT CAR MODEL
BY COUNTRY
-*
-IF &BLANK_PAGE EQ 'N' GOTO NO_BLANKPAGE ;
ON TABLE PAGE-BREAK AND SUBFOOT NEWPAGE
" "
"This page intentionally left blank."
-NO_BLANKPAGE
-*
ON TABLE SET BYDISPLAY ON
ON TABLE PCHOLD FORMAT PDF
END
-*
-RUN
-IF &BLANK_PAGE EQ 'Y' GOTO REPLAY_DONE ;
-* If FOCUS next page is even, then last page was odd and a blank page is needed.
-SET &BLANK_PAGE = IF IMOD(&FOCNEXTPAGE,2,'I2') EQ 0 THEN 'Y' ELSE 'N';
-IF &BLANK_PAGE EQ 'Y' GOTO REPLAY ;
-*
-REPLAY_DONE
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Richard, You do not say if you are running all the reports in a single caster job or multiple jobs.
The fact that you say that the Xerox actually assembles the report for printing implies that you are not generating a compound output PDF
look at the following
Make the report a compound pdf by adding an OPEN
TABLE FILE CAR "PAGE Heading" SUM COMPUTE SUM_SALES/D20 = SALES; AS 'SUM_SALES' BY COUNTRY PAGE-BREAK BY CAR
ON COUNTRY RECOMPUTE AS '*TOTAL' -*WHERE COUNTRY NE 'FRANCE' ON TABLE PCHOLD FORMAT PDF OPEN ON TABLE NOTOTAL ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $ ENDSTYLE END -RUN
Add the following to each report This will close the PDF adding a dummy page if needed -IF IMOD(&FOCNEXTPAGE -1 ,2,'I5') EQ 0 GOTO SKIPDUMMY; TABLE FILE CAR " This page is intentially Blank" BY COUNTRY NOPRINT ON TABLE PCHOLD FORMAT PDF CLOSE END -RUN -GOTO ENDJOB -SKIPDUMMY
SET EMPTYREPORT=OFF -RUN TABLE FILE CAR BY COUNTRY NOPRINT WHERE COUNTRY EQ 'USA' ON TABLE PCHOLD FORMAT PDF CLOSE END -RUN -ENDJOB
If you are creating a compound document already then you only need the purple bits
This comes from my experience from over 20 years ago when I had to do the same thing. There should be a Xerox printer command (some kind of escape sequence) that you use that will force report 2 to start on a new physical page. You might try looking in that direction.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
Here's another idea. Page counter TABLASTPAGE is used to determine when a blank page is needed. TABLASTPAGE must be in a heading or footing in order to make the value available for computations. A DUMMY field is used for creating the page break for the blank page. All TABLASTPAGE footings, and the headings and column titles on the blank page, are hidden by minimizing their size and making their text color white in the StyleSheet. The fact that, at the time of styling for headings and titles, COUNTRY will equal LAST COUNTRY only on a blank page is used for determining the conditional styling.
TABLE FILE CAR
SUM SALES/D8N
COMPUTE DUMMY/I5 = TABLASTPAGE ; NOPRINT
COMPUTE BLANK_PAGE/A1 = IF IMOD(TABLASTPAGE,2,'I2') NE 0 THEN 'Y' ELSE 'N'; NOPRINT
COMPUTE LAST_COUNTRY/A16 = LAST COUNTRY ; NOPRINT
BY TOTAL DUMMY NOPRINT
BY COUNTRY
BY CAR
BY MODEL
-* WHERE COUNTRY NE 'FRANCE';
ON DUMMY PAGE-BREAK AND SUBFOOT NEWPAGE
"</5 "
"This page intentionally left blank."
WHEN BLANK_PAGE EQ 'Y';
ON COUNTRY PAGE-BREAK
HEADING
"Page: <TABPAGENO </1 "
"Forcing even report page count for PDF duplex printing </2 "
FOOTING
"<TABLASTPAGE "
ON TABLE SET BYDISPLAY ON
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=HEADING, LINE=3, STYLE=BOLD, JUSTIFY=CENTER, $
TYPE=HEADING, SIZE=1, COLOR=WHITE, WHEN=COUNTRY EQ LAST_COUNTRY, $
TYPE=TITLE, SIZE=1, COLOR=WHITE, WHEN=COUNTRY EQ LAST_COUNTRY, $
TYPE=FOOTING, LINE=1, SIZE=1, COLOR=WHITE, $
TYPE=SUBFOOT, STYLE=BOLD, JUSTIFY=CENTER, $
ENDSTYLE
END
This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007