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

Help with Grouping

I am using Crystal Reports 2008. I have created a group that groups my data. Here is an example.

2007 2008 2009 2010

Inpatient

Cincinnati 20 10 30 45

Outpatient

Cleveland 10 5 26 50

Columbus 15 6 30 64

What I am trying to do is create an additional group call total outpatient that would total all the values under the outpatient group.

So it would look like the following.

2007 2008 2009 2010

Inpatient

Cincinnati 20 10 30 45

Outpatient

Cleveland 10 5 26 50

Columbus 15 6 30 64

Total Outpatient

25 11 56 114

Thanks for any assistance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2012 at 04:52 PM

    Hi Thomas

    There are a number of ways to achieve the results you’re looking for.

    The simplest would be to insert a summary field at the group footer of your Inpatient/Outpatient group.

    In design view, click on the key figure field. Then take the menu path: Insert > Summary.

    If you don’t want the Inpatient Group Footer to display, you can create a formula to suppress the section in: Report > Section Expert.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2012 at 04:13 PM

    Hi Thomas,

    The demo looks to me more of a crosstab to me 😊!!

    I guess the answer you are looking for can be achieved using a crosstab.

    Here is one sample that I had created, which look similar to yours

    For this

    1. go to Insert -> Crosstab

    2. Insert the crosstab in Report Header

    3. Right click on the crosstab and go to Cross tab Expert

    4. in Rows: Inert the field for Inpatient/ Outpatient

    5. In Cloumns: Insert the date field and click on Group option. Change the option for "The coulumn will be printed" to "For each year" and hit ok

    6. in Sumaried Field: Select the sales/Price (I mean whatever field it is) and then hit Ok

    Hope this would help you!

    - Bwuser


    crosstab.JPG (129.5 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Thomas,

      I guess you only wish to see the Totals for the Outpatient Group isn't it?

      I've attached the updated report.

      Note: 1) The details section has formulas for each year that calculates the sum. These formulas have all been suppressed.

      2) The Final Summary is displayed on the Group Footer and each summary is a separate formula

      3) The Group Footer is also dynamically suppressed since you only wish to see the totals for "OUTPATIENT"

      4) The calculations have only been done until the "Prior Year" col.

      5) If you wish to summarize the other columns too, please refer to one of the formulas in the details section, change the variable name and the database field. Also refer to one of the summaries in the Group Footer and you can create a summary all by yourself too.

      Let me know how this goes!

      - Abhilash

      Follow us on Twitter

      Got Enhancement ideas? Try the SAP Idea Place

      Share Your Knowledge in SCN Topic Spaces

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.