[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Suppress a group based on fields within a group

Posted on 2011-02-15
4
Medium Priority
?
1,282 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 101

Accepted Solution

by:
mlmcc earned 1000 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 101

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
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

872 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