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

Bug 312769

Summary: filter condition can't set "less than" a list box parameter which allow multiple values
Product: z_Archived Reporter: Yong Jiang <yjiang>
Component: BIRTAssignee: Wenjie Tu <wtu>
Status: VERIFIED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, mwu
Version: 2.6.0   
Target Milestone: 2.6.1   
Hardware: PC   
OS: Windows XP   
Whiteboard: Obsolete

Description Yong Jiang CLA 2010-05-13 06:08:45 EDT
Description:
  filter condition can't set "less than" a list box parameter which allow multiple values

Test Build:
BIRT2.6.0 v20100513-1121

Step to reproduce:

1. New a sampledb source.
2. New a dataset from table CLASSICMODELS.PAYMENTS
3. New a table binding dataset
4. New a parameter named p1 and select Integer, List Box, Dynamic, binding to the dataset and select value column "CUSTOMERNUMBER", tick "Allow Multiple Values". 
5. Select the table created, click on "filters" tab in property editor view.
6. Click on "Add" button, Expression: row["CUSTOMERNUMBER"], Operator: "less than", value1 "param["p1"]". 
7. Preview and select a single value in parameter dialog and click "OK".

Expect result:
filter works

Actual result:
error message throw out

Error log:
org.eclipse.birt.report.engine.api.EngineException: The filter definition using expression "row["CUSTOMERNUMBER"]" is not valid.
.
.
.
Caused by: org.eclipse.birt.data.engine.core.DataException: Invalid data type found in conditional expression.
   at org.eclipse.birt.data.engine.script.ScriptEvalUtil.compare(ScriptEvalUtil.java:378)
... 103 more
Comment 1 Wenjie Tu CLA 2010-07-21 02:09:27 EDT
When a multi-value type report parameter is included in a single-value-required BIRT Filter:
1. If no more than 1 value is provided for multi-value type report parameter, just takes this only one value(or null) to do filter;
2. Else throws exception, like "Failed to apply filter due to invalid filter condition of comparing a single value with multiple values of [value1, value2,...].Please set only one value for this filter."

Fixed.
Comment 2 Xiaoying Gu CLA 2010-07-21 03:08:35 EDT
Verified in daily build 20100720