Focal Point
[CLOSED] regarding Display of multiple fields of two tables.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/161102061

June 23, 2009, 10:49 AM
kiran
[CLOSED] regarding Display of multiple fields of two tables.
Hi All,

suppose:
example--if i have two tables car1 and car2 and they are joined by a particular field say 'plant',now my question is i need to display the dealer cost and retail cost of both the car tables in the following format.
car1 car2
dealer_cost 120000 130000
retail_Cost 140000 134000

where the values dealer and retail cost are the sum values.

dealer_cost and retail_cost are the fields.
car1 and car2 are two tables.(joined by say 'plant')

please help me solve this problem.

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


WebFOCUS Version 7.6.7
windows
PDF
June 23, 2009, 11:07 AM
BlueZone
I believe this should be pretty close to what you are intending to get.

 
JOIN CLEAR *
JOIN PLANT IN CAR1 TO PLANT IN CAR2 AS JN1
-*
TABLE FILE CAR1
SUM
CAR1.SEG1.DEALER_COST CAR2.SEG1.DEALER_COST AS ''
OVER
CAR1.SEG1.RETAIL_COST CAR2.SEG1.RETAIL_COST AS ''
END



Best regards,
Sandeep Mamidenna


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
June 23, 2009, 02:41 PM
kiran
Hi sandeep,
thanks for your reply,but somehow i am not getting what i am looking for.

can u explain more precisely using an example.


WebFOCUS Version 7.6.7
windows
PDF
June 23, 2009, 02:52 PM
Francis Mariani
Sandeep's code is close to what you're looking for. This should do it:

JOIN CLEAR * 
JOIN PLANT IN CAR1 TO PLANT IN CAR2 AS JN1 

TABLE FILE CAR1 
SUM 
COMPUTE TXT1/A11 = 'dealer_cost'
CAR1.SEG1.DEALER_COST AS '' 
CAR2.SEG1.DEALER_COST AS '' 
OVER 
COMPUTE TXT2/A11 = 'retail_Cost'
CAR1.SEG1.RETAIL_COST AS '' 
CAR2.SEG1.RETAIL_COST AS '' 
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
June 23, 2009, 02:58 PM
Francis Mariani
JOIN CLEAR * 
JOIN PLANT IN CAR1 TO PLANT IN CAR2 AS JN1 

TABLE FILE CAR1 
SUM 
COMPUTE TXT0A/A10 = 'Measure'
COMPUTE TXT0B/A10 = 'CAR1'
COMPUTE TXT0C/A10 = 'CAR2'
OVER
COMPUTE TXT1/A11 = 'dealer_cost' AS ''
CAR1.SEG1.DEALER_COST AS '' 
CAR2.SEG1.DEALER_COST AS '' 
OVER 
COMPUTE TXT2/A11 = 'retail_Cost' AS ''
CAR1.SEG1.RETAIL_COST AS '' 
CAR2.SEG1.RETAIL_COST AS '' 
END

would be closer to what you're looking for.


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