Summation of Sum Formula in Crystal Report - crystal-reports

I did a summation in one formula say Formula1. Now i created Formula2 which would do summation of Formula1 as Sum({#Formula1}).
But the crystal report gives the error as "The Field could not be summarized". I understand that summation of sum cannot be done, but i need to do this as Formula1 does summation of columns i.e. brings up Total and Formula2 brings up grand Total.
Please Help!
thanks

Does your Formula1 always evaluate to a numeric value? For example, if you designed Formula1 to display "-" instead of "0", that would cause the problem for Formula2.
If this is a simple summation, you don't even need a Formula2. Crystal has a built-in alternative. On Formula1, go to right-click->Insert->Summary and choose where you want it (Group Footer or Report Footer)

If you copy your summation field and paste it in the Report Footer, it will calculate a grand total--no need to do a sum(sum(field)).

Related

How to sum in Crystal Report?

Im new to Crystal report. Would appreciate for your help and advice.
I have applied the 1st formula add into the crystal report and trying to sum it if the value is only 1. Attempted to create 2nd formula but having the error.
Formula: test3
if(Count ({CUSTINVOICEJOUR.INVOICEID}, {CUSTINVOICEJOUR.INVOICEID})) = 2 then 1 else 0
sum ({#Test3})
error - this field cannot be summarized
Crystal cannot total formulas that depend on totals.
You can define a numeric variable and increment it in a GF formula using the same conditional logic. Then, display the resulting total in a formula below the "action".
You didn't describe what level of aggregation you are after (grand total across level 1 subtotals? Level 1 total across level-2 subtotals?) so it's difficult to refer to appropriate level of "action" in more concrete terms.

calculating the sum of a formula filed in crystal report

I need help in calculating the sum of a formula filed in crystal report. I have a formula filed '#ClosingBalQty' ,I want to calculate the 'sum({ClosingBalQty}).
As its a formula it return an error.Can any one tell me how to just get total of '#ClosingBalQty'

Crystal Reports 2013 How do I exclude Null Values in a Crosstab average?

How do I get a crosstab in Crystal Reports 2013 to exclude null values from a crosstab average?
For example
Procedure Name : OCT RETINA
Procedure Count : 8
Procedures with Completion Times Populated : 6
Summary of all 6 Completion Times : 101
I was expecting the average of the Completion Times to be calculated as 101/6. Instead, Crystal Reports is calculating the average as 101/8. It needs to be calculated as 101/6 (without counting null values in the denominator).
Adding another group is not an option because of the very specific way the values are sorted in the detail (hence a crosstab in a footer). The names of the procedures are dynamic so keeping a running total of each procedure's average completion time is not an option either.
Thanks in advance!!!!
One solution would be instead of taking the field create a formula use that in cross tab.
Create a formula #count
if << procedure field>>=<<your value>>
then 1
else 0
Now place the formula and take sum instead of count
Thanks for everyone's feedback! The answer is to use Weighted Average instead of just a plain old Average.
All I had to do was
a. Create a formula field called IncludeProcInDenominator and set the value to
if {Command.ProcTime} > 0 then 1
b. Right click on the Average Proc Time calculation in the crosstab and select Edit Summary
c. When the Edit Summary dialog box appears, in the Calculate This Summary drop down, select Weighted average with
d. In the dropdown box underneath that, select #IncludeProcInDenominator
In effect, the only values that are averaged are the ones where #IncludeProcInDenominator = 1
Thanks for everyone's help!

a percentage values in crystal report

I have values in database witch is a percentage values for example:
Per columns : 90,85,38,70,85
I select “Per” as the value to be shown in the bar chart
But when I run my crystal report all my bar display as 100%
It does not take the exact value of “Per”
How can I solve this problem?
If your column values are whole numbers then you should probably create a formula to calculate the fraction. Then you should be able to display as a percentage. Eg. {table.fieldname} * .01

Crystal Reports Division Formula Not Calculating as Desired

I am one step away from finishing up a report in Crystal 2008. I have included a snapshot of the report below. For some reason I cannot get the formula in the yellow column to calculate correctly. I am trying to divide the value of Net A for each main data source/year into the yearly Total of Net A to get the % of Data for each Main Data Source. Net A is pulling from a field in access and the total of Net A is a running total based on a current Run Date using formula ({HNT_End_To_End_Data.REPT_YYMM} = cStr(currentdate,'yyMM') in the evaluate section of the running total and the field is reset on each change of Year.
The formula in the yellow column is currently ({HNT_End_To_End_Data.Net_A}/Sum ({HNT_End_To_End_Data.Net_A}))*100 and is showing values that are like it's doing NetA divided into the grand total of Net A of all 3 years (3,727,560/108,666,439) rather than the dividing into individual year (3,727,560/34,981,163). I'm attempting to get the formula to divide each Main Data Source for each year into the yearly Net A total.
I've tried doing many different formulas and have had no luck, so would appreciate any suggestions anyone might have.
Do you have a group on year({sometable.somedate})? You need to add that group into your aggregate (sum) function:
(
{HNT_End_To_End_Data.Net_A}
/
Sum({HNT_End_To_End_Data.Net_A}, year({sometable.somedate}))
) * 100
EDIT: After reviewing the report I can see you are using a conditional formula {HNT_End_To_End_Data.REPT_YYMM} <> cStr(currentdate,'yyMM') to suppress the detail section. So SUM({HNT_End_To_End_Data.Net_A},{HNT_End_To_End_Data.SERVICE_THRU_YEAR}) is actually including the records which aren't being displayed. You have a number of ways to get around this. The simplest is probably to create a new formula for net_a:
if {HNT_End_To_End_Data.REPT_YYMM} <> cStr(currentdate,'yyMM') then
{HNT_End_To_End_Data.Net_A}
else
0;
You can then do:
(
{HNT_End_To_End_Data.Net_A}
/
Sum({#net_a}, year({sometable.somedate}))
) * 100