Bug 226409 - BIRT 2.3 compatiblity issue to preview the report created in BIRT 2.2.2
Summary: BIRT 2.3 compatiblity issue to preview the report created in BIRT 2.2.2
Status: RESOLVED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.3.0 RC0   Edit
Assignee: Lin Zhu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 227291 (view as bug list)
Depends on:
Blocks: 225693
  Show dependency tree
 
Reported: 2008-04-09 22:25 EDT by Rick Lu CLA
Modified: 2008-04-23 07:49 EDT (History)
2 users (show)

See Also:


Attachments
The preview result in 2.2.2. (123.37 KB, image/jpeg)
2008-04-09 22:25 EDT, Rick Lu CLA
no flags Details
The preview result in 2.3 (92.49 KB, image/jpeg)
2008-04-09 22:26 EDT, Rick Lu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Lu CLA 2008-04-09 22:25:07 EDT
Created attachment 95460 [details]
The preview result in 2.2.2. 

By using the design file attached in https://bugs.eclipse.org/bugs/show_bug.cgi?id=225693 in BIRT 2.3, the preview result showed that some data became 0. However, the data can be viewed correctly in BIRT 2.2.2.

First doubted this is a Rhino upgrade problem. However, after replaced js.jar from 2.2.2 to 2.3, the problem remained.
Comment 1 Rick Lu CLA 2008-04-09 22:26:14 EDT
Created attachment 95461 [details]
The preview result in 2.3
Comment 2 Lin Zhu CLA 2008-04-10 01:36:08 EDT
For Rhino java script engine, it actually cannot correctly compare a java.sql.Date value with its native Date value. All those comparison will result a "false".

In 2.2.2 we convert all the java.sql.Date and java.sql.Time to java script Date, so that for an expression like dataSetRow["Date"] > new Date() can be correct evaluated. This however is actually incorrect. Take following example:

java.sql.Date:  1999-10-10, when being convert to a native date value, would be 1999-10-10 12:00:00. If it is then compare to a date value 1999-10-10 12:00:01, the result is "less than".

However, for a Date value, only the date field rather than time field should be significant during comparison. That is, user will expect 1999-10-10 equals to 1999-10-10 12:00:01. This kind of comparison can only be done by Data Engine rather Rhino by now. So we should not convert a java.sql.Date value to a Rhino native date, rather, we should keep its value as it is.

In 2.2.2, even if this kind of comparison is supported, the comparison result is actually inconsistent with what user expected.

Mark the bug as won't fix.

User can always work around the problem by convert dataSetRow["Date"] to a java script Date value.


Comment 3 Mingxia Wu CLA 2008-04-23 07:49:31 EDT
*** Bug 227291 has been marked as a duplicate of this bug. ***