Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crystal Report 3 formula trick - calculation formula

Posted on 2011-09-28
6
Medium Priority
?
1,201 Views
Last Modified: 2012-05-12

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
0
Comment
Question by:BioTechManic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:gordon2011
ID: 36717602
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.
0
 

Author Comment

by:BioTechManic
ID: 36717657

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... Error
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 36717767
I would guess that Activity.Amount is a currency.

Try this

WhilePrintingRecords;
Global CurrencyVar GrandTotal;
GrandTotal := GrandTotal + {Activity.Amount};


The other way would be to convert the amount

CDbl({Activity.Amount})

mlmcc
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 101

Expert Comment

by:mlmcc
ID: 36717778
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
0
 

Author Comment

by:BioTechManic
ID: 36718058
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.....
0
 

Author Closing Comment

by:BioTechManic
ID: 36718064
awesome - thanks
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question