Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering on a group

Status
Not open for further replies.

jessieyull

Technical User
Apr 1, 2002
16
US
I have a report that is grouping by a win_status field. Each record returned in every group contains a $amount field. I'm wanting to filter just one specific group by $amounts greater than 1 million.

Something like...

If win_status=Pending and $amount > 1000000
 
Do you want to filter the individual records or the group?

filter individual records in the record selection formula:
$amount>10000
this will return only those individual records woth $amount records of more than 10000.

filter groups in the group selection formula:
Sum({$amount},{customer})>10000

This will give you every group where the total $amount is greater than 10000, and it will not exclude ANY records from the subtotaling by customer. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
thanks for the response!

I'm needing to filter the records, but just on one group. for instance, if I had...

group A
record1 200.00
record2 900.00
group B
record1 200.00
record2 400.00
group C
record1 400.00
record2 800.00

and the formula I need is to only bring back records in Group B if the $amount is greater than 300.00. But group A and C - I want to return any $amount.
 
In the group selection formula use this:

If Groupname="B" then Sum({$amount},{customer})>10000 else true

Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Since the amount is in a record, not a group, I think you might need:

If Groupname="B" then {$amount}>10000 else true Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I ended up getting this to work as the record selection in the select expert:

({OPPORTUNITIES_V.VALUE_1_YR_PROD} >= 1000000.00 and
{OPPORTUNITIES_V.WIN_STATUS} in ["Pending", "Win"]) or
{OPPORTUNITIES_V.WIN_STATUS} in ["Cancel", "DesignWin", "Loss"]


I tried using the formula you gave:
If Groupname="Pending" then {OPPORTUNITIES_V.VALUE_1_YR_PROD}>1000000.00 else true

but I would get an error "Not enough arguments have been given to this function" Was your maybe not working for me because I was not specifying how to handle the other groupnames?

Thanks very much for your help!
 
You should have tried:

If {OPPORTUNITIES_V.WIN_STATUS} = "Pending"
then {OPPORTUNITIES_V.VALUE_1_YR_PROD}>1000000
else true Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top