Solved

Suppress a group based on fields within a group

Posted on 2011-02-15
4
1,271 Views
Last Modified: 2012-05-11
Hi Guys,
I have a report that I want to suppress a group for, but only under specific conditions.

I would like to suppress the entire group if a field within that group of records doesnt equal 24 and any other number.

So I may have 4 records, in a group that equal 24, 2, 3, 12 and I would like that group to be shown.
But i may have another group of 3 records that is 24, 24, 24 and I would like it suppressed,
also if a group of 3 records was 12, 18, 13 Id like that suppressed too.
Can someone help me with the formula to suppress in the section expert?
Thanks,
Chris.
0
Comment
Question by:holdsworthbros
  • 2
4 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 34903279
It depends on what the conditions are that you want to meet.

Do you want to suppress the records but include them in summaries?

You could try a formula like
Name - Has24
If {Myfield} = 24 then
   1
else
    0

You could then suppress based on a formula like

Sum({@Has24}) > 0

mlmcc
0
 

Author Comment

by:holdsworthbros
ID: 34903401
No, I do not want include any groups (and therefore records in that group) that do not meet the group condition. That being that of the records in the group, one particular field (@left2) = 24 and in another record the number equalls any number (but not 24 again).
So Id like to keep these groups Where @left2 in four records =
24, 24, 2, 13
24, 1

but not these groups
24, 24, 24
1, 13, 15, 6
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34903561
You could try using it as a GROUP SELECTION formula

mlmcc
0
 
LVL 34

Assisted Solution

by:James0628
James0628 earned 250 total points
ID: 34914903
Group selection (as mlmcc suggested) is probably the best that you can do in a report, but it's basically just another form of suppression.  CR will still be reading all of those records (it has to, in order to know whether or not the group meets your conditions), but it won't be showing them on the report.  Since it's still reading the records, they'll be included in any CR summaries, so if you need any totals, you'll probably have to calculate them manually using formulas and variables.  Also, while CR won't show the excluded groups on the report, they will still be listed in the group tree, if you're using that.

 Using a Has24 formula like the one that mlmcc posted, if you only want to see the groups that had 24 _and_ some other value, I think the group selection formula (Report > "Selection Formulas" > Group) would be something like:

Sum ({@Has24}, {group field}) > 0 and Sum ({@Has24}, {group field}) < Count ({group field})


 The second part is to eliminate the groups that have 24 in every record.

 James
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

785 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