Grouping a Group in Crystal

Posted on 2011-05-02
Medium Priority
Last Modified: 2012-05-11
Hello Experts,

I need help with a Crystal Report. I am tracking the # of events reported by country per month with a chart. So I have a bar chart on change of Date1 (by month), followed by change of Country, which counts Events.

By simply using Running Totals, here is a sample of what I get for April of 2011:

Argentina = 5
Brazil = 8
Canada = 2
USA = 27
Germany =1
Australia = 7
France = 1
Algeria = 2

Now the problem: I would like to then place each country into 1 of 3 groups depending on the number of events reported, and then I would like to chart those three groups by month. So, the result would be three groups: group1 (<3 events), group2 (>3 and <5 events), and group3 (>5 events). For April of 2011, it would look like this. The chart does not need to list each country within each group, just show group1, 2 and 3 side by side for each month reported.

Group1 = 4 (Canada, Germany, France, Algeria)
Group2 = 1 (Argentina)
Group3 = 3 (Brazil, USA, Australia).

How can I do this?

Question by:Marcos27
  • 4
  • 3
LVL 101

Expert Comment

ID: 35507678
How are you calculating the number of events in a country?


Author Comment

ID: 35507792
I'm just grouping by the Country field. In the Chart it summarizes that grouping, and in the listed records I'm just using a Running Total field that counts the total events for each value in Group #1.
LVL 101

Expert Comment

ID: 35508416
So the data in the table is like

Country name, Date of Event, Event Description

You are showing a count of events by country in the chart.

What do you want the new chart to show.
Count of countries iin each group?


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.


Author Comment

ID: 35508474
Correct. I am showing count of events per month by country. Now I would like to create 3 new groups, and organized each country into those groups. Group 1 will be less than 3 events. Group 2 will be between 3-5 events. Group 3 will be more than 5 events. So, according to this logic, France (with one event in April) would be in Group 1, and Argentina (with 5 events in April) would be in group 2 etc. I'd like to chart those three sub-groups. Is that possible in Crystal?
LVL 101

Expert Comment

ID: 35508759
Not sure.  IN general you can't do a summary on a summary field.

I'll build a small dataset and try a few things.

LVL 101

Accepted Solution

mlmcc earned 1500 total points
ID: 35508858
Try this idea

Create a formula

If Count ({Events.EventType}, {Events.Country}) < 3 then
    "Less 3"
Else If Count ({Events.EventType}, {Events.Country}) < 5 then
    "Less 5"

Use that formula for the grouping of the chart


Author Closing Comment

ID: 35803112
Ok, couldn't quite get this to work with my data, but It's no longer a priority. If I need it, I'll reopen the question with more detail. Thanks!

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

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…
Loops Section Overview
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month14 days, 6 hours left to enroll

807 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