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.
In the example below, the report total's percentages do not make sense. The row total's percentges do are not correct.
What can I do to the program to resolve this?
Thanks,
Francis.
DEFINE FILE CAR
SALESD/D10 = SALES;
END
TABLE FILE CAR
SUM
SALESD NOPRINT
PCT.SALESD/D12.2% WITHIN CAR NOPRINT
BY COUNTRY NOPRINT
BY CAR
SUM
SALESD AS 'Sales'
PCT.SALESD/D6.2% WITHIN COUNTRY WITHIN SEATS AS '%'
BY COUNTRY NOPRINT
BY CAR
ACROSS SEATS
COMPUTE XTOT_SALESD/D15 = C1; AS 'Total'
COMPUTE PCT/D12.2 = C2; AS '%'
ON COUNTRY SUBHEAD
"COUNTRY: <COUNTRY"
ON COUNTRY SUBFOOT
" "
ON COUNTRY SUBTOTAL AS 'TOTAL'
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
I'm not quite sure what you are trying to do. I see that WebFOCUS is summing the %'s anf therefore giving you a value greater than 100%. However, I would just not include the % field in the SUBTOTAL since it will always be 100%.
As far as the TOTAL columns go, i'm not sure what you are trying to do with the COMPUTES. Are you trying to create a total for the row?
I also trimmed down your code a bit since you have unnecessary code. What you created is a multi-verb request and it is not necessary to do that. See this code below.
DEFINE FILE CAR SALESD/D10 = SALES; END
TABLE FILE CAR SUM SALESD AS 'Sales' PCT.SALESD/D6.2% WITHIN COUNTRY WITHIN SEATS AS '%' BY COUNTRY NOPRINT BY CAR ACROSS SEATS COMPUTE XTOT_SALESD/D15 = C1; AS 'Total' COMPUTE PCT/D12.2 = C2; AS '%'
ON COUNTRY SUBHEAD "COUNTRY: <COUNTRY" ON COUNTRY SUBFOOT " " ON COUNTRY SUBTOTAL SALESD AS 'TOTAL' END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
I can tell you how I cheat... i do my ACROSS calculations up front, in columns 1 and 2 with double verbs and noprints; Handy when the ACROSS summary calculation is complex and not just a total. SUM SALES NOPRINT COMPUTE WHATEVER/... NOPRINT BY COUNTRY SUM SALES ACROSS CAR AND COMPUTE TOTAL1/I8S=C1; AND COMPUTE TOTAL2/...=C2; BY COUNTRY END not elegant, but it works. and its not dependent upon the knowing the number of across items.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
The following code will get you everything EXCEPT for a proper GRANDTOTAL. If you can live without the GRANDTOTAL then this should do it for you.
DEFINE FILE CAR SALESD/D10 = SALES; END -*************************************** TABLE FILE CAR SUM SALESD NOPRINT BY COUNTRY NOPRINT SUM SALESD NOPRINT BY COUNTRY NOPRINT BY CAR SUM SALESD AS 'Sales' PCT.SALESD/D6.2 WITHIN COUNTRY WITHIN SEATS AS '%' BY COUNTRY NOPRINT BY CAR ACROSS SEATS COMPUTE XTOT_SALESD/D15 = C2; AS 'Total' COMPUTE PCT/D12.2 = C2 / C1 * 100; AS '%' -*************************************** ON COUNTRY SUBHEAD "COUNTRY: <COUNTRY" ON COUNTRY RECOMPUTE AS 'TOTAL' ON TABLE NOTOTAL END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
What is so difficult about your request is that you want the context of the PCT. calculation to change based on its position in the report (on a single row, in the row-total, on a subtotal line, or on a grand total line). The RECOMPUTE command does this nicely to COMPUTE fields but not to the PCT. SUBTOTAL and RECOMPUTE will only aggregate the values of the PCT. field. In later releases of WebFOCUS you can use some prefix operators in SUBFOOT lines to do something like you are trying to do but PCT. is not one of the prefix operators available.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
I've been able to RECOMPUTE my PCT column in "ON TABLE" fashion. But I have a problem: the output is PDF and I'm using this output in a coordinated PDF. I'm using MERGE=ON which pushes the total onto a separate page.