Hi all,
Fairly new to Crystal, I am trying to build a report to show averages.
Have found this formulae in another report.
whileprintingrecords;
numbervar GrpTsec;
local numbervar AverageFix:=GrpTsec/DistinctCount ({SW_CASE.swCaseId}, {SW_CASE.dsInboxAssignedTo});
numbervar LenOfDay;
Local numberVar days := truncate(AverageFix / LenOfDay);
Local numberVar hr := truncate((AverageFix-(days*lenOfDay))/3600);
Local numberVar min := truncate((AverageFix-((days*LenOfDay)+(hr*3600)))/60);
Local numberVar sec := (AverageFix-((days*LenOfDay)+(hr*3600)+(min*60)));
Totext(days,"###") + " Day(s) " + totext(hr,"##") + " hours " + totext(min,"##") + " minutes " + totext(sec,"##") + " seconds";
averagefix/60
But on running the report it is returning an error message about Running Totals and Summary
Any ideas ?Public variables GrpTsec and LenOfDay are probably initialized in another formula. If this formula is not present, you will get "Divide by Zero" error when calculating value of "days".
Anyway, you should provide more details about the error you get.|||Hi Wrapper
The Error message that I am getting "The Summary / Running total field could not be created"
Many Thanks|||This error is common when trying to use invalid grouping option in functions like Sum(), Count() etc.
DistinctCount ({SW_CASE.swCaseId}, {SW_CASE.dsInboxAssignedTo});
Sure you have a group by {SW_CASE.dsInboxAssignedTo} in your report?|||Hi Wrapper,
Thanks, runs now !!!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment