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.
Unforunately that didn't work whether I tried D4, D6, I7, P2 etc in the SUM ITEM_COUNT/D4 line. Did try all these already before I posted the message. :-(
next time. Yes, I have removed the NOPRINT before and the sum of the item_count for each of the record type is correct at 101 and 50. The line that tries to display the number is right after the "ON CARD_TYPE_CODE SUBFOOT" line where it shows "Total
You have to be careful how the program is coded. The value of ITEM_COUNT in your subfoot is based on the last BY statement, not the whole report.
Run this code to see what I mean:
TABLE FILE CAR
SUM SEATS NOPRINT
BY COUNTRY NOPRINT
PRINT COUNTRY CAR MODEL WHEELBASE
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT
ON COUNTRY SUBFOOT
"COUNTRY TOTAL SEATS: <SEATS"
ON TABLE SUBFOOT
"BAD TABLE TOTAL SEATS: <SEATS"
"GOOD TABLE TOTAL SEATS: <ST.SEATS"
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=8, $
ENDSTYLE
END
Result:
COUNTRY CAR MODEL WHEELBASE SEATS
--------- ---------- ------------------ ----------- -----
ENGLAND JAGUAR V12XKE AUTO 105.0 2
ENGLAND JAGUAR XJ12L AUTO 112.8 5
ENGLAND JENSEN INTERCEPTOR III 105.0 4
ENGLAND TRIUMPH TR7 85.0 2
COUNTRY TOTAL SEATS: 13
FRANCE PEUGEOT 504 4 DOOR 108.0 5
COUNTRY TOTAL SEATS: 5
ITALY ALFA ROMEO 2000 4 DOOR BERLINA 101.0 4
ITALY ALFA ROMEO 2000 GT VELOCE 92.5 2
ITALY ALFA ROMEO 2000 SPIDER VELOCE 88.6 2
ITALY MASERATI DORA 2 DOOR 102.3 2
COUNTRY TOTAL SEATS: 10
JAPAN DATSUN B210 2 DOOR AUTO 92.1 4
JAPAN TOYOTA COROLLA 4 DOOR DIX AUTO 93.3 4
COUNTRY TOTAL SEATS: 8
W GERMANY AUDI 100 LS 2 DOOR AUTO 105.3 5
W GERMANY BMW 2002 2 DOOR 98.4 5
W GERMANY BMW 2002 2 DOOR AUTO 98.4 4
W GERMANY BMW 3.0 SI 4 DOOR 106.0 5
W GERMANY BMW 3.0 SI 4 DOOR AUTO 106.0 5
W GERMANY BMW 530I 4 DOOR 103.8 5
W GERMANY BMW 530I 4 DOOR AUTO 103.8 5
COUNTRY TOTAL SEATS: 34
BAD TABLE TOTAL SEATS: 34
GOOD TABLE TOTAL SEATS: 70
The ST.SEATS is the correct way to have a grand total in a subfoot.
I don't know if this will help solve your problem. I see that you have ON CARD_TYPE_CODE SUBFOOT
and ON TABLE SUBFOOT
I assume you require totals in both subfoots, so my example shows you that.
(Did you know you can edit a previous posting you made by clicking the yellow folder icon at the bottom right of your posting, then put the code tags in so we can see the complete code).
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 think the problem is in the MFD. Your field is defined as P2. Try changing ITEM_COUNT/D20 to COMPUTE ITM_CT/D20=ITEM_COUNT; AS 'ITEM_COUNT' and then use ST.ITM_CT in your subfoot
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
Thanks, PBrightwell. I followed your suggestion and changed it a bit as well and it worked for my report. I suspected it had something to do with that P2 definition for the data but now I know how to display it thanks to you. Thank you to Francis as well for his suggestion.
The reason this happened is because you had the ITEM_COUNT field reformatted in the request. The ST. andTOT. prefixes look at the very first instance of the field ITEM_COUNT, which is a P@ field. Whatever reformatting you specified, it would still be displayed as a P2 field. PBrightwell's solution works fine, because it creates a new unique field. You could also have used DEFINE to create and total this new field, or change the fieldsize in the MFD for this field.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007