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)
Cannot create dataset parameter Oracle 11
svyates
I'm using 4.2.1 and am having an issue with an Oracle 11 database. When I try to create a parameter in the dataset, it doesn't get created. The query runs fine until I try to add the parameter. where field = ? Nothing gets created in the parameter tab and the query generates the error "SQL statement does not return a ResultSet object"
I saw references to similar problems and one of the suggested solutions was to add the where clause to the before open script. Can you give me an example of how to do that? Or, is there a solution to what seems to be an Oracle 11 issue. I have no problems with MySQL.
Thanks!
Steve
Find more posts tagged with
Comments
CBR
Hi steve,
could you try to add a parameter to the parameters tab by simply clicking on add?
The solution you read about is to go to the Property Binding tab in the dataset editor dialog. There is a field called query text. This field can be used to overwrite the query by using a Rhino Script expression.
e.g.:
You could provide a query like:
Select * from products
in the normal query editor
and then in the Property Binding tab:
"select * from products where id="+params["id"].value
Please be aware that this solution might introduce serious security issues. Not sure if you ever read about SQL injection. SQL injection could happen if params["id"] is freetext entered by your endusers.
This SQL injection can not happen if you use the normal parameters feature.
CBR
Are you sure that you are using BIRT 4.2.1 and not BIRT 4.2.0?
In BIRT 4.2.0 there was an issue if you use the oracle 11 jdbc driver. The workaround was to simply use an older version of the jdbc driver like the one for oracle 10 which also works for 11
svyates
<blockquote class='ipsBlockquote' data-author="'cbrell'" data-cid="114352" data-time="1361293443" data-date="19 February 2013 - 10:04 AM"><p>
Hi steve,<br />
<br />
could you try to add a parameter to the parameters tab by simply clicking on add?<br />
<br />
The solution you read about is to go to the Property Binding tab in the dataset editor dialog. There is a field called query text. This field can be used to overwrite the query by using a Rhino Script expression.<br />
e.g.:<br />
You could provide a query like:<br />
<br />
Select * from products<br />
in the normal query editor<br />
<br />
and then in the Property Binding tab:<br />
<br />
"select * from products where id="+params["id"].value<br />
<br />
Please be aware that this solution might introduce serious security issues. Not sure if you ever read about SQL injection. SQL injection could happen if params["id"] is freetext entered by your endusers.<br />
This SQL injection can not happen if you use the normal parameters feature.<br /></p></blockquote>
svyates
Yes, I did try to add a parameter, but it doesn't seem to be recognised and the query returns the same error.
When I look in Eclipse under installed software the version for the BIRT Framework is 4.2.1.v20120820.
I did try using the Oracle 10 driver and still had the same problem.
Thanks!
Hans_vd
So you added a data set parameter and bound it to a report parameter?
In that case sometimes you need to provide a valid default value for the report parameter, so that the data set query can be executed and the column definitions can be retrieved. Once the data set is created, you can remove the default value.
Whenever you need to make changes to the data: add the default, edit the data set, remove the default.
Hope this helps
Hans
svyates
<blockquote class='ipsBlockquote' data-author="'Hans_vd'" data-cid="114380" data-time="1361353895" data-date="20 February 2013 - 02:51 AM"><p>
So you added a data set parameter and bound it to a report parameter?<br />
<br />
In that case sometimes you need to provide a valid default value for the report parameter, so that the data set query can be executed and the column definitions can be retrieved. Once the data set is created, you can remove the default value.<br />
<br />
Whenever you need to make changes to the data: add the default, edit the data set, remove the default.<br />
<br />
Hope this helps<br />
Hans<br /></p></blockquote>
svyates
Thanks, Hans. Yes that helps. It's working now.
Cheers,
Steve