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.
you can make a dummy byfield to sort by, just to sort by, leaving your data field to appear in the report and be summed as usual DEFINE FILE CAR BYFIELD/I8=SALES; END TABLE FILE CAR SUM SALES WEIGHT SEATS BY HIGHEST BYFIELD NOPRINT BY COUNTRY BY CAR ON TABLE SUMMARIZE END
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Please note the difference when your TABLE command uses PRINT or SUM.
-* Example 1: PRINT
TABLE FILE CAR
PRINT SALES RCOST DCOST
BY COUNTRY
BY HIGHEST SALES NOPRINT
BY CAR
ON COUNTRY SUB-TOTAL
END
-*
-* Example 2: SUM
TABLE FILE CAR
SUM SALES RCOST DCOST
BY COUNTRY
BY HIGHEST TOTAL SALES NOPRINT
BY CAR
ON COUNTRY SUB-TOTAL
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
Thanks, but since I have two sort group, I could not have the the print field in my sort group, I want to get a total on "BDGT_AMT" as well as on "RMNG_AMT" Thanks,
TABLE FILE FI_BDGT_MAIN_INFO SUM ITEM_TOTAL_PRCH_COST_AMT AS 'TOTAL_SPENT' BY CPTL_GRP_CD BY CPTL_ITEM_CD BY BDGT_AREA_TXT BY BDGT_PROJ_TXT BY BDGT_AMT BY EXPN_GRP_TXT SUM ITEM_TOTAL_PRCH_COST_AMT AS 'TOTAL_SPENT' BY CPTL_GRP_CD BY CPTL_ITEM_CD BY BDGT_AREA_TXT BY BDGT_PROJ_TXT BY BDGT_AMT BY EXPN_GRP_TXT BY TOTAL COMPUTE RMNG_AMT/D20.2 = BDGT_AMT + SUM.ITEM_TOTAL_PRCH_COST_AMT;
It seems like, with the sample you provided, you have a fixed number (BDGT_AMT) which you do not want to SUM but you want to subtract the total of the purchases.
Here's an example doing something with the CAR file. I have a fixed number (QUOTA) from which I want to subtract the total sales and display the difference in a SUBFOOT/SUBTOTAL line.
I hope this helps.
DEFINE FILE CAR QUOTA/D12=40000; END TABLE FILE CAR SUM MAX.QUOTA AS 'QUOTA' NOPRINT SALES AS 'COUNTRY,SALES' NOPRINT COMPUTE QUODIF/D12=C02-C01; NOPRINT COMPUTE QUOFLG/A1=IF (QUODIF LT 0) THEN 'N' ELSE 'Y'; NOPRINT BY COUNTRY SUM SALES AS 'MODEL,SALES' BY COUNTRY BY CAR BY MODEL ON COUNTRY SUBFOOT "Country Quota:ON TABLE SET STYLE * TYPE=TITLE,BACKCOLOR=NAVY,COLOR=WHITE,$ TYPE=DATA,BACKCOLOR=TEAL,COLOR=WHITE,$ TYPE=SUBFOOT,HEADALIGN=BODY,BACKCOLOR=YELLOW,COLOR=BLACK,$ TYPE=SUBFOOT,LINE=1,OBJECT=TEXT,STYLE=BOLD,JUSTIFY=LEFT,$ TYPE=SUBFOOT,LINE=1,OBJECT=FIELD,STYLE=BOLD,JUSTIFY=RIGHT,$ TYPE=SUBFOOT,LINE=1,ITEM=4,BACKCOLOR=RED, COLOR=WHITE,JUSTIFY=RIGHT, WHEN=QUOFLG EQ 'N',$ TYPE=SUBFOOT,LINE=1,ITEM=4,BACKCOLOR=GREEN,COLOR=WHITE,JUSTIFY=RIGHT, WHEN=QUOFLG EQ 'Y',$ ENDSTYLE END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003