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 have a fex that creates a FYTD report with the months across.
FYTD2016 Oct Nov Dec Jan Feb Mar Apr May...
$10 $12 $14 $10 $11 $13
I created a duplicate fex that puts the info into a PDF. When I run the fex the totals are as they appear. I have several such PDFs that I call with a compilation fex that puts them all in one report. However, when I run the fex that puts them all in one report, the last dollar amount for the Fiscal year is placed in the remaining months. As a result my report looks like:
FYTD2016 Oct Nov Dec Jan Feb Mar Apr May...
$10 $12 $14 $10 $11 $13 $13 $13
I'm not sure where to begin since the PDF fex works fine, but the compilation fex doesn't. The only thing the compilation fex does is to put them all on the same page with proper formatting. Why would a fex that creates a PDF run fine in stand alone mode, but change when called from another fex? I have two other similar fexes in being called by this compilation fex; one has the same problem and the other runs fine. The code in each is identical in formatting; the only difference is the fields being called.
Any suggestions on where I should be looking would be appreciated.This message has been edited. Last edited by: Pondog,
WebFOCUS 8.1.05 Windows, All Outputs
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015
That doesn't sound like anything I've experienced in the past. Can you post your code so that we can help you?
Also there should be no need to create 2 seperate fexes. I personally hate doing that because then you have twice as much to support and change down the road. If they two are as similar as you say they are, why not set the PCHOLD FORMAT to a variable like &WFFMT and pass the format depending on your needs?
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
I agree regarding the two separate fexes for one report issue. We're working to resolve that issue, however in the meantime we're going with two reports.
Below is the code of the compilation fex which pulls all the reports together into one PDF. As I mentioned, if I run each of the individual fexes by itself, they render the correct result. The PDF_net_colls_FYTD.fex and PDF_late_chgs_FYTD.fex are the ones exhibiting the strange behaviour. The PDF_gross_chgs_FYTD.fex uses the same code, but doesn't exhibit the strange behavior.
Can you also add PDF_net_colls_FYTD.fex, PDF_late_chgs_FYTD.fex and PDF_gross_chgs_FYTD.fex and their HTML output equivalents? 1 of those three with their HTML counter part would most likely suffice. Its the individual fexes you need to be looking at. Most likely it is some oversight that you are missing. What you are describing isn't something I would expect to be handled by the layout painter syntax.
To prove that its not the layout painter syntax, run PDF_net_colls_FYTD by itself. What is the result? What happens if the only thing you change is the "ON TABLE PCHOLD FORMAT PDF" line to "ON TABLE PCHOLD FORMAT HTML"? My guess is nothing happens differently when you do any of those things.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
I ran the PDF_net_colls_FYTD.fex with both "ON TABLE PCHOLD FORMAT PDF" and "ON TABLE PCHOLD FORMAT HTML" and the results were the same:
FYTD2016 Oct Nov Dec Jan Feb Mar Apr May...
$10 $12 $14 $10 $11 $13 $0 $0
I tried it again in the compilation fex and it repeats the value for March for the remaining months.
Here's the PDF_net_colls_FYTD.fex *****************************************
SET PRINTPLUS = ON
-INCLUDE IBFS:/WFC/Repository/PFS_KPIs/pfs_getdate_vars.fex
-DEFAULTH &FM=' '
-DEFAULTH &VPSTPDFY = ' '
-DEFAULTH &VPOSTPER = ' '
-READFILE PFSRPTPD
-SET &CFM = '&FM.EVAL';
-SET &PDFY = '&VPSTPDFY.EVAL';
-SET &PPER = '&VPOSTPER.EVAL';
DEFINE FILE PFSMETRICS ADD
HOLD_BLANK/A1=' ';
END
TABLE FILE PFSMETRICS
PRINT
COMPUTE CNTR/I2=LAST CNTR + 1; NOPRINT
COMPUTE HOLD_MONTH/P2= DECODE CNTR(1 01
2 02
3 03
4 04
5 05
6 06
7 07
8 08
9 09
10 10
11 11
ELSE 12);
BY HOLD_BLANK
BY FM NOPRINT
WHERE RECORDLIMIT EQ 12
ON TABLE HOLD AS MACGYVER FORMAT FOCUS INDEX HOLD_BLANK
END
JOIN BLANK WITH FM IN PFSMETRICS TO ALL HOLD_BLANK IN MACGYVER AS J1
DEFINE FILE PFSMETRICS
BLANK/A1 = ' ';
END
TABLE FILE PFSMETRICS
SUM
COMPUTE YTD_NCOLS/D10CB = IF FM EQ HOLD_MONTH THEN PFSMETRICS.PFSMETRICS.CASHCOLLS ELSE 0;
BY PFSMETRICS.PFSMETRICS.PSTPDFY
BY PFSMETRICS.PFSMETRICS.FM
BY PFSMETRICS.PFSMETRICS.FYMTH
BY HOLD_MONTH
WHERE ( PFSMETRICS.PFSMETRICS.PSTPDFY GE ((&VPSTPDFY.(FIND PFSRPTPD.PFSRPTPD.VPSTPDFY IN PFSRPTPD).VPSTPDFY:.)-2)
AND PFSMETRICS.PFSMETRICS.POSTPERIOD LE (&VPOSTPER.(FIND PFSRPTPD.PFSRPTPD.VPOSTPER IN PFSRPTPD).VPOSTPER:.));
ON TABLE NOTOTAL
ON TABLE HOLD AS H1
END
TABLE FILE H1
SUM YTD_NCOLS
COMPUTE YTD/D10CB MISSING ON = IF MAX.HOLD_MONTH EQ 1 THEN YTD_NCOLS ELSE
IF MAX.PSTPDFY EQ &P2FY THEN YTD_NCOLS + LAST YTD ELSE
IF MAX.PSTPDFY EQ &PFY THEN YTD_NCOLS + LAST YTD ELSE
IF MAX.PSTPDFY EQ &CFY AND MAX.HOLD_MONTH LE &CFM THEN YTD_NCOLS + LAST YTD
ELSE 0;
BY PSTPDFY
BY HOLD_MONTH
ON TABLE HOLD AS H1_TREND
END
DEFINE FILE H1_TREND
FYMTH/A3=DECODE HOLD_MONTH(01 'Oct'
02 'Nov'
03 'Dec'
04 'Jan'
05 'Feb'
06 'Mar'
07 'Apr'
08 'May'
09 'Jun'
10 'Jul'
11 'Aug'
12 'Sep'
ELSE 'ERR');
END
-RUN
TABLE FILE H1_TREND
SUM
MAX.YTD AS ''
ACROSS LOWEST FYMTH AS '' COLUMNS 'Oct' AND 'Nov' AND 'Dec' AND 'Jan' AND 'Feb' AND 'Mar' AND 'Apr' AND 'May' AND 'Jun' AND 'Jul' AND 'Aug' AND 'Sep'
FOR
PSTPDFY
'&P2FY.EVAL' AS 'FYTD &P2FY.EVAL' LABEL R1 OVER
'&PFY.EVAL' AS 'FYTD &PFY.EVAL' LABEL R2 OVER
'&CFY.EVAL' AS 'FYTD &CFY.EVAL' LABEL R3 OVER
RECAP Variance/D10.1%B=IF R3 NE 0 THEN (((R3 - R2) / R2) * 100) ELSE 0;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/WFC/Repository/Branding/np_gphc_theme.sty,$
TYPE=REPORT, WRAP=.72,$
TYPE=REPORT,
SIZE=7,
CALC-LOCATION=TOP, RIGHTGAP=0.03, LEFTGAP=0.03,
$
TYPE=DATA, COLUMN=N1, SIZE=7, JUSTIFY=LEFT, SQUEEZE = OFF, $
TYPE=DATA, ACROSSCOLUMN=N1, SIZE=7, JUSTIFY=RIGHT, SQUEEZE = 14.0, $
TYPE=TABHEADING, LINE=1, JUSTIFY=LEFT, $
TYPE=TABHEADING, LINE=1, OBJECT=TEXT, ITEM=1, SIZE=7, COLOR='WHITE', BACKCOLOR='GRAY', $
TYPE=ACROSSVALUE, ACROSS=1, SIZE=7, JUSTIFY=CENTER, $
TYPE=REPORT, OBJECT=STATUS-AREA, JUSTIFY=LEFT, PAGE-LOCATION=BOTTOM, $
ENDSTYLE
END
WebFOCUS 8.1.05 Windows, All Outputs
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015
We do compound reports and have encountered the issue you are describing where the fex runs correctly stand alone but not when included in the compound. Some things we have found that can cause this to happen is the same HOLD file name being used in more than one fex in the compound or commands that carry over from one fex to the next such as SET HOLDLIST PRINT ONLY.
I'll go back and look to see if I have anything that applies to what you're describing.
On a similar note; these PDFs that I'm creating initially came off of a single fex. For instance, the code for PDF_netcolls_FY.fex and PDF_netcolls_FYTD.fex initially came off of one fex in HTML format (net_colls_FY_FYTD.fex) where they were combined in an -HTMLFORM BEGIN section. This works fine if I'm only working in HTML but doesn't lend itself well to PDF format. Hence, I've been unsuccessful in putting net_colls_FY_FYTD into a PDF and have resorted to creating seperate PDF's for netcolls_FY and netcolls_FYTD.
I put two reports into one fex to save space, however, now I can't get the one fex into PDF form. Have you had any experience in developing a PDF for this scenario?
-Tony
WebFOCUS 8.1.05 Windows, All Outputs
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015
I'm working with three reports in one fex. I can get all three to work individually and, as you initially suggested, they can go to either HTML or PDF. I have an input &WFFMT variable that I use in "ON TABLE PCHOLD FORMAT &WFFMT" and in some formatting areas.
At the start of each report I have the following code which I use to comment out/in the formatting.
-DEFAULT &WFFMT='HTML'
-SET &CMT1 = IF &WFFMT = 'PDF' THEN ' ' ELSE '-*';
-SET &CMT2 = IF &WFFMT = 'HTML' THEN ' ' ELSE '-*';
With that in mind I utilized the "ON TABLE SET COMPOUND [OPEN|CLOSE]" and am actually able to get it to work in the HTML format. There's a few formatting issues I'll need to work out, but it essentially works. I can see the three reports I have in one fex. However, when I try to convert it to a PDF I only see the first report. The second and third report aren't coming through. I went back to the composer fex that pulls all the PDFs together and edited the DIMENSION for the component this fex pertains to, thinking that that the DIMENSION was too small for the report, but that didn't help.
Now, one question is; do I need to have the "&WFFMT" and "-SET &CMT1" code at the beginning of each report, or just at the beginning of the fex? The other question is; is there something special I'm overlooking when trying to use the "SET COMPOUND" for a PDF as opposed to HTML?
I appreciate all the help you've offered so far. This has been a learning experience.
Tony
WebFOCUS 8.1.05 Windows, All Outputs
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015
Here is an example using car... is this what you are doing? you might need to adjust your style sheet depending on PDF v HTML. Not sure how wide your report is, what styling you use. But this essentially how it should work. If you want to post your code, I can help better.
And yes, you would either need to comment out the one or two lines that are different. Or you could create separate sections. One for each and use GOTO to jump to the one you need.
-DEFAULT &WFFMT='PDF';
SET COMPOUND = OPEN NOBREAK
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
BY CAR
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
-IF &WFFMT EQ 'HTML' THEN GOTO :HTML_STYLE1
TYPE=REPORT, SIZE=7, CALC-LOCATION=TOP, RIGHTGAP=0.03, LEFTGAP=0.03, $
-GOTO :DONE_STYLE1
-:HTML_STYLE1
TYPE=REPORT, CALC-LOCATION=TOP,$
-:DONE_STYLE1
ENDSTYLE
END
SET COMPOUND = OPEN
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
BY CAR
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
-IF &WFFMT EQ 'HTML' THEN GOTO :HTML_STYLE2
TYPE=REPORT, SIZE=7, CALC-LOCATION=TOP, RIGHTGAP=0.03, LEFTGAP=0.03, $
-GOTO :DONE_STYLE2
-:HTML_STYLE2
TYPE=REPORT, CALC-LOCATION=TOP,$
-:DONE_STYLE2
ENDSTYLE
END
SET COMPOUND = CLOSE
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
-IF &WFFMT EQ 'HTML' THEN GOTO :HTML_STYLE3
TYPE=REPORT, SIZE=7, CALC-LOCATION=TOP, RIGHTGAP=0.03, LEFTGAP=0.03, $
-GOTO :DONE_STYLE3
-:HTML_STYLE3
TYPE=REPORT, CALC-LOCATION=TOP,$
-:DONE_STYLE3
ENDSTYLE
END
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Just noticed that you added your code earlier as well. I'll take a look at it in the morning. Hopefully the Compound Report functionality will get you there anyways though.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Hey Eric, I was out Thursday and Friday. In your COMPOUND statements I see you place them before the actual fex is called. When I reviewed the documentation I saw where the statement was in the ON TABLE section; i.e., "ON TABLE SET COMPOUND 'OPEN NOBREAK'"
I've tried moving the COMPOUND command as you've indicated and the HTML runs fine, but the PDF crashes. I'm posting the full code so you can see what I'm up against. I'm now getting a (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED:H1_TREND" I'm sure I'm overlooking something, but not sure what.
-INCLUDE IBFS:/WFC/Repository/PFS_KPIs/pfs_getdate_vars.fex
-SET ECHO = ALL
-DEFAULT &WFFMT='PDF'
-SET &CMT1 = IF &WFFMT = 'PDF' THEN ' ' ELSE '-*';
-SET &CMT2 = IF &WFFMT = 'HTML' THEN ' ' ELSE '-*';
-*****************************************
-* % of Net Revenue portion of the report
-*****************************************
SET COMPOUND = OPEN NOBREAK
TABLE FILE PFSMETRICS
SUM
COMPUTE AMT/D10.1%B = ((PFSMETRICS.PFSMETRICS.LATECHGS)/(PFSMETRICS.PFSMETRICS.NETREVENUE)*100); AS ''
ACROSS LOWEST PFSMETRICS.PFSMETRICS.FYMTH AS '' COLUMNS 'Oct' AND 'Nov' AND 'Dec' AND 'Jan' AND 'Feb' AND 'Mar' AND 'Apr' AND 'May' AND 'Jun' AND 'Jul' AND 'Aug' AND 'Sep'
BY PFSMETRICS.PFSMETRICS.PSTPDFY AS ''
WHERE PFSMETRICS.PFSMETRICS.PSTPDFY GE &P2FY;
ON TABLE SUBHEAD
"Hospital Late Charges % of Net Revenue"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
-*ON TABLE SET COMPOUND 'OPEN NOBREAK'
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/WFC/Repository/Branding/np_gphc_theme.sty,
$
&CMT1.EVAL TYPE=REPORT, WRAP=.72,$
&CMT1.EVAL TYPE=REPORT, SIZE=7, CALC-LOCATION=TOP, RIGHTGAP=0.03, LEFTGAP=0.03, $
&CMT1.EVAL TYPE=DATA, COLUMN=N1, SIZE=7, JUSTIFY=LEFT, SQUEEZE = OFF, $
&CMT1.EVAL TYPE=DATA, ACROSSCOLUMN=N1, SIZE=7, JUSTIFY=RIGHT, SQUEEZE = 14.0, $
&CMT1.EVALTYPE=TABHEADING, LINE=1, JUSTIFY=LEFT, $
&CMT1.EVAL TYPE=TABHEADING, LINE=1, OBJECT=TEXT, ITEM=1, SIZE=7, COLOR='WHITE', BACKCOLOR='GRAY', $
&CMT1.EVAL TYPE=ACROSSVALUE, ACROSS=1, SIZE=7, JUSTIFY=CENTER, $
&CMT2.EVAL TYPE=REPORT, CALC-LOCATION=TOP,$
&CMT2.EVAL TYPE=DATA, COLUMN=N1, SIZE=8, JUSTIFY=LEFT, SQUEEZE = OFF, $
&CMT2.EVAL TYPE=DATA, ACROSSCOLUMN=N1, SIZE=8, JUSTIFY=RIGHT, SQUEEZE = 14.0, $
&CMT2.EVAL TYPE=TABHEADING, LINE=1, JUSTIFY=LEFT, $
&CMT2.EVAL TYPE=TABHEADING, LINE=1, OBJECT=TEXT, ITEM=1, SIZE=9, COLOR='WHITE', BACKCOLOR='GRAY', $
&CMT2.EVAL TYPE=ACROSSVALUE, ACROSS=1, SIZE=8, JUSTIFY=CENTER, $
TYPE=REPORT, OBJECT=STATUS-AREA, JUSTIFY=LEFT, PAGE-LOCATION=BOTTOM, $
ENDSTYLE
END
-*****************************************
-*late_chgs_FY portion of the report
-*****************************************
SET COMPOUND = OPEN
TABLE FILE PFSMETRICS
SUM
COMPUTE AMT/D10CMB = PFSMETRICS.PFSMETRICS.LATECHGS; AS ''
ACROSS LOWEST PFSMETRICS.PFSMETRICS.FYMTH AS '' COLUMNS 'Oct' AND 'Nov' AND 'Dec' AND 'Jan' AND 'Feb' AND 'Mar' AND 'Apr' AND 'May' AND 'Jun' AND 'Jul' AND 'Aug' AND 'Sep'
FOR
PFSMETRICS.PFSMETRICS.PSTPDFY
'&P2FY.EVAL' AS 'FY &P2FY.EVAL' LABEL R1 OVER
'&PFY.EVAL' AS 'FY &PFY.EVAL' LABEL R2 OVER
'&CFY.EVAL' AS 'FY &CFY.EVAL' LABEL R3 OVER
RECAP Variance/D10.1%B=IF R3 NE 0 THEN (((R3 - R2) / R2) * 100) ELSE 0;
ON TABLE SUBHEAD
"Hospital Late Charges"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
-*ON TABLE SET COMPOUND 'NOBREAK'
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/WFC/Repository/Branding/np_gphc_theme.sty,
$
&CMT1.EVAL TYPE=REPORT, WRAP=.72,$
&CMT1.EVAL TYPE=REPORT, SIZE=7, CALC-LOCATION=TOP, RIGHTGAP=0.03, LEFTGAP=0.03, $
&CMT1.EVAL TYPE=DATA, COLUMN=N1, SIZE=7, JUSTIFY=LEFT, SQUEEZE = OFF, $
&CMT1.EVAL TYPE=DATA, ACROSSCOLUMN=N1, SIZE=7, JUSTIFY=RIGHT, SQUEEZE = 14.0, $
&CMT1.EVAL TYPE=TABHEADING, LINE=1, OBJECT=TEXT, ITEM=1, SIZE=7, COLOR='WHITE', BACKCOLOR='GRAY', $
&CMT1.EVAL TYPE=ACROSSVALUE, ACROSS=1, SIZE=7, JUSTIFY=CENTER, $
&CMT2.EVAL TYPE=REPORT, CALC-LOCATION=TOP,$
&CMT2.EVAL TYPE=DATA, COLUMN=N1, SIZE=8, JUSTIFY=LEFT, SQUEEZE = OFF, $
&CMT2.EVAL TYPE=DATA, ACROSSCOLUMN=N1, SIZE=8, JUSTIFY=RIGHT, SQUEEZE = 14.0, $
&CMT2.EVAL TYPE=TABHEADING, LINE=1, OBJECT=TEXT, ITEM=1, SIZE=9, COLOR='WHITE', BACKCOLOR='GRAY', $
&CMT2.EVAL TYPE=ACROSSVALUE, ACROSS=1, SIZE=8, JUSTIFY=CENTER, $
TYPE=TABHEADING, LINE=1, JUSTIFY=LEFT, $
TYPE=REPORT, OBJECT=STATUS-AREA, JUSTIFY=LEFT, PAGE-LOCATION=BOTTOM, $
ENDSTYLE
END
-*****************************************
-* late_charges_FYTD portion of the report
-*****************************************
-?&
-*-DEFAULTH &WFFMT='HTML'
-*
-*SET PRINTPLUS = ON
-*-INCLUDE IBFS:/WFC/Repository/PFS_KPIs/pfs_getdate_vars.fex
-DEFAULTH &FM=' '
-DEFAULTH &VPSTPDFY = ' '
-DEFAULTH &VPOSTPER = ' '
-READFILE PFSRPTPD
-SET &CFM = '&FM.EVAL';
-SET &PDFY = '&VPSTPDFY.EVAL';
-SET &PPER = '&VPOSTPER.EVAL';
-SET &CMT1 = IF &WFFMT = 'PDF' THEN ' ' ELSE '-*';
-SET &CMT2 = IF &WFFMT = 'HTML' THEN ' ' ELSE '-*';
SET COMPOUND = CLOSE
DEFINE FILE PFSMETRICS ADD
HOLD_BLANK/A1=' ';
END
TABLE FILE PFSMETRICS
PRINT
COMPUTE CNTR/I2=LAST CNTR + 1; NOPRINT
COMPUTE HOLD_MONTH/P2= DECODE CNTR(1 01
2 02
3 03
4 04
5 05
6 06
7 07
8 08
9 09
10 10
11 11
ELSE 12);
BY HOLD_BLANK
BY FM NOPRINT
WHERE RECORDLIMIT EQ 12
ON TABLE HOLD AS MACGYVER FORMAT FOCUS INDEX HOLD_BLANK
END
JOIN BLANK WITH FM IN PFSMETRICS TO ALL HOLD_BLANK IN MACGYVER AS J1
DEFINE FILE PFSMETRICS
BLANK/A1 = ' ';
END
TABLE FILE PFSMETRICS
SUM
COMPUTE YTD_LCHGS/D10CMB = IF FM EQ HOLD_MONTH THEN PFSMETRICS.PFSMETRICS.LATECHGS ELSE 0;
BY PFSMETRICS.PFSMETRICS.PSTPDFY
BY PFSMETRICS.PFSMETRICS.FM
BY PFSMETRICS.PFSMETRICS.FYMTH
BY HOLD_MONTH
WHERE ( PFSMETRICS.PFSMETRICS.PSTPDFY GE ((&VPSTPDFY.(FIND PFSRPTPD.PFSRPTPD.VPSTPDFY IN PFSRPTPD).VPSTPDFY:.)-2)
AND PFSMETRICS.PFSMETRICS.POSTPERIOD LE (&VPOSTPER.(FIND PFSRPTPD.PFSRPTPD.VPOSTPER IN PFSRPTPD).VPOSTPER:.));
ON TABLE NOTOTAL
ON TABLE HOLD AS H1
END
TABLE FILE H1
SUM YTD_LCHGS
COMPUTE YTD/D10CMB MISSING ON = IF MAX.HOLD_MONTH EQ 1 THEN YTD_LCHGS ELSE
IF MAX.PSTPDFY EQ &P2FY THEN YTD_LCHGS + LAST YTD ELSE
IF MAX.PSTPDFY EQ &PFY THEN YTD_LCHGS + LAST YTD ELSE
IF MAX.PSTPDFY EQ &CFY AND MAX.HOLD_MONTH LE &CFM THEN YTD_LCHGS + LAST YTD
ELSE 0;
BY PSTPDFY
BY HOLD_MONTH
ON TABLE HOLD AS H1_TREND
END
DEFINE FILE H1_TREND
FYMTH/A3=DECODE HOLD_MONTH(01 'Oct'
02 'Nov'
03 'Dec'
04 'Jan'
05 'Feb'
06 'Mar'
07 'Apr'
08 'May'
09 'Jun'
10 'Jul'
11 'Aug'
12 'Sep'
ELSE 'ERR');
END
-RUN
TABLE FILE H1_TREND
SUM
MAX.YTD AS ''
ACROSS LOWEST FYMTH AS '' COLUMNS 'Oct' AND 'Nov' AND 'Dec' AND 'Jan' AND 'Feb' AND 'Mar' AND 'Apr' AND 'May' AND 'Jun' AND 'Jul' AND 'Aug' AND 'Sep'
FOR
PSTPDFY
'&P2FY.EVAL' AS 'FYTD &P2FY.EVAL' LABEL R1 OVER
'&PFY.EVAL' AS 'FYTD &PFY.EVAL' LABEL R2 OVER
'&CFY.EVAL' AS 'FYTD &CFY.EVAL' LABEL R3 OVER
RECAP Variance/D10.1%B=IF R3 NE 0 THEN (((R3 - R2) / R2) * 100) ELSE 0;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
-*ON TABLE SET COMPOUND 'CLOSE NOBREAK'
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/WFC/Repository/Branding/np_gphc_theme.sty,
$
&CMT1.EVAL TYPE=REPORT, WRAP=.72,$
&CMT1.EVAL TYPE=REPORT, SIZE=7, CALC-LOCATION=TOP, RIGHTGAP=0.03, LEFTGAP=0.03, $
&CMT1.EVAL TYPE=DATA, COLUMN=N1, SIZE=7, JUSTIFY=LEFT, SQUEEZE = OFF, $
&CMT1.EVAL TYPE=DATA, ACROSSCOLUMN=N1, SIZE=7, JUSTIFY=RIGHT, SQUEEZE = 14.0, $
&CMT1.EVAL TYPE=TABHEADING, LINE=1, OBJECT=TEXT, ITEM=1, SIZE=7, COLOR='WHITE', BACKCOLOR='GRAY', $
&CMT1.EVAL TYPE=ACROSSVALUE, ACROSS=1, SIZE=7, JUSTIFY=CENTER, $
&CMT2.EVAL TYPE=REPORT, CALC-LOCATION=TOP,$
&CMT2.EVAL TYPE=DATA, COLUMN=N1, SIZE=8, JUSTIFY=LEFT, SQUEEZE = OFF, $
&CMT2.EVAL TYPE=DATA, ACROSSCOLUMN=N1, SIZE=8, JUSTIFY=RIGHT, SQUEEZE = 14.0, $
&CMT2.EVAL TYPE=TABHEADING, LINE=1, OBJECT=TEXT, ITEM=1, SIZE=9, COLOR='WHITE', BACKCOLOR='GRAY', $
&CMT2.EVAL TYPE=ACROSSVALUE, ACROSS=1, SIZE=8, JUSTIFY=CENTER, $
TYPE=TABHEADING, LINE=1, JUSTIFY=LEFT, $
TYPE=REPORT, OBJECT=STATUS-AREA, JUSTIFY=LEFT, PAGE-LOCATION=BOTTOM, $
ENDSTYLE
END
WebFOCUS 8.1.05 Windows, All Outputs
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015
That error message is telling me that your H1_TREND hold file was never created. Which means there was probably another error just above that. Either that or an empty file was created. What happens if you put "-EXIT" in right after "ON TABLE HOLD AS H1_TREND"? Do you get a different error? IF you take out the on table hold and just run that report the way you have it, are you getting any errors? Start working your way backwards from there. You should be able to find the problem. If your still having problems, feel free to post the full echo so that I can see all the errors.
ON TABLE SET COMPOUND OPEN NOBREAK ( No ticks needed) and SET COMPOUND = OPEN NOBREAK are two ways of doing the same thing. If you look in the documentation you will see both mentioned together. Its a personal preference really. I've done both depending on my mood.
Also, you don't need NOBREAK with CLOSE because there are no more reports to be added. But you need NOBREAK after every OPEN in which you do not want the report to automatically start on the next page.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
0 NUMBER OF RECORDS IN TABLE= 29 LINES= 3
(FOC3218) NOTE: REPORT WILL BE PANELED; TOTAL WIDTH IS: 10.13 INCHES
(FOC3269) PDF: CANNOT USE NOBREAK WITH PANELED REPORTS
(FOC3298) ERROR FOUND IN A COMPOUND REPORT
Compound Report is TERMINATING.....
I guess this would explain why it would run in HTML and not in PDF. I'm researching paneling.
Tony
WebFOCUS 8.1.05 Windows, All Outputs
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015
so the irritating thing about PDF is that you have a fixed width 8.5 inches minus margins (Looks like yours is portrait). Considering that your total width is 10.13 inches, you could probably just change everything to landscape for PDF and call it a day. Otherwise, you will have to start controlling the width of each column so that you don't go over your 8.5 inches (minus margins).
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
But why would compounding change the gross width of the PDF output for that report, from under 8 to over 10?
Going back to your full code, what happens if you permute the Report components so the problematic one comes first (and thus cannot inherit any unwanted influence from the others)?
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
This resulted in me getting the PDF I was looking for, sort of. I'm missing the last report (FYTD). I had initially edited the "SQUEEZE = OFF" and "SQUEEZE = 14.0" portions of code thinking they would result in the desired effect, but they didn't do anything.
I'm reviewing the code to see if I've misplaced something that would keep the last report from showing. Thanks a bunch!!!
WebFOCUS 8.1.05 Windows, All Outputs
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015
I found I had left of the "NOBREAK" on the second report's "SET COMPOUND = OPEN" and thus it was putting the last report on the next page. Duh!
Thanks a bunch for taking the time to work with me on this. It's been a learning experience. I've found that being new to WF, trying to figure out the code is like trying to put a puzzle together blindfolded. I can figure out the general shapes and how the pieces fit together after a lot of research, but seeing how they fit in the big picture eludes me.
Thanks a bunch, Tony
WebFOCUS 8.1.05 Windows, All Outputs
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015