Filtering data on a report based on 3 fields? (1 Viewer)

Darla123

Registered User.
Local time
Today, 05:27
Joined
Jul 29, 2015
Messages
23
Hi everyone. So I have a report that's tied to a query. I have 3 fields on this report. These fields are all in a row If the value of all three fields is a "0", I don't want it to show up on the report. I see how to filter these out in the query, I'm putting ">0" on each of the fields in the criteria, but the problem with that is if one of the fields does have a value, it still wipes out the entire row. I'm not sure how to get around this. A screenshot is attached, I am terrible at explaining things! Thank you!!
 

Attachments

  • Capture.JPG
    Capture.JPG
    34.4 KB · Views: 77

pbaldy

Wino Moderator
Staff member
Local time
Today, 02:27
Joined
Aug 30, 2003
Messages
36,140
The ">0" should be on different lines. That gives you an OR comparison rather than an AND comparison.
 

Darla123

Registered User.
Local time
Today, 05:27
Joined
Jul 29, 2015
Messages
23
I'm not sure what you mean by putting it on different lines?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 02:27
Joined
Aug 30, 2003
Messages
36,140
Change the query to SQL view and change AND to OR in the criteria. Switch it back to design view and you'll see what I mean.
 

Darla123

Registered User.
Local time
Today, 05:27
Joined
Jul 29, 2015
Messages
23
I changed it to OR, and now my report is all messed up, it's duplicating records, I'll try messing with it a little more to see what's going on. Thank you!
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 02:27
Joined
Aug 30, 2003
Messages
36,140
What's the SQL of the query before and after?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 02:27
Joined
Aug 30, 2003
Messages
36,140
That's quite different, and I don't see any OR's in there. That said, I thought you had the criteria on individual fields, not the aggregated total. I would expect the before to work, presuming there are no Null values. Are there Null (empty) fields throwing it off or do they all have a value? Can you attach the db here?
 

Users who are viewing this thread

Top Bottom