Community
Participate
Working Groups
Build Identifier: Birt 2.2.1 If we try to create a report with Timestamp/Date parameter in the where clause, we are not able to generate a report. We get a oracle error stating invalid month. Reproducible: Always Steps to Reproduce: 1. create a report with parameter of oracle Timestamp type. In birt report we configure this as a DateTime parameter. Below is the select statement for the same. select * from DASH1.SRIRAMAN_TEST where DASH1.SRIRAMAN_TEST.DATETIME = ? The parameter DASH1.SRIRAMAN_TEST.DATETIME is of Oracle TimeStamp type. 2. Try generating the report i.e. preview. 3.You will get a error message stating as below: The following items have errors: ReportDesign (id = 1): + Cannot get the result set metadata. SQL statement does not return a ResultSet object. SQL error #1: ORA-01843: not a valid month 4. A similar error when the parameter is of Oracle Date type and we use it as DateTime parameter in birt. Below is the error message for the same The following items have errors: ReportDesign (id = 1): + Cannot get the result set metadata. SQL statement does not return a ResultSet object. SQL error #1: ORA-01861: literal does not match format string
Created attachment 178500 [details] Oracle Timestamp
Created attachment 178501 [details] Oracle Date issue rpt design file
Going through the code for birt we found that birt is formatting the timestamp parameter in 'yyyy-MM-dd HH:MM:SS.S' format before sending it to oracle database and this format seems to be a miss match for timestamp format in oracle. The conversion takes place in ParameterUtil.java in org.eclipse.birt.data.engine.impl package.
Cannot reproduce in latest build. Please try the latest version to verify it.
Verified in 2.6.2.v20101201 that this issue does not exist any more.
-V