Solved

Suppress a group based on fields within a group

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now