Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312338

Summary: Crosstab grouping of Date data type is incorrect when time zone is west of OS default
Product: z_Archived Reporter: Mark Mising name <mark.mills>
Component: BIRTAssignee: Gang Liu <hustlg>
Status: VERIFIED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: major    
Priority: P2 CC: bluesoldier, wenfeng.fwd, wyan, xiaofeng.zhang
Version: unspecified   
Target Milestone: 2.6.1   
Hardware: PC   
OS: Windows XP   
Whiteboard: Obsolete
Attachments:
Description Flags
Crosstab date grouping error none

Description Mark Mising name CLA 2010-05-10 17:13:01 EDT
Build Identifier: 2.5.2.v20100207

If the run and render tasks are assigned a time zone that is west of the OS time zone, then Date data is grouped based on the day before the actual date value. This seems to be a result of using a java.util.Date instance in the data value for the crosstab headings when the actual data in the cells are java.sql.Date instances. The DateFormatter then uses the dateTimeFormat to render the headings (with the assigned time zone) while it uses the dateFormat to render the summary cells (with the OS time zone). This makes it impossible to use crosstab reports on Date type data when rendering for a time zone other than the server.

Reproducible: Always

Steps to Reproduce:
1. Open the attached report in the RCP designer
2. Preview the report (notice that there are two quarter groups)
3. Click the (Click to change Preview Preferences) link and change the time zone to a time zone west of the OS...e.g., if the OS is on Eastern Standard Time, change the preview preference to Pacific Standard Time)
4. Click OK and Yes to confirm refresh (notice that now there is one quarter group and April 1, 2003 was grouped into Q1)
Comment 1 Mark Mising name CLA 2010-05-10 17:14:12 EDT
Created attachment 167821 [details]
Crosstab date grouping error
Comment 2 Gang Liu CLA 2010-05-17 04:01:48 EDT
Need more time to resolve this bug.
Comment 3 Wenfeng Li CLA 2010-05-17 14:51:49 EDT
schedule to 2.6.1, but I think it is a major issue that the date is wrong in Xtab, hence set the priority to p2.
Comment 4 xiaofeng zhang CLA 2010-09-01 23:45:00 EDT
The crosstab grouping using DateTime column as group key has been support. Mark as Fixed.
Comment 5 Xiaoying Gu CLA 2010-09-02 01:31:42 EDT
Verified in daily build 2.6.1.v20100902-0630