- Multiple Filters are joined by the OR operator.
- When reporting off a Business View in Crystal Reports, the Filters are combined using: OR operator.
- How to combine Filters created in a Business View using: AND operator in Crystal Reports?
- SAP Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
- Business View Manager
Reproducing the Issue
- In the Business View Manager, create multiple Filters in the Business Element.
For example, create the following Filters:
- Country = 'Canada'
- City = 'Vancouver'
For example, the SQL Query generated will be like:
Country = 'Canada' OR City = 'Vancouver'
How to combine the Filters using the AND operator like:
Country = 'Canada' AND City = 'Vancouver'
- If all the Business View Filters have been defined in one Business Element, then the filters will always be combined using the OR operator.
- If the Business View Filters have been defined in multiple Business Elements, then by default the filters will be combined using the OR operator, but there is an option to change how the Business Element Filters are combined in the Business View.
- To combine the Business View Filters using the AND operator, create one filter per Business Element, and change the option "Business Element Filter Combination" from: OR, to the value: AND.
- Open the Business View in Business View Manager, to find all the Business Elements it is using.
- Open each Business Element, and if all the Business View Filters have been defined in one Business Element, then create one Business Element for each Filter.
- Add any newly created Business Element to the Business View.
- Still in the Business View, in the "Properties Browser" pane, for the option: "Business Element Filter Combination", select "AND" in the drop down list.
- Save the Business View.
Now, when creating a report off a Business View in Crystal Reports, it will combine the Filters defined in each Business Element using the AND operator.
CR, combine, OR, AND , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016