Specifying the evaluation order
Interactive Viewer evaluates filter conditions in the order in which they appear. If you define more than two conditions, use parentheses to group conditions to get the appropriate results. For example, A And B Or C is evaluated in that order, so A and B must be true or C must be true for a data row to be included. In A And (B Or C), B Or C is evaluated first, so A must be true and B Or C must be true for a data row to be included. To illustrate the benefit of using parentheses, compare the following examples.
The following filter contains four conditions and none of the conditions are grouped:
Sales Office = San Francisco
and ProductLine = Classic Cars
and Total >= 8000
or Profit >= 4500
Figure 7-12 shows the generated report. Although the filter specifies the San Francisco office and the Classic Cars product line, the report displays data for other sales offices and product lines. Without any grouped conditions, the filter includes rows that meet either conditions 1, 2, and 3 or just condition 4.
The following filter contains the same four conditions, but this time the third and fourth conditions are grouped:
Sales Office = San Francisco
and ProductLine = Classic Cars
and (Total >= 8000
or Profit >= 4500)
Figure 7-13 shows the generated report using grouped filter conditions. In this example, only two rows meet the defined conditions. The Sales Office = San Francisco and ProductLine = Classic Cars conditions must be true, then either the Total >= 8000 condition or the Profit >= 4500 condition is true.
Figure 7-12  
Figure 7-13  

Additional Links:

© Copyright OpenText Corp. All rights reserved. Privacy Policy | Cookie Policy

BIRT iHub 2