chuchuchui
Technical User
using cr8.5, IBM Universe, and ODBC. Okay I work for an insurance company and I'm trying to total premiums on out auto policies. This is sort of a continuation of this thread I wasn't sure if I should continue it or post a new thread as this is sort of a different problem. Anyway, I have two tables that I am totaling in the first table, PA_COVERAGES_VEHICLENO, lists the premium info for each vehicle ins several fields e.g. COLLPREM, COMPPREM, LIABPDPREM. The other table is PA_COVERAGES_COVCD which I just have a SUM({PA_COVERAGES_COVCD.ENDTPREM}, {Policies.Policies_ID}) which works and get the correct numbers what I having trouble with is the first one. I have it grouped on Policies.Policies_ID. There are four tables linked like so: (table) POLICIES linked to PA_COVERAGES via field Policies.Policies_ID, PA_COVERAGES is linked to PA_COVERAGES_VEHICLENO via field pa_coverages_id, PA_COVERAGES_VEHICLENO is linked to PA_COVERAGES_COVCD via pa_coverages_id. I have each premium field changing any null value to a 0 and then have it look at the maximum:
maximum({@COLLPREM},{POLICIES.POLICIES_ID}) * .01 +
The .01 is due to the fact that all the numbers for some reason are multiplied by 100 in the system. Now the maximum is bringing me only the vehicle with the highest premium but I need to add all. I have this formula in the Group Header. I tried SUM but it seems to total everything more than once. Though I'm not sure what to do at this point to get it to total all the vehicles there is a VECHIELNO field in PA_COVERAGES_VEHICLENO and there is never more than 6 cars on any policy.
maximum({@COLLPREM},{POLICIES.POLICIES_ID}) * .01 +
The .01 is due to the fact that all the numbers for some reason are multiplied by 100 in the system. Now the maximum is bringing me only the vehicle with the highest premium but I need to add all. I have this formula in the Group Header. I tried SUM but it seems to total everything more than once. Though I'm not sure what to do at this point to get it to total all the vehicles there is a VECHIELNO field in PA_COVERAGES_VEHICLENO and there is never more than 6 cars on any policy.