This simple sample shows you how to use a complex expression to filter the contents of a Data Set. The idea here is to build all the conditions your data must meet into one expression and validate a row as valid for inclusion or invalid in one step. This is especially useful for filters requiring an "
OR" operation.<br />
<br />
This sample has two parameters; a start date and an end date. The Data Set filter will examine each row and determine if the SHIPPED DATE field falls between the two dates in the parameter. Additionally, if the
pStartDate parameter is not supplied, all rows are passed in the filter (this is the OR condition). The expression returns TRUE or FALSE based on this evaluation. This allows the expression operation to be set simply to "Is True" to enforce the filter.<br />
<br />
Here is the expression:
if(BirtComp.between(row["SHIPPEDDATE"], params["pStartDate"].value, params["pEndDate"].value) || params["pStartDate"].value == null)
true
else
false
<br />
Sample is built using BIRT 2.3.2 on Classic Models data, so there are no other external dependencies.<br />
<br />
Good Luck!!!