cancel
Showing results for 
Search instead for 
Did you mean: 

Omitting records from one table depending on data from another table

Former Member
0 Kudos

I have a client's table and a charges table:

If a client has a felony charge then I don't want to include that client in my report at all.

Currently, I have the following code in my record selection:
not ({charges.chargesType} = "Felony")
so it will still include client 1 and client 3 just not the felony rows.
I don't want client 1 nor client 3 in my report at all since they have a felony record. How can I omit them from my report?

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Dee,

You can create a Custom SQL query and use that as the report's datasource - this would be more efficient too. However, if you wish to do this without a query, please try the following:

1. Remove the Record Selection Formula

2. Insert a Group on the Client ID field

3. Suppress the Group Header and Group Footer

4. Create a formula (@Felony) with this code:

If  {charges.chargesType} = "Felony" then 1 else 0

5. Go to the Report Menu > Selection Formulas > Group and use this code:

Sum({@Felony}, {ClientID}) = 0

-Abhilash

Answers (1)

Answers (1)

Former Member
0 Kudos

Thank you... it totally worked.