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     [CLOSED] column totals need to display for each by field at the end of report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] column totals need to display for each by field at the end of report
 Login/Join
 
Gold member
posted
Hi All,

I want to display the total for each by field in totals section. Here is the example code

TABLE FILE CAR
PRINT
'CAR.BODY.SEATS' AS 'SEATS'
'CAR.BODY.DEALER_COST'
BY 'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL'
HEADING
""
FOOTING
"ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL'
END

In this example i want to display the dealer_cost based on the seat number in two columns like below i.e.
total: seatno - 2 dealer_cost - 101010$
seatno - 3 dealer_cost - 101010$

No need to display the description just numbers.

Please help me........ Thanks in advance.......!

WF 7.6.11, windows xp

Thakns,
Koti.

This message has been edited. Last edited by: Kerry,


WebFOCUS 8104/7703/769/764, Windows 7, Oracle 11g, DB2, QAD
 
Posts: 49 | Location: Chennai | Registered: May 20, 2008Report This Post
Expert
posted Hide Post
Something like this?

DEFINE FILE CAR
TOT2/D6 = IF SEATS EQ 2 THEN DEALER_COST ELSE 0;
TOT4/D6 = IF SEATS EQ 4 THEN DEALER_COST ELSE 0;
TOT5/D6 = IF SEATS EQ 5 THEN DEALER_COST ELSE 0;
END

TABLE FILE CAR
PRINT
'CAR.BODY.SEATS' AS 'SEATS'
'CAR.BODY.DEALER_COST'
BY 'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL'
HEADING
""
FOOTING
"TOTAL SEATS 2: <TOT.TOT2"
"TOTAL SEATS 4: <TOT.TOT4"
"TOTAL SEATS 5: <TOT.TOT5"
ON TABLE COLUMN-TOTAL 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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
TABLE FILE CAR
SUM DEALER_COST
ACROSS SEATS
BY CAR
BY MODEL
END


7.7.01,windows2008 R2
 
Posts: 65 | Registered: July 28, 2011Report This Post
Gold member
posted Hide Post
Hi Francis,

You are correct in this example. But in my case i have many number of rows under seats column its around 40 and these are displaying dynamically based on the car.

Please help me.......... thanks in advance.....!

Koti,
WF 7.6.11 windows xp.


WebFOCUS 8104/7703/769/764, Windows 7, Oracle 11g, DB2, QAD
 
Posts: 49 | Location: Chennai | Registered: May 20, 2008Report This Post
Expert
posted Hide Post
You could build something dynamic, though I'm not sure that this solves the "based on the car" requirement.

-SET &ECHO=ON;

TABLE FILE CAR
SUM
MIN.SEATS NOPRINT
BY SEATS
ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN

-SET &SEAT_COUNT = &LINES;

DEFINE FILE CAR

-REPEAT ENDREP1 &SEAT_COUNT TIMES

-READFILE H001

&SEATS.TOT/D6 = IF SEATS EQ &SEATS THEN DEALER_COST ELSE 0;

-ENDREP1
-CLOSE H001

END

TABLE FILE CAR
PRINT
'CAR.BODY.SEATS' AS 'SEATS'
'CAR.BODY.DEALER_COST'
BY 'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL'
HEADING
""
FOOTING
-REPEAT ENDREP2 &SEAT_COUNT TIMES

-
-READFILE H001
-SET &TOTF = '<TOT.' || LJUST(&SEATS.LENGTH, &SEATS, 'A10') || 'TOT';

"TOTAL SEATS &SEATS|: &TOTF"

-ENDREP2

ON TABLE COLUMN-TOTAL 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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Koti,
You wrote:
quote:
TABLE FILE CAR
PRINT
'CAR.BODY.SEATS' AS 'SEATS'
'CAR.BODY.DEALER_COST'
BY 'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL'
HEADING
""
FOOTING
"ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL'
END

Could you post your example again between the CODE tags (press on the right-most icon of the message window)?

Also, do I understand correctly that at the end of your output, you want to see totals of DEALER_COST for 2 values of SEATS? Or for all values of SEATS? SEATS not being a sort field?


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, 2006Report This Post
Expert
posted Hide Post
Are Koteswar and koti the same person?

-SET &ECHO=ON;

-* Determine dimension values to be shown it total rows
TABLE FILE CAR
SUM
MIN.SEATS NOPRINT
BY SEATS
ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN

-SET &SEAT_COUNT = &LINES;

-* Set up dimension total columns
DEFINE FILE CAR

-REPEAT ENDREP1 &SEAT_COUNT TIMES

-READFILE H001

&SEATS.TOT/D6 = IF SEATS EQ &SEATS THEN DEALER_COST ELSE 0;

-ENDREP1
-CLOSE H001

END
-RUN

-* Create report
TABLE FILE CAR
PRINT
'CAR.BODY.SEATS' AS 'SEATS'
'CAR.BODY.DEALER_COST'
BY 'CAR.COMP.CAR'
BY 'CAR.CARREC.MODEL'
HEADING
"Car Report"
" "

FOOTING

-* Set up dimension total rows
-REPEAT ENDREP2 &SEAT_COUNT TIMES

-READFILE H001
-SET &TOTF = '<TOT.' || LJUST(&SEATS.LENGTH, &SEATS, 'A10') || 'TOT';

"TOTAL SEATS &SEATS|: &TOTF"

-ENDREP2

ON TABLE COLUMN-TOTAL AS 'TOTAL'
END
-RUN


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     [CLOSED] column totals need to display for each by field at the end of report

Copyright © 1996-2020 Information Builders