Filtering A report using two Parameters

  • Thread starter Thread starter Mimi
  • Start date Start date
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'.
 
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'))
 
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'))
 
Back
Top