Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Suppress a group based on fields within a group

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

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…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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