Using Crystal 7
I sort my report by project.
In my report I have a formula for TotalNetRevenue and one for Costs. I also have a formula that subtracts those two and I call it GrossMargin. To get the right number I have to Insert, subtotal, (by project) and use that formula. They are working fine and are located in the project group footer.
The problem:
I created another formula (to calculate gross margin percent):
TotalNetRevenue does not return as zero for the project I'm looking at but in this formula it does. If I replace Else 0 with Else 9 I get a 9. (If I do an Insert, subtotal I get a five digit number, but its not what I get when I do the calculation manually).
I tried summing the TotalNetRevenue like this:
But when I try to run the report I get this error:
A summary has been specified on a non-recurring field
Any ideas? (hope this wasn't too confusing)
Thanks,
Sharon
I sort my report by project.
In my report I have a formula for TotalNetRevenue and one for Costs. I also have a formula that subtracts those two and I call it GrossMargin. To get the right number I have to Insert, subtotal, (by project) and use that formula. They are working fine and are located in the project group footer.
The problem:
I created another formula (to calculate gross margin percent):
Code:
If {@TotalNetRevenue} > 0
Then
({@GrossMargin} / {@TotalNetRevenue}) * 100
Else
0
TotalNetRevenue does not return as zero for the project I'm looking at but in this formula it does. If I replace Else 0 with Else 9 I get a 9. (If I do an Insert, subtotal I get a five digit number, but its not what I get when I do the calculation manually).
I tried summing the TotalNetRevenue like this:
Code:
If Sum({@TotalNetRevenue}) > 0
Then
({@GrossMargin} / {@TotalNetRevenue}) * 100
Else
0
But when I try to run the report I get this error:
A summary has been specified on a non-recurring field
Any ideas? (hope this wasn't too confusing)
Thanks,
Sharon