Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Can a null value be passed as a multi-select filter or parameter?
Tom_A
The dataset query for my parameter returns a null value but null doesn't show up in the list when I generate the report. Is it possible to include null in the list?
Find more posts tagged with
Comments
mwilliams
Meaning the null value doesn't show up in your parameter list when running the report? If you want to have a selection for "null", you might have to actually add an option for "null" or "no value" or something like that and just replace that value with the actual empty string when you pass it through to your query if selected.
Tom_A
Exactly, the null value does not show up in the parameter list when running the report. I am ok with the user selecting a blank value but I just can't get the blank to show up.
Tom_A
<blockquote class='ipsBlockquote' data-author="'Tom_A'" data-cid="75628" data-time="1302199766" data-date="07 April 2011 - 11:09 AM"><p>
Exactly, the null value does not show up in the parameter list when running the report. I am ok with the user selecting a blank value but I just can't get the blank to show up.<br /></p></blockquote>
<br />
Also, fyi the multi select parameter is setup as a filter on my dataset.
mwilliams
I'm guessing if it doesn't give you an option to choose a blank value that BIRT removes blank values from the dynamic parameter list. What I'm saying is that in your query, you'll need to add an extra value to the result set for the query of "Empty" or "No Value" or something to that effect and when the user selects that, you'll have to catch that value, change it to an empty string or null (whichever, if either BIRT recognizes in a filter) and pass it through as a filter parameter.
Hope this helps.
Tom_A
Ok, I see what you are saying. I modified the query so that nulls would return 'No Value' then I added another select statement that essentially wrapped around the original query. Then I added 'No Value' to the parameter list. Everything seems to work now...thanks for your guidance!
mwilliams
Awesome! Always glad to help. Let us know whenever you have questions!