BradCustom
IS-IT--Management
Hi,
I'm using Crystal Reports 2011 with an SQL database.
I'm trying to count the number of Workcenters who's utilization is equal to or below 75%. There are 39 different Workcenters in the report and it's grouped by Workcenter and Transaction Start Date. The Utilization spans over a date range selected be the user. The Utilization is calculated using the following formulas.
@GrandTotWCUtil
if (Sum ({@WCHoursWorkedLine}, {Work_Center.Work_Center}))=0
then 0
else
(Sum ({@WCHoursWorkedLine}, {Work_Center.Work_Center})/{@GrandTotWCCap})*100
@GrandTotWCCap
whileprintingrecords;
Global numbervar newtotalvar;
@WCHoursWorkedLine
DateDiff ('h',{Transaction_Data.Transaction_Start} ,{Transaction_Data.Transaction_End} )
@RTotWCCap
whileprintingrecords;
Shared numbervar WCC;
Global numbervar newtotalvar;
newtotalvar:= newtotalvar + WCC;
@TotWCCap
shared numbervar WCC :=
if (Sum ({@WCHoursWorkedLine}, {Transaction_Data.Transaction_Start}))>10 and
({Transaction_Data.Employee}) in ["396","044","378","049"]
then 16
else 8
Let me know if anyone has any ideas how I can do this. Thanks for your help!!
I'm using Crystal Reports 2011 with an SQL database.
I'm trying to count the number of Workcenters who's utilization is equal to or below 75%. There are 39 different Workcenters in the report and it's grouped by Workcenter and Transaction Start Date. The Utilization spans over a date range selected be the user. The Utilization is calculated using the following formulas.
@GrandTotWCUtil
if (Sum ({@WCHoursWorkedLine}, {Work_Center.Work_Center}))=0
then 0
else
(Sum ({@WCHoursWorkedLine}, {Work_Center.Work_Center})/{@GrandTotWCCap})*100
@GrandTotWCCap
whileprintingrecords;
Global numbervar newtotalvar;
@WCHoursWorkedLine
DateDiff ('h',{Transaction_Data.Transaction_Start} ,{Transaction_Data.Transaction_End} )
@RTotWCCap
whileprintingrecords;
Shared numbervar WCC;
Global numbervar newtotalvar;
newtotalvar:= newtotalvar + WCC;
@TotWCCap
shared numbervar WCC :=
if (Sum ({@WCHoursWorkedLine}, {Transaction_Data.Transaction_Start}))>10 and
({Transaction_Data.Employee}) in ["396","044","378","049"]
then 16
else 8
Let me know if anyone has any ideas how I can do this. Thanks for your help!!