Hello everyone
I'm designing an accounting report with various aggregations and data fields and when I try to aggregate on a field I get the following error:
"Target Aggregation Name does not exist"
Now... the computed field has its expression like this
if( row["A"] == 'ASSET' )
{
some value
}
else
{
0;
}
if I put a constant value, like 1, the aggregation works...
EDIT:
More about the error log
data.engine.BirtException ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: Target Aggregation Name does not exist
Script source: null, line: 10,198, text:
<compiled script>. See next exception for more information.
More
Script source: null, line: 0, text:
<compiled script>
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1166)
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1130)
at org.eclipse.birt.report.engine.executor.DataItemExecutor.execute(DataItemExecutor.java:100)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:64)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:135)
And
Script source: null, line: 0, text:
<compiled script>
at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118)
at org.eclipse.birt.data.engine.expression.BytecodeExpression.evaluate(BytecodeExpression.java:53)
at org.eclipse.birt.data.engine.expression.ExprEvaluateUtil.evaluateCompiledExpression(ExprEvaluateUtil.java:472)
at org.eclipse.birt.data.engine.expression.ExprEvaluateUtil.evaluateValue(ExprEvaluateUtil.java:332)
at org.eclipse.birt.data.engine.executor.aggregation.AggregationHelper.evaluateArgsValue(AggregationHelper.java:481)
at org.eclipse.birt.data.engine.executor.aggregation.AggregationHelper.onRow(AggregationHelper.java:344)
at org.eclipse.birt.data.engine.executor.aggregation.AggregationHelper.pass(AggregationHelper.java:184)
at org.eclipse.birt.data.engine.executor.aggregation.AggregationHelper.calculate(AggregationHelper.java:147)
at org.eclipse.birt.data.engine.executor.aggregation.AggregationHelper.populateAggregations(AggregationHelper.java:109)
at org.eclipse.birt.data.engine.executor.aggregation.AggregationHelper.<init>(AggregationHelper.java:86)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateAggregationInBinding(PassManager.java:145)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.pass(PassManager.java:128)