Hello, I am running Crystal 8.5 hitting a SQL Server database.
Client needs to see a crosstab of hours worked and paycodes associated to hours based on the number of shifts worked during a work week. They only want to see people who have worked an excessive number of shifts (based on the employee type) during a single work week.
I have the crosstab working fine, but the suppression is not.
I have two groups in the report:
Group 1 is based on the employee ID.
Group 2 is based on the "applydate" field in the database (the day to which the hours worked are being applied) and is grouped by week.
The crosstab is placed in the header for group 1 to have it generated by employee ID. I originally suppressed group 1 header based on the number of "applydate" records in conjunction with the employee type using an IF..THEN statement, however, if the client wants to query more than one week the IF...THEN will only consider the first week in deciding whether or not to suppress the record.
So I really want Crystal to look at each week within the parameter time frame and, if ANY week has an excessive number of shifts, show the record. I only want the record to be suppressed if NONE of the weeks have an excessive number of shifts.
I have begun a series of formulas trying to force Crystal to recognize the datetimevar range week1, week2, etc. with the idea of using a series of IF...THENs. What I really want is a FOR EACH WEEK loop, but I am not sure how to get Crystal to recognize each instance of a group.
Here is what I want:
For each week,
If {employeestatus} = HRLY8 and distinctcount({applydate}, {applydate}, "weekly") < 6 then suppress = true else suppress = false.
Any help or suggestions appreciated.
Client needs to see a crosstab of hours worked and paycodes associated to hours based on the number of shifts worked during a work week. They only want to see people who have worked an excessive number of shifts (based on the employee type) during a single work week.
I have the crosstab working fine, but the suppression is not.
I have two groups in the report:
Group 1 is based on the employee ID.
Group 2 is based on the "applydate" field in the database (the day to which the hours worked are being applied) and is grouped by week.
The crosstab is placed in the header for group 1 to have it generated by employee ID. I originally suppressed group 1 header based on the number of "applydate" records in conjunction with the employee type using an IF..THEN statement, however, if the client wants to query more than one week the IF...THEN will only consider the first week in deciding whether or not to suppress the record.
So I really want Crystal to look at each week within the parameter time frame and, if ANY week has an excessive number of shifts, show the record. I only want the record to be suppressed if NONE of the weeks have an excessive number of shifts.
I have begun a series of formulas trying to force Crystal to recognize the datetimevar range week1, week2, etc. with the idea of using a series of IF...THENs. What I really want is a FOR EACH WEEK loop, but I am not sure how to get Crystal to recognize each instance of a group.
Here is what I want:
For each week,
If {employeestatus} = HRLY8 and distinctcount({applydate}, {applydate}, "weekly") < 6 then suppress = true else suppress = false.
Any help or suggestions appreciated.