There is a table PM (preventive maintenance) with columns PMNUM, LOCATION, NEXTDATE (MM/DD/YYYY), FREQUENCY....
suppose record is in this manner....
PMNUM LOCATION NEXTDATE FREQUENCY
PM8569 217.024 09/28/2012 3
PM7890 217.024 09/23/20113 12
PM4565 217.043 01/14/2012 3
PM7789 217.043 03/13/2012 3
PM8809 217.016 02/16/2012 6
Here frequency means that after every 3/6/12/1 months preventive maintenance needs to be done on that location.
i.e. if frequency is 3 then after every 3 months there should be preventive aintenance(PM) on that location. EG:: location is 217.024 and its month from date is 9th i.e. september and ffrequency is 3.Hence below september column in report Q must be printed and since frequency is 3 so after every three months Q must be printed below that colum too i.e below january,may.
The records must be printed in this format::
Page Header:
LOCATION JAN FEB MAR APR MAY JUN JUL AUG SEP
217.024 Q Q Q/Y
217.043 Q Q Q Q Q
217.016 S S
I have showed column only till SEP...I am doing PM (primitive maintenance) forecasting...Please Help ASAP.