Focal Point
Sum Based On Value

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

November 17, 2005, 11:37 AM
jmcgeorge
Sum Based On Value
Dev Studio 5.2;
I am creating a report, and I have 2 columns: Class and Mileage. I want to add three additional columns (Car, Truck, Ambulance) that will put the value from Mileage based on the value from Class. For example, if 'Class' is less than 2000 then put 'Mileage' value into 'Car', if 'Class' is less than 3000 and greater than 1999, then put 'Mileage' value in 'Truck', else put 'Mileage' value in 'Ambulance'.

I am fairly new to this program, and I am not sure how to proceed.

Thanks!


Jeff
DevStudio, 5.2.6
Please be kind....I'm new at this!
November 17, 2005, 01:01 PM
Francis Mariani
Something like this?

DEFINE FILE MILEAGE
MILEAGE_C/D10 = IF CLASS LT 2000 THEN MILEAGE ELSE 0;
MILEAGE_T/D10 = IF CLASS FROM 2000 TO 2999 THEN MILEAGE ELSE 0;
MILEAGE_A/D10 = IF CLASS GE 3000 THEN MILEAGE ELSE 0;
END

TABLE FILE MILEAGE
PRINT
CLASS MILEAGE
MILEAGE_C MILEAGE_T MILEAGE_A
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