Previous TopicNext Topic


FilterCondition structure

The FilterCondition structure defines a filter to apply to a List, Table, Group or other element. Expressions are of one of the three following forms:

The simplest expression is a comparison with a column in the data row, as in the following example:

row.State = "CA" 

A slightly more complex comparison is to use a report parameter, as in the following example:

row.State = params.StateParam 

Some conditions may require conditional logic, as in the following example:

( row.Balance < 0 || row.Status = "Suspended" ) is true 

Note that the term, is true, indicates that the expression is boolean condition.

Ranking expressions let the report choose only the most interesting rows, as in the following example:

row.Balance Top 10 

The preceding statement says to display the ten customers with the highest balances.

When used with groups, a filter can refer to total computed over the group, as in the following example:

Total.sum( row.InvoiceAmt ) > 1000 

The filter can also refer to totals computed over the entire data set, or a higher level group. To display only customers whose sales account for at least 5% of total sales, use a statement such as the following one:

Total.sum( row.InvoiceAmt ) >= Total.sum_overall( row.InvoiceAmt ) * 0.05 

Property summary


(c) Copyright Actuate Corporation 2006

Previous TopicNext Topic