Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
report filter question
tonkadawg
I currently have a filter on my datasource and it's working as expected. However, I need to modify it to meet the clients needs. Currently the filter looks like:
row[start_date] >= params[start_date]
What I need to do is to append an 'or is null' to the existing filter. So it would look something like:
row[start_date] >= params[start_date] || row[start_date] IS NULL
How would I go about doing this?
thanks!
Find more posts tagged with
Comments
bhanley
You can use the filter expression to build out as complex a scenario as you would like. The easiest way to do this is to check your conditions as a group and simply return true or false (see attached sample). Then you set the filter operator to "<strong class='bbc'><em class='bbc'>Is True</em></strong>".<br />
<br />
Here is the filter I built:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if(BirtComp.between(row["SHIPPEDDATE"], params["pStartDate"].value, params["pEndDate"].value) || params["pStartDate"].value == null)
true
else
false
</pre>
<br />
The attached sample features a start and end date that are checked via a Data Set filter.<br />
<br />
Sample is built on BIRT 2.3.2 using Classic Models data, so you should be able to run it as-is.
tonkadawg
that did it - thanks!