Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324834 - Reports with parameter as Oracle timestamp/Date not displayed
Summary: Reports with parameter as Oracle timestamp/Date not displayed
Status: VERIFIED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.6.2   Edit
Assignee: Mingxia Wu CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard: Obsolete
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-09 06:36 EDT by Sriraman Srinivasan CLA
Modified: 2010-12-01 04:42 EST (History)
3 users (show)

See Also:


Attachments
Oracle Timestamp (11.66 KB, application/octet-stream)
2010-09-09 06:38 EDT, Sriraman Srinivasan CLA
no flags Details
Oracle Date issue rpt design file (10.39 KB, application/octet-stream)
2010-09-09 06:39 EDT, Sriraman Srinivasan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sriraman Srinivasan CLA 2010-09-09 06:36:01 EDT
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
Comment 1 Sriraman Srinivasan CLA 2010-09-09 06:38:29 EDT
Created attachment 178500 [details]
Oracle Timestamp
Comment 2 Sriraman Srinivasan CLA 2010-09-09 06:39:51 EDT
Created attachment 178501 [details]
Oracle Date issue rpt design file
Comment 3 Sriraman Srinivasan CLA 2010-09-09 06:43:32 EDT
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.
Comment 4 Mingxia Wu CLA 2010-12-01 04:05:45 EST
Cannot reproduce in latest build. Please try the latest version to verify it.
Comment 5 Xiaoying Gu CLA 2010-12-01 04:42:37 EST
Verified in 2.6.2.v20101201 that this issue does not exist any more.
Comment 6 Xiaoying Gu CLA 2010-12-01 04:42:53 EST
-V