summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2012-01-09 21:36:43 (EST)
committer mwu2012-01-09 21:36:43 (EST)
commit1571bb502b3e984f79a080ee29689940c7afeb46 (patch)
tree96722677cfbd8d8e0fe0eb5ed3869450aaa10d0a
parenteb9b65f3251f6bea6e295806f9375c1346762e13 (diff)
downloadorg.eclipse.birt-1571bb502b3e984f79a080ee29689940c7afeb46.zip
org.eclipse.birt-1571bb502b3e984f79a080ee29689940c7afeb46.tar.gz
org.eclipse.birt-1571bb502b3e984f79a080ee29689940c7afeb46.tar.bz2
partial fix ted 46583
-rw-r--r--data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/util/filter/DimensionFilterEvalHelper.java22
1 files changed, 19 insertions, 3 deletions
diff --git a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/util/filter/DimensionFilterEvalHelper.java b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/util/filter/DimensionFilterEvalHelper.java
index 12f8f37..0e89758 100644
--- a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/util/filter/DimensionFilterEvalHelper.java
+++ b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/util/filter/DimensionFilterEvalHelper.java
@@ -46,6 +46,18 @@ BaseDimensionFilterEvalHelper implements IJSDimensionFilterHelper
}
+ private boolean containsInAggrLevels( String level )
+ {
+ for ( DimLevel dimLevel : aggrLevels )
+ {
+ if ( dimLevel.getLevelName( ).equals( level ) )
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.birt.data.engine.olap.util.filter.IJsFilter#evaluateFilter(org.eclipse.birt.data.engine.olap.util.filter.IResultRow)
@@ -63,11 +75,15 @@ BaseDimensionFilterEvalHelper implements IJSDimensionFilterHelper
for ( int i = 0; i < axisLevels.length; i++ )
{
DimLevel level = new DimLevel( axisLevels[i] );
- if ( CompareUtil.compare( resultRow.getFieldValue( level.toString( ) ),
- axisValues[i] ) != 0 )
+ if ( containsInAggrLevels( level.getLevelName( ) ) )
{
- return false;
+ if ( CompareUtil.compare( resultRow.getFieldValue( level.toString( ) ),
+ axisValues[i] ) != 0 )
+ {
+ return false;
+ }
}
+
}
}
Object result = ScriptEvalUtil.evalExpr( expr, cx.newContext( scope ), ScriptExpression.defaultID, 0 );