Link to home
Start Free TrialLog in
Avatar of BioTechManic
BioTechManicFlag for United States of America

asked on

Crystal Report 3 formula trick - calculation formula


I am trying to complete a 3 formula trick to calcalate a grand total from a group total.

so far so good except I seem to have a road block in the calculation formula and get an error that a 'Number" is required here when I drop in my group total field to calculate.  I have tried to use a conversion to no avail.  And that field data type IS a number in the report.

See attached.

thanks

CR-3formtrick-number-required.jpg
Avatar of gordon2011
gordon2011

The problem is that according to your formula, you are trying to sum the Company name - which will cause an error. Unless I'm missing the point, if it's a grand total then you don't need to sum the group totals, just sum the individual field.

If you want to know the total at specific points, then try a running total.
Avatar of BioTechManic

ASKER


Gotcha - That is what I figured...but have tried many variations on this.

Running total won't work on a summarized field in a group...I so wish it would - hence using the 3 formula trick - I am CR9 btw.

When I try to use the actual field amount, which is a currency datatype, I get the same error - see attached... User generated image
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
gordon2011 - Sum({Activity.Amount},{Name.Company})
That calculates the sum of Activity.Amount over the group for a company.
It limits the values in the sum to the records for the company.  Other wise it will sum all values in the report.

mlmcc
changing to Global CurrencyVar did it!! wow - I knew I was close - funny how it would not let me change the data type within the last statement on the calculation formula - I did have to go into all 3 formulas and change the GrandTotal variable datatype to currency and then I could put in the formula that calculated the group totals and wallah - it worked.

thanks

now I think I am supposed to do something with points...I dont do this often - once a year or so.....
awesome - thanks