Solved

Evaluate Group Summaries against each other in Crystal Reports

Posted on 2013-05-16
2
296 Views
Last Modified: 2013-05-16
I have a report with summaries on a group.  I cannot figure out how I can evaluate the group summaries against each other.  Specifically, I have two values in each row, 'dollar amount' and 'year'.  In my group header/footer I have a sum total of 'dollar amount' grouped under each 'year'.  So I can have a total for 2012 and a total for 2013.  I can even do a grand total for 2012 and 2013 together, but how do I create a calculation where I get the difference of 2013 minus 2012?
0
Comment
Question by:Jake Pratt
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39172384
I can think of 2 methods.

1.  Use variables to save the summary values then calculate the difference.

2.  Create 2 formulas
LastYear
If Year({DateFIeld}) = Year(Currentdate) - 1 then
    {AmountField}

ThisYear
If Year({DateFIeld}) = Year(CurrentDate) then
   {AmountField}

Those formulas can be summarized anywhere to get the totals for LastYar and ThisYear and then a difference can be calculated

Sum({@ThisYear}) - Sum({@LastYear})

mlmcc
0
 

Author Closing Comment

by:Jake Pratt
ID: 39172592
Now why didn't I think of that?!  Very nice.  Thanks.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 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