Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Report Request

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Report Request
 Login/Join
 
Silver Member
posted
All,

I am looking for the best way to handle the following, we have a need for a report to show up much like the following:

COUNTRY SUM of RCOST, other measures
CAR SUM of RCOST, other measures
MODEL SUM of RCOST, other measures

The MODEL lines would repeat for each car, and the CAR would repeat for each COUNTRY, and we do want them on separate lines.

Anybody with an idea of how I could handle this best?

This message has been edited. Last edited by: DW Marker,


WF 7.6.4
Windows XP and UNIX
 
Posts: 41 | Registered: November 26, 2008Report This Post
<JG>
posted
Try something along these lines

 
TABLE FILE CAR
SUM COUNTRY/A50 AS 'COL1'
    RCOST
 DCOST
COMPUTE ORDERA/I5= IF COUNTRY NE LAST COUNTRY THEN LAST ORDERA + 1 ELSE LAST ORDERA;
COMPUTE ORDERB/I5= 0;
COMPUTE ORDERC /I5= 0;
BY COUNTRY NOPRINT
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS DATA FORMAT ALPHA
END
-RUN
FILEDEF DATA DISK DATA.FTM (APPEND
-RUN
TABLE FILE CAR
SUM  COMPUTE COL1/A50= '  ' | CAR;
    RCOST
 DCOST
COMPUTE ORDERA/I5= IF COUNTRY NE LAST COUNTRY THEN LAST ORDERA + 1 ELSE LAST ORDERA;
COMPUTE ORDERB/I5= IF CAR NE LAST CAR THEN LAST ORDERB + 1 ELSE LAST ORDERB;
COMPUTE ORDERC /I5= 0;
BY COUNTRY NOPRINT
BY CAR NOPRINT
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS DATA FORMAT ALPHA
END
-RUN
TABLE FILE CAR
SUM COMPUTE COL1/A50= '    ' | MODEL;
    RCOST
 DCOST
COMPUTE ORDERA/I5= IF COUNTRY NE LAST COUNTRY THEN LAST ORDERA + 1 ELSE LAST ORDERA;
COMPUTE ORDERB/I5= IF CAR NE LAST CAR THEN LAST ORDERB + 1 ELSE LAST ORDERB;
COMPUTE ORDERC/I5= IF MODEL NE LAST MODEL THEN LAST ORDERC + 1 ELSE LAST ORDERC;
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS DATA FORMAT ALPHA
END
-RUN
TABLE FILE DATA
PRINT RETAIL_COST DEALER_COST
BY ORDERA NOPRINT
BY ORDERB NOPRINT
BY ORDERC NOPRINT
BY COL1
ON TABLE SET SHOWBLANKS ON
END

 
 
Report This Post
Silver Member
posted Hide Post
Thanks a bunch JG, that is exactly what I needed... I was on the right trsck but was stumbling over how to use the counters to get what I needed... I am sure after a few more hours of banging my head it would have appeared to me.


WF 7.6.4
Windows XP and UNIX
 
Posts: 41 | Registered: November 26, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Report Request

Copyright © 1996-2020 Information Builders