Filtering A report using two Parameters

M

Mimi

I am trying to filter a report on two parameters that are used in the
underlying query. I currently have the report filtering on one parameter
[Record Type] = 'R'. The report returns correctly. Now I want to add a
second filter. [Worker Type] = 'Agency' or 'Contractor'. I am not sure of
the expression that I should use to combine the two filters.

I am currently filtering by going to the properties icon, then selecting
report and Data tab. There I am filtering by [Record Type] = 'R'.
 
M

Marshall Barton

Mimi said:
I am trying to filter a report on two parameters that are used in the
underlying query. I currently have the report filtering on one parameter
[Record Type] = 'R'. The report returns correctly. Now I want to add a
second filter. [Worker Type] = 'Agency' or 'Contractor'. I am not sure of
the expression that I should use to combine the two filters.

I am currently filtering by going to the properties icon, then selecting
report and Data tab. There I am filtering by [Record Type] = 'R'.


Depends on whether you want to filter for either condition
or both.

Match both:
[Record Type] = 'R' AND ([Worker Type] = 'Agency' or [Worker
Type] = 'Contractor')

Match either one:
[Record Type] = 'R' OR ([Worker Type] = 'Agency' or [Worker
Type] = 'Contractor')

Note that if you want to check if a field contain either of
two (or more) values, it is often easier ti use the IN
operator instead of rwo (or more) Or comparisons. This will
do the same as above:

[Record Type] = 'R' {And|Or} ([Worker Type]
IN('Agency','Contractor'))
 
M

Marshall Barton

Mimi said:
I am trying to filter a report on two parameters that are used in the
underlying query. I currently have the report filtering on one parameter
[Record Type] = 'R'. The report returns correctly. Now I want to add a
second filter. [Worker Type] = 'Agency' or 'Contractor'. I am not sure of
the expression that I should use to combine the two filters.

I am currently filtering by going to the properties icon, then selecting
report and Data tab. There I am filtering by [Record Type] = 'R'.


Depends on whether you want to filter for either condition
or both.

Match both:
[Record Type] = 'R' AND ([Worker Type] = 'Agency' or [Worker
Type] = 'Contractor')

Match either one:
[Record Type] = 'R' OR ([Worker Type] = 'Agency' or [Worker
Type] = 'Contractor')

Note that if you want to check if a field contain either of
two (or more) values, it is often easier ti use the IN
operator instead of rwo (or more) Or comparisons. This will
do the same as above:

[Record Type] = 'R' {And|Or} ([Worker Type]
IN('Agency','Contractor'))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top