Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Possible bug in Birt 4.2 when handling parameters
Migrateduser
Hello all,<br />
<br />
I'm new here, but I've found some problems, so decided to write here. I just moved to version 4.2 of BIRT and found following problem. I use three parameters in complex SQL query and when executing query I get error saying something like 'cannot set value for parameter 1'. Here is complete SQL query:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>select * from ( select top 1 dbo.PLC_reports.TimeString as TimeString, dbo.PLC_reports.VarValue as FT_10011_Value
from dbo.PLC_reports
where dbo.PLC_reports.VarName = 'FT-10011'
and dbo.PLC_reports.TimeString <= ?
order by TimeString DESC ) as PrevRow
union all
select convert ( varchar(13), dbo.PLC_reports.TimeString, 120 ) + ':00:00' as TimeString, max ( dbo.PLC_reports.VarValue ) as FT_10011_Value
from dbo.PLC_reports
where dbo.PLC_reports.VarName = 'FT-10011'
and dbo.PLC_reports.TimeString > ?
and dbo.PLC_reports.TimeString < ?
group by convert ( varchar(13), dbo.PLC_reports.TimeString, 120 ) + ':00:00'
order by TimeString ASC</pre>
<br />
The problematic part is:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>select * from ( select top 1 dbo.PLC_reports.TimeString as TimeString, dbo.PLC_reports.VarValue as FT_10011_Value
from dbo.PLC_reports
where dbo.PLC_reports.VarName = 'FT-10011'
and dbo.PLC_reports.TimeString <= ?
order by TimeString DESC ) as PrevRow</pre>
<br />
If you remove <pre class='_prettyXprint _lang-auto _linenums:0'>select * from () as alias</pre> and make just simple SQL query then everything works fine. Now I've returned to version 3.7.2 and everything works just fine with initial long SQL query. I suppose the problem is with handling <pre class='_prettyXprint _lang-auto _linenums:0'>select * from () as alias</pre>, somehow BIRT can't set a parameter value.<br />
I'm not providing more details about error because it is quite easy to reproduce the behavior. You need just make query of type <pre class='_prettyXprint _lang-auto _linenums:0'>select * from () as alias</pre> and error is guaranteed. So please of someone could check this and confirm if this is a some kind of bug or what.<br />
By the way, with both versions (3.7.2 and 4.2) I use the same JDBC driver from Microsoft version 4.0
Find more posts tagged with
Comments
There are no comments yet