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.
If I read your request correctly, one solution is to use a multiverb request:
TABLE FILE CAR
-* Add the 3 columns together (that's your A,B & C)
SUM
COMPUTE R_TOT/D12.2 = SALES+RCOST+DCOST; AS 'TOTAL LINE'
BY COUNTRY
-* Normal request
SUM SALES RCOST DCOST
ACROSS BODY
BY COUNTRY
ON TABLE SET STYLE *
-* move total column to be last
TYPE=REPORT, COLUMN=R_TOT, SEQUENCE=99, $
ENDSTYLE
END
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
what I need is across total seperately for A,B and C
product1 A + product2 A + product3 A = ACROSS TOTAL A product1 B + product2 B + product3 B = ACROSS TOTAL B product1 C + product2 C + product3 C = ACROSS TOTAL C
Thanks for you reply. But A,B and C are not columns(sorry I didn't mention that earlier), they are values coming of from a column(I have done across on the column for this report)
TABLE FILE TEST1 HEADING " <+0>AUDI<+0>BMW<+0>DATSUN<+0> " PRINT E02 AS 'DEALER,COST' E03 AS 'RETAIL,COST' E04 AS 'DEALER,COST' E05 AS 'RETAIL,COST' E06 AS 'DEALER,COST' E07 AS 'RETAIL,COST' COMPUTE DCTOT/D7=E02 + E04 + E06; AS 'TOTAL, DEALER, COST' COMPUTE RCTOT/D7=E03 + E05 + E07; AS 'TOTAL, RETAIL, COST' BY COUNTRY ON TABLE SET STYLE * TYPE=REPORT,GRID=OFF,$ TYPE=HEADING,COLSPAN=9,HEADALIGN=BODY,$ TYPE=HEADING,LINE=1,ITEM=1,OBJECT=TEXT,COLSPAN=1,JUSTIFY=CENTER,$ TYPE=HEADING,LINE=1,ITEM=2,OBJECT=TEXT,COLSPAN=2,JUSTIFY=CENTER,$ TYPE=HEADING,LINE=1,ITEM=3,OBJECT=TEXT,COLSPAN=2,JUSTIFY=CENTER,$ TYPE=HEADING,LINE=1,ITEM=4,OBJECT=TEXT,COLSPAN=2,JUSTIFY=CENTER,$ TYPE=HEADING,LINE=1,ITEM=5,OBJECT=TEXT,COLSPAN=2,JUSTIFY=CENTER,$ ENDSTYLE END -RUN -EXIT
Hope it helps,
WFConsultant
WF 8105M on Win7/Tomcat
Posts: 780 | Location: Florida | Registered: January 09, 2005
DEFINE FILE CAR
CONTINENT/A10 = IF COUNTRY EQ 'JAPAN' THEN 'ASIA' ELSE 'EEC';
SEDAN/I8=IF BODYTYPE EQ 'SEDAN' THEN SALES ELSE 0;
CONVERTIBLE/I8=IF BODYTYPE EQ 'CONVERTIBLE' THEN SALES ELSE 0;
ROADSTER/I8=IF BODYTYPE EQ 'ROADSTER' THEN SALES ELSE 0;
END
TABLE FILE CAR
SUM
SEDAN AS 'TOTAL,SEDAN'
CONVERTIBLE AS 'TOTAL,CONVERTIBLE'
ROADSTER AS 'TOTAL,ROADSTER'
BY CONTINENT
SUM SALES
ACROSS BODYTYPE AS '' COLUMNS SEDAN AND CONVERTIBLE AND ROADSTER
BY CONTINENT
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=SEDAN, SEQUENCE=97, $
TYPE=REPORT, COLUMN=CONVERTIBLE, SEQUENCE=98, $
TYPE=REPORT, COLUMN=ROADSTER, SEQUENCE=99, $
ENDSTYLE
END
Which is a slighlty different version from Kamesh.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Now I have A,B and C as columns and below is my code. I still couldn't get this to work properly.
Thank you ----------------
-OLAP ON -* File report.fex OLAP DIMENSIONS -* DIMENSIONS FILE TABLE1 Time Period: YEAR, QUARTER, MONTH, WEEK, DATE; PRODUCT NAME: PRODUCT_NAME; NAME: NAME; END TABLE FILE TABLE1 SUM A B C BY NAME ACROSS PRODUCT_NAME SUM A B C ROW-TOTAL BY NAME ACROSS PRODUCT_NAME HEADING "REPORT" ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE SET ONLINE-FMT HTML ON TABLE SET HTMLCSS ON ON TABLE SET AUTODRILL ON ON TABLE SET OLAPPANE TOP ON TABLE SET STYLE * UNITS=IN, PAGESIZE='SCREEN', LEFTMARGIN=0.000000, RIGHTMARGIN=0.000000, TOPMARGIN=0.000000, BOTTOMMARGIN=0.000000, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=ON, FONT='ARIAL', SIZE=9, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, RIGHTGAP=0.125000, TOPGAP=0.013889, BOTTOMGAP=0.027778, $ TYPE=TITLE, STYLE=BOLD, $ TYPE=TABHEADING, SIZE=12, STYLE=BOLD, $ TYPE=TABFOOTING, SIZE=12, STYLE=BOLD, $ TYPE=HEADING, SIZE=12, STYLE=BOLD, $ TYPE=FOOTING, SIZE=12, STYLE=BOLD, $ TYPE=SUBHEAD, SIZE=10, STYLE=BOLD, $ TYPE=SUBFOOT, SIZE=10, STYLE=BOLD, $ TYPE=SUBTOTAL, BACKCOLOR=RGB(210 210 210), $ TYPE=ACROSSVALUE, SIZE=9, $ TYPE=ACROSSTITLE, STYLE=BOLD, $ TYPE=GRANDTOTAL, BACKCOLOR=RGB(210 210 210), STYLE=BOLD, $ ENDSTYLE END
I removed the first across and report layout seems to work fine as designed, when I run it the first time. But when I do a selection by any of the dimensions, report layout goes haywire for example two or three A columns together and the name column goes somewhere. When I do another selection name column completely disappears.
I was able to make the Across Total Perfectly as desired. Below is the code. It turned out to be simple than I expected.
-OLAP ON -* File report.fex OLAP DIMENSIONS -* DIMENSIONS FILE TABLE1 Time Period: YEAR, QUARTER, MONTH, WEEK, DATE; PRODUCT NAME: PRODUCT_NAME; NAME: NAME; END TABLE FILE TABLE1 SUM A B C BY NAME ACROSS PRODUCT_NAME HEADING "REPORT" ON TABLE SET PAGE-NUM OFF ON TABLE ROW-TOTAL AS 'TOTAL' ON TABLE NOTOTAL ON TABLE SET ONLINE-FMT HTML ON TABLE SET HTMLCSS ON ON TABLE SET AUTODRILL ON ON TABLE SET OLAPPANE TOP ON TABLE SET STYLE * UNITS=IN, PAGESIZE='SCREEN', LEFTMARGIN=0.000000, RIGHTMARGIN=0.000000, TOPMARGIN=0.000000, BOTTOMMARGIN=0.000000, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=ON, FONT='ARIAL', SIZE=9, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, RIGHTGAP=0.125000, TOPGAP=0.013889, BOTTOMGAP=0.027778, $ TYPE=TITLE, STYLE=BOLD, $ TYPE=TABHEADING, SIZE=12, STYLE=BOLD, $ TYPE=TABFOOTING, SIZE=12, STYLE=BOLD, $ TYPE=HEADING, SIZE=12, STYLE=BOLD, $ TYPE=FOOTING, SIZE=12, STYLE=BOLD, $ TYPE=SUBHEAD, SIZE=10, STYLE=BOLD, $ TYPE=SUBFOOT, SIZE=10, STYLE=BOLD, $ TYPE=SUBTOTAL, BACKCOLOR=RGB(210 210 210), $ TYPE=ACROSSVALUE, SIZE=9, $ TYPE=ACROSSTITLE, STYLE=BOLD, $ TYPE=GRANDTOTAL, BACKCOLOR=RGB(210 210 210), STYLE=BOLD, $ ENDSTYLE END