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

Bug 321589

Summary: Does not get custom date string from parameter in query
Product: z_Archived Reporter: FC Bester <fc_Bester>
Component: BIRTAssignee: Birt-ReportViewer <Birt-ReportViewer-inbox>
Status: NEW --- QA Contact: Xiaoying Gu <bluesoldier>
Severity: minor    
Priority: P3 CC: bluesoldier, digulla
Version: 3.7.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Param screen
none
When u run it none

Description FC Bester CLA 2010-08-03 09:28:00 EDT
Build Identifier: 20100617-1415

I have a parameter called "startdate" in custom Date format "yyyyMMdd". The browser the passes on ex "1 Dec 2010" as "20101201" to the report. BIRT reportviewer bombs out saying "20101201" is not a valid Date. If i modify the query string to "201-012-01" it works 100%. even thou its formatted "yyyyMMdd" in the report.

Reproducible: Always
Comment 1 Xiaoying Gu CLA 2010-08-04 00:58:29 EDT
Could you please attach a sample report?
I can not reproduce this issue in the 2.6.0 release build
Comment 2 FC Bester CLA 2010-08-04 04:12:49 EDT
Created attachment 175818 [details]
Param screen
Comment 3 FC Bester CLA 2010-08-04 04:15:10 EDT
Created attachment 175819 [details]
When u run it
Comment 4 FC Bester CLA 2010-08-04 04:19:30 EDT
Im also use the 2.6.0 build and it works when u enter the params on the screen. its when it has to read them from the browser string that u get the error. hope the screen shots help.
Comment 5 Aaron Digulla CLA 2011-08-26 03:43:26 EDT
I have the same issue with 3.7.0. I tried to debug it but the parameters dialog shows before the debugger is started, so the break point in org.eclipse.birt.report.utility.DataUtil.validate(String, String, String, Locale, TimeZone, boolean) is never reached.

My guess is that the validate method never sees the custom format. If you enter the date in one of the formats of your default/current locale, it's accepted. The problem only happens when you set a custom format in "Format as" in the "Display As" part of the "Edit Parameter" dialog.