Community
Participate
Working Groups
On the org.eclipse.birt.report.model.api.DataSetParameter class the setDefaultValue method does not work if the value is an expression (such as a date in the form "2005-01-01"). This is a result of 191445 which made the Default Value an expression. Recommend either deprecating the method (in favor of setPropertyExpression) or better change implementation to use setPropertyExpression. This is primarily an issue for those people that are using Design API, seems to have all ready been addressed in the Designer UI elements.
In DataSetParameter: public void setDefaultValue( String expr ) If the call passes into a string,this API doesn't work? To set the expression value, should use setExpressionProperty( ).
Does not work if Parameter is type Date and you pass any of the following: - 2005-01-01 - "2005-01-01" - '2005-01-01' It does work if you use setPropertyExpression of type JavaScript with a quote delimited date.
(In reply to comment #2) > Does not work if Parameter is type Date and you pass any of the following: > - 2005-01-01 > - "2005-01-01" > - '2005-01-01' > > It does work if you use setPropertyExpression of type JavaScript with a quote > delimited date. If pass a string to DataSetParameterHandle.setDefaultValue(string), the string value is treated as a javascript string. This is an API compatibility. Can you please give out details how this API doesn't work out?
Hi, Have you try this ? myParameter.setDefaultValue("\"2005-01-01\"); Regards, BiM
Please set default value as ("\"2005-10-10\""), which can parse correct date default value to report. We can not deprecate setDefaultValue since multiple existed application and samples using it. Set Fix. If you still have any questions, please reopen this bug.
fix