Solved

# Grouped Records limited based on field value

Posted on 2013-05-20
238 Views
In the file attached I have grouped record sets based on a model number.  The numbers to the right tell me the current status of the tasks.  I am looking for a way to only show those records where each of the tasks for that record are at a status of 30 otherwise I need to see the record.  The 8 digit number represents a record number and the 2 digit number represents the task.  You can have up to 99 tasks.

00000806
00000806      01      PLAN                        22
00000806      02      PLAN                        22
00000806      03      PLAN                        22

00000807
00000807      01      AUTHORZD      30
00000807      02      AUTHORZD      30
00000807      03      AUTHORZD      22
00000807      04      AUTHORZD      22

Any help would be appreciated.
Thanks
Rich
Grouped-record-selection.xls
0
Question by:RDMcLaurine
[X]
###### 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
• 3
• 2

LVL 101

Accepted Solution

mlmcc earned 500 total points
ID: 39182959
SO for the above data you need to see

00000807
00000807      01      AUTHORZD      30
00000807      02      AUTHORZD      30

Or do you need them all suppressed because 807 has tasks in 22?

If you just want to see the tasks in 30 you could filter for that.

If you want to see tasks where all are at 30, try this

If {StatusField} <> 30 then
1
Else
0

You can use GROUP SELECTION on the summary

Sum({YourFormula} = 0

mlmcc
0

Author Comment

ID: 39182991
Thank you for the response, but you were correct in your statement that record 807 would be suppressed because it still had tasks at 22.

I only want to see all records where all tasks are at status 30.

Thanks again,
Rich
0

LVL 101

Expert Comment

ID: 39182997
Did you try the formula in my comment?

mlmcc
0

Author Comment

ID: 39185081
mlmcc,

This works, thank you very much.

The only part that did not work was the
Sum({YourFormula} = 0
but it did give me what I needed as I just used
{myformula}=0, if I put SUM in front of it, it would not work for me.
0

Author Closing Comment

ID: 39185089
Appreciate your fast response and easy solution.
0

LVL 35

Expert Comment

ID: 39186933
FWIW, it _seems_ like you would need the Sum.  When you say that it did not work, do you mean that you didn't get the results that you wanted, or that you got an error?

You probably spotted this, but mlmcc left off a ")".  If you got an error, that might be why.  The group selection formula should have been

Sum({YourFormula}) = 0

If you use {yourformula} = 0, you'll be selecting the groups based on the value in one record.  It will be whichever record CR last read when it does the group selection.  My guess would be the last record in the group.

James
0

## Featured Post

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. …
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
###### Suggested Courses
Course of the Month6 days, 17 hours left to enroll