November 17, 2005, 11:37 AM
jmcgeorgeSum 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!
November 17, 2005, 01:01 PM
Francis MarianiSomething 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