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 back .. Thanks a ton for the tips . on more question .
quote:
SET HOLDLIST = PRINTONLY SET NODATA = 0 TABLE FILE CAR BY COUNTRY ON TABLE SAVE AS CTRYSAVE END -RUN -SET &Cols = 'COLUMNS '; -READ CTRYSAVE NOCLOSE &Country.A10. -REPEAT Read_It WHILE (&IORETURN EQ 0); -SET &Cols = &Cols | '''&Country.EVAL'''; -READ CTRYSAVE NOCLOSE &Country.A10. -SET &Cols = IF &IORETURN EQ 0 THEN &Cols | ' AND ' ELSE &Cols; -Read_It -RUN
TABLE FILE CAR SUM RCOST ACROSS COUNTRY AS '' &Cols WHERE COUNTRY CONTAINS 'G' ON TABLE SET HTMLCSS ON ON TABLE SET PAGE NOLEAD ON TABLE SET STYLE * GRID=OFF, SIZE=9, $ ENDSTYLE END
quote:
If i use your code using ON TABLE HOLD and write a FILDEF command accordingly as suggested by ginny.
Will it work? Because i have tried it and the titles stil dont appear..
FILEDEF HOLDMAST DIR /RIP FILEDEF SALES DISK /RIP/APPL_PLN.ftm SET TITLE = ON SET HOLDATTR = ON SET HOLDMISS = ON SET MISSING = ON SET HNODATA = '0' SET ALL = PASS SET CENT-ZERO = ON SET NODATA = '0' TABLE FILE RIP/T_ORA_APPL_PLN_V BY PRIMARY_BPO ON TABLE HOLD AS CTRYSAVE FORMAT ALPHA END -RUN -SET &Cols = 'COLUMNS '; -READ CTRYSAVE NOCLOSE &Country.A50. -REPEAT LBL99 WHILE (&IORETURN EQ 0); -SET &Cols = &Cols | '''&Country.EVAL'''; -READ CTRYSAVE NOCLOSE &Country.A50. -SET &Cols = IF &IORETURN EQ 0 THEN &Cols | ' AND ' ELSE &Cols; -LBL99 -RUN TABLE FILE RIP/T_ORA_APPL_PLN_V BY LIFECYCLE_STAGE WHERE LIFECYCLE_STAGE NE 'NONE'; ON TABLE HOLD AS LFCYSAVE FORMAT ALPHA END -RUN -SET &Rows = 'ROWS '; -READ LFCYSAVE NOCLOSE &Bodytype.A50 -REPEAT LBL99X WHILE (&IORETURN EQ 0); -SET &Rows = &Rows | '''&Bodytype.EVAL'''; -READ LFCYSAVE NOCLOSE &Bodytype.A50 -SET &Rows = IF &IORETURN EQ 0 THEN &Rows | ' OVER ' ELSE &Rows; -LBL99X -RUN SET NODATA = '' SET ALL = PASS SET PRINTPLUS = ON SET CENT-ZERO = ON DEFINE FILE RIP/T_ORA_APPL_PLN_V BPOS/I8 = IF MULTI_BPOS GT 0 THEN 1 ELSE 0; LIFECYCLE_STAGE/A50 = IF LIFECYCLE_STAGE EQ 'NONE' THEN 'Other Lifecycles ' ELSE LIFECYCLE_STAGE; PRIMARY_BPO/A50 = IF PRIMARY_BPO EQ 'NONE' THEN 'Other BPO' ELSE PRIMARY_BPO; END -RUN TABLE FILE RIP/T_ORA_APPL_PLN_V SUM COMPUTE COUNS/I8 = IF APPLICATION_ID EQ '999999' OR LIFECYCLE_STAGE EQ 'Other Lifecycles' THEN 0 ELSE CNT.APPLICATION_ID; NOPRINT COMPUTE PCNT/D12.2 = IF APPLICATION_ID EQ '999999' OR LIFECYCLE_STAGE EQ 'Other Lifecycles' THEN 0 ELSE PCT.CNT.APPLICATION_ID; NOPRINT BY LIFECYCLE_STAGE SUM CNT.APPLICATION_ID AS '# Of Applications' COMPUTE PCNTA/D12.2 = ( CNT.APPLICATION_ID / ( TOTAL_NO_APPLICATIONS / CNT.APPLICATION_ID ) ) * 100; AS '% Of Applications' BY ALL.LIFECYCLE_STAGE AS 'Lifecycle stage' &Rows ACROSS PRIMARY_BPO AS '' COMPUTE COUNSE/I8 = COUNS; AS 'Total # of Applications' COMPUTE PCNTS/D12.2 = PCNT; AS 'Total % of Applications' &Cols ON TABLE SUBHEAD "APPLICATION PORTFOLIO PLANNING REPORT " FOOTING "Applications That Support Multiple BPOs : ON TABLE SET PAGE-NUM OFF ON TABLE COLUMN-TOTAL AS 'TOTAL' ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, PAGESIZE='A3', SQUEEZE=ON, ORIENTATION=LANDSCAPE, $ TYPE=REPORT, BORDER=LIGHT, FONT='ARIAL', SIZE=8, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, $ TYPE=TITLE, COLUMN=N1, FONT='ARIAL', SIZE=8, BACKCOLOR=RGB(153 153 153), STYLE=BOLD, HEADALIGN=BODY, $ TYPE=TITLE, COLUMN=N2, BACKCOLOR=RGB(153 153 153), STYLE=BOLD, HEADALIGN=BODY, $ TYPE=TABHEADING, SIZE=10, COLOR='WHITE', BACKCOLOR=RGB(151 0 0), STYLE=BOLD, JUSTIFY=LEFT, $ TYPE=FOOTING, STYLE=BOLD, JUSTIFY=LEFT, $ TYPE=ACROSSVALUE, ACROSS=1, FONT='ARIAL', SIZE=8, COLOR='WHITE', BACKCOLOR=RGB(151 0 0), STYLE=BOLD, $ TYPE=GRANDTOTAL, BACKCOLOR=RGB(153 153 153), STYLE=BOLD, HEADALIGN=INTERNAL, $ TYPE=ACROSSTITLE, ACROSS=1, FONT='ARIAL', SIZE=8, COLOR='WHITE', BACKCOLOR=RGB(151 0 0), STYLE=BOLD, $ TYPE=ACROSSVALUE, ACROSS=1, FONT='ARIAL', SIZE=8, COLOR='WHITE', BACKCOLOR=RGB(151 0 0), STYLE=BOLD, $ TYPE=TITLE, ACROSSCOLUMN=N1, FONT='ARIAL', SIZE=8, BACKCOLOR=RGB(153 153 153), STYLE=BOLD, $ TYPE=TITLE, ACROSSCOLUMN=N2, FONT='ARIAL', SIZE=8, BACKCOLOR=RGB(153 153 153), STYLE=BOLD, $ ENDSTYLE END
The CAR master doesn't have any TITLE keywords in it. Try this:
SET HOLDATTR=ON
TABLE FILE GGSALES
SUM DOLLARS
BY REGION
ON TABLE HOLD FORMAT ALPHA
END
TABLE FILE HOLD
PRINT *
END
You will see that the second report does have the titles in the hold master.
Here is the doc for HOLDATTR:
quote:
HOLDATTR[S] Parameter The HOLDATTR parameter controls whether the TITLE and ACCEPT attributes in the original Master File are propagated in the HOLD Master. This does not affect the way fields are named in the HOLD Master File. You can also specify the parameter as HOLDATTRS. The settings are:
ON Uses the TITLE attribute as specified in the original Master File in HOLD files in any format. The ACCEPT attribute, however, will be propagated to the HOLD Master only for HOLD files in FOCUS format.
OFF Does not use the TITLE or ACCEPT attributes from the original file. The HOLD Master will not contain these attributes.
FOCUS Uses the TITLE and ACCEPT attributes only for HOLD files in FOCUS format. FOCUS is the default.
Thank you very much for your patience and resolutions . Please see the code below.
TABLE FILE RIP/T_ORA_APPL_PLN_V BY PRIMARY_BPO ON TABLE HOLD AS CTRYSAVE FORMAT ALPHA END -RUN -SET &Cols = 'COLUMNS '; -READ CTRYSAVE NOCLOSE &Country.A50. -REPEAT LBL99 WHILE (&IORETURN EQ 0); -SET &Cols = &Cols | '''&Country.EVAL'''; -READ CTRYSAVE NOCLOSE &Country.A50. -SET &Cols = IF &IORETURN EQ 0 THEN &Cols | ' AND ' ELSE &Cols; -LBL99 -RUN TABLE FILE RIP/T_ORA_APPL_PLN_V BY LIFECYCLE_STAGE WHERE LIFECYCLE_STAGE NE 'NONE'; ON TABLE HOLD AS LFCYSAVE FORMAT ALPHA END -RUN -SET &Rows = 'ROWS '; -READ LFCYSAVE NOCLOSE &Bodytype.A50 -REPEAT LBL99X WHILE (&IORETURN EQ 0); -SET &Rows = &Rows | '''&Bodytype.EVAL'''; -READ LFCYSAVE NOCLOSE &Bodytype.A50 -SET &Rows = IF &IORETURN EQ 0 THEN &Rows | ' OVER ' ELSE &Rows; -LBL99X -RUN
What i am trying to do is i am doing
ROWS OVER for the field LIFECYCLE_STAGE
COLUMN AND for hte field PRIMARY_BPO
But in your example , you are holding the data and displaying it in a different hold table file request.
That is fine.
But , ginny , I am using the two fields
PRIMARY_BPO and LIFECYCLE_STAGE generated in the hold file in the TABLE FILE RIP/T_ORA_APPL_PLN_V
and I used SET HOLDATTR = ON , the titles were not getting displayed.
I even used the FILEDEF command suggested by you and checked hte temporary master file in te directory . In the temporary Master file , I added the TITLE keyword . Then also , the TITLE is not appearing in the report.
1. There is no TABLE against the HOLD files (the final TABLE is against an existing file), so HOLDATTR does not come into play. 2. Since all the fields are NOPRINT or have explicit column titles specified (AS '...'), the TITLE values in the MFD are immaterial. 3. I suspect you really want the ACROSS columns to represent the full set of Code values, but you wish to display a Decription field from the code lookup table (rather than the Code) as the ACROSS caption. The clean way to do that is via MATCH FILE, as suggected earlier.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
I think that you need to take a step back and actually LOOK at what you are doing. From your inital listing of code you are -
Retrieving every possible value of PRIMARY_BPO and building a line of code to use COLUMNS syntax then Retrieving every possible value of LIFECYCLE_STAGE and building a line of code, this time for ROWS syntax then you have your actual report.
You do not reuse the files that you are temporarily holding so you do NOT need to use HOLD, use SAVE instead. HOLD creates a .mas and SAVE doesn't - you don't TABLE against either temporary file so you don't need the mas.
In your code you should use the lines of code you built, within the actual context of the BY for the field to which it relates. So -
BY PRIMARY_BPO &Rows ACROSS LIFECYCLE_STAGE &Cols
and not what you had -
BY ALL.LIFECYCLE_STAGE AS 'Lifecycle stage' &Rows ACROSS PRIMARY_BPO AS '' COMPUTE COUNSE/I8 = COUNS; AS 'Total # of Applications' COMPUTE PCNTS/D12.2 = PCNT; AS 'Total % of Applications' &Cols
Notice the computes between the required syntax.
It may be that you need to brush up on the basics a bit? rather than jumping head-long into some code that you haven't fully read and understood before trying to use it.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Hmmm thanks for the solution but i dont understand it.. ALL i need is a crosstab report where PRIMARY_BPO is an across column grouped by LIFECYCLE_STAGE
So , shouldnt it be the other way around ??
ACROSS PRIMARY_BPO BY LIFECYCLE_STAGE.
I know this is a very basic question?? but the layout of the report is correct after i use the above concept.
I have this bad habit of grasping things slowly..only after geting a good spanking..my brain starts working :P