Skip to Content
0
Jul 20 at 05:28 PM

Crystal Reports 2020 Not Dividing Correctly In Formula Fields?

85 Views

I have a cross tab report that takes orders, amount of frames, total sales, etc. for each rep and shows how much they have each day and then totals. I am trying to add a formula field that simply takes the "Sales Amount" divided by "Frames" to give me the average cost per frame. When I do this calculation it is giving me a number that is not correct, I am not sure what is it doing to pull the number. For example on the screen shot in the total column, I want the bottom one (@Avg Frame) to be 5635/92 which equals 61.25, but it is giving me 115.55. The current formula in the field is

IF {Command.Sales Amount} = 0 THEN 0 ELSE {Command.Sales Amount}/{Command.Frames} .

When I alter the formula to just have {Command.Sales Amount} alone it shows the correct value (5,635) and when I do {Command.Frames} it shows 92. So then why am I not getting 61.25 when I do the division formula? Note the rep names aren't shown for privacy. Thank you!

Attachments

crosstabreport.jpg (63.1 kB)