Solved

Suppress a group based on fields within a group

Posted on 2011-02-15
4
1,273 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 35

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 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