| Summary: | DataSetParameter.setDefaultValue Should be an Expression | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Scott Rosenbaum <scottr> |
| Component: | BIRT | Assignee: | Birt-Report-inbox <Birt-Report-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | Liwen Chen <lchen> |
| Severity: | normal | ||
| Priority: | P3 | CC: | berenice.maurel, bluesoldier, lchen, rlu |
| Version: | 2.5.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Scott Rosenbaum
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 |