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)
Possible bug in Birt 4.2 when handling parameters
shift
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
mwilliams
I've now seen a couple different issues with parameters in BIRT 4.2, so my guess is there is a problem. Please log a bug at
http://www.eclipse.org/birt/phoenix/reportabug.php
and put the bug information in this thread for future information! Thanks!
shift
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="107040" data-time="1341846646" data-date="09 July 2012 - 08:10 AM"><p>
I've now seen a couple different issues with parameters in BIRT 4.2, so my guess is there is a problem. Please log a bug at <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>http://www.eclipse.org/birt/phoenix/reportabug.php</a>
; and put the bug information in this thread for future information! Thanks!<br /></p></blockquote>
<br />
Thank you for information and advice. I've created a bug report here: <a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=384624'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=384624</a><br
/>
I'll come back to this forum once I have some news on this.
mwilliams
Sounds good!