• Status: Solved
• Priority: Medium
• Security: Public
• Views: 230

# Grouping a Group in Crystal

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
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?

Thanks,
Marcos
0
Marcos27
• 4
• 3
1 Solution

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

mlmcc
0

Author Commented:
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.
0

Commented:
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?

mlmcc

0

Author Commented:
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?
0

Commented:
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.

mlmcc
0

Commented:
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"
Else
"Other"

Use that formula for the grouping of the chart

mlmcc
0

Author Commented:
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!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.