Skip to Content
author's profile photo Former Member
Former Member

Formula to provide a varaible the total value for a group

Hi,

I need to create a formula which outputs the value for a single group. For example, two groups are:

Group: Year

Group: Products

I only need to place in the footer the total for year 2012, product jam. The report contains dteails for many products and years.

Any one help me with this formula?

Cheers,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on May 30, 2013 at 01:55 PM

    Hi Leo,

    Create this formula and place it on the Group Header 2. You may suppress this formula as we don't really need to display it.

    WhilePrintingRecords;

    numbervar summ;

    if {Year} = 2012 and {Product} = "Jam" then

    summ := Sum ({Product}, {Year}))

    Note. If the {Year} field is a date field, then you need to use a function to extract the year like:

    Year({Year_field}) = 2012

    Create another formula to display the sum and Place it on the Report Footer:

    WhilePrintingRecords;

    numbervar summ;

    Hope this helps!

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 30, 2013 at 02:15 PM

    Hello Leo,

    take a look at the option to create Running Total in Crystal Reports.

    it also allows you to put in a logic which numbers should be totaled together.

    regards

    Ingo Hilgefort, SAP

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.