Print Page | Close Window

Dividing Calculated Columns in Grp Hdr

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20421
Printed Date: 27 Apr 2024 at 3:19am


Topic: Dividing Calculated Columns in Grp Hdr
Posted By: Runner
Subject: Dividing Calculated Columns in Grp Hdr
Date Posted: 04 Feb 2014 at 8:44am
I have some payroll data in crystal and am trying to do some calculations. There are calculations for regular/OT/per diem dollars in the Group Header and calculations for regular/OT hours in another Group Header column.

I am trying to take my total dollars and divide by total hours, but keep getting the division by zero. The detail which is a timecard entry has zeros.

Any ideas on a formula to eliminate the error?

Thanks.
Runner





Replies:
Posted By: kostya1122
Date Posted: 05 Feb 2014 at 5:42am
if sum(OT,groupfield) = 0 then 0 else
sum(regular,groupfield)/sum(OT,groupfield)


Posted By: Runner
Date Posted: 05 Feb 2014 at 6:08am
Awesome!!!!!!

Thank you very much.
Runner



Print Page | Close Window