jbecker614
Technical User
Using Crystal Reports 11
Pervasive Database
I need to create a fomula for a client and I could use a little assistance.
This is based on a table that has a record of employee hours worked based on pay dates. I need to calculate the average hours worked based on the previous 4 pay dates from a date parameter.
i.e.
Sample records in the data:
Emp # Hours Pay Date:
1 10.5 10/21/2005
1 17 10/07/2005
1 20 09/22/2005
1 16 09/08/2005
1 18.4 08/25/2005
The table would have this information for each employee and every pay date in the system. I can group the report by employee and list the pay dates in decending order. The client wants to have a parameter to select a date and then calculate the average from the 4 previous dates.
So the average formula should calculate 10.5 +17+20+16 / 4.
Any suggestions on how to select the 4 previous dates from the parameter selected starting date?
Pervasive Database
I need to create a fomula for a client and I could use a little assistance.
This is based on a table that has a record of employee hours worked based on pay dates. I need to calculate the average hours worked based on the previous 4 pay dates from a date parameter.
i.e.
Sample records in the data:
Emp # Hours Pay Date:
1 10.5 10/21/2005
1 17 10/07/2005
1 20 09/22/2005
1 16 09/08/2005
1 18.4 08/25/2005
The table would have this information for each employee and every pay date in the system. I can group the report by employee and list the pay dates in decending order. The client wants to have a parameter to select a date and then calculate the average from the 4 previous dates.
So the average formula should calculate 10.5 +17+20+16 / 4.
Any suggestions on how to select the 4 previous dates from the parameter selected starting date?