Enabling users to specify null
I am using BIRT 4.2 and deploying via Apache. My SQL education, is what I have picked up from modifying drag and drop tools.<br />
<br />
Per 'BIRT A Field Guide" Third Edition, page 341; All that is required for a user to be able to search for null is for the report developer (<em class='bbc'>me</em>) to un-check 'is required' when creating the parameter. I am using a dynamic list for the parameter.<br />
<br />
As best I can tell it actually sends "Null" as a string, and does not return the nulls, when the SQL is..<br />
<br />
<span style='color: #4B0082'>where</span> METADATA_DOMAIN <span style='color: #4B0082'>= ?</span><br />
<br />
I can get any value other then null, regardless of the check or un-check 'is required' <br />
<br />
<br />
When the SQL is <br />
<br />
<span style='color: #483D8B'>where</span> METADATA_DOMAIN <span style='color: #4B0082'>= ?</span><br />
<span style='color: #483D8B'>or</span> METADATA_DOMAIN <span style='color: #483D8B'>is null</span><br />
<br />
I can get any value and nulls, regardless of the check or un-check 'is required'<br />
<br />
Presumably I need to use something other than " <span style='color: #4B0082'>= ?</span> " in the SQL when passing either a " <span style='color: #4B0082'>is null </span>" command or string value. I looked around and don't find the answer so I guess it is really simple. (<em class='bbc'>or I just did not understand the answer when I saw it</em>)
<br />
Per 'BIRT A Field Guide" Third Edition, page 341; All that is required for a user to be able to search for null is for the report developer (<em class='bbc'>me</em>) to un-check 'is required' when creating the parameter. I am using a dynamic list for the parameter.<br />
<br />
As best I can tell it actually sends "Null" as a string, and does not return the nulls, when the SQL is..<br />
<br />
<span style='color: #4B0082'>where</span> METADATA_DOMAIN <span style='color: #4B0082'>= ?</span><br />
<br />
I can get any value other then null, regardless of the check or un-check 'is required' <br />
<br />
<br />
When the SQL is <br />
<br />
<span style='color: #483D8B'>where</span> METADATA_DOMAIN <span style='color: #4B0082'>= ?</span><br />
<span style='color: #483D8B'>or</span> METADATA_DOMAIN <span style='color: #483D8B'>is null</span><br />
<br />
I can get any value and nulls, regardless of the check or un-check 'is required'<br />
<br />
Presumably I need to use something other than " <span style='color: #4B0082'>= ?</span> " in the SQL when passing either a " <span style='color: #4B0082'>is null </span>" command or string value. I looked around and don't find the answer so I guess it is really simple. (<em class='bbc'>or I just did not understand the answer when I saw it</em>)
Warning
No formatter is installed for the format ipb
0
Comments
-
Jenkins,<br />
<br />
You may want to read this Wiki entry about passing null to a parameter:<br />
<a class='bbc_url' href='http://wiki.eclipse.org/Null_Report_Parameter_Passed_to_Data_Set_(BIRT)'>http://wiki.eclipse.org/Null_Report_Parameter_Passed_to_Data_Set_(BIRT)</a><br />
<br />
Attached is your sample report modified.Warning No formatter is installed for the format ipb0 -
Thank you both, I found a solution that is fairly simple. Works on complex reports, (my production report has multiple linked tables and mutliple paramters). I have one parameter with a drop down list and another parameter with Radio Buttons to include null or not.
* SQL returns for only selected parameters and where, field is null
* Computed column generates integer value based on Null value
* Filter based on parameter to include or exclude Nulls.
I have attached a simple report using the sample DBWarning No formatter is installed for the format ipb0 -
Devshare posted <a class='bbc_url' href='http://www.birt-exchange.org/org/devshare/designing-birt-reports/1580-enabling-report-users-to-specify-null-values-with-dynamic-drop-down-list/'>here</a>Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 117 Developer Announcements
- 52 Articles
- 145 General Questions
- 133 Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 912 Cloud Fax and Notifications
- 81 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 167 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 4 XM Fax