Project: Birt
Bug 146752 [Compatibility]Backward compatibility for expression
Reported: 2006-06-13 01:13:41 | Status: closed fixed

Steps to reproduce: 1.Preview the attached report(Created by designer2.0) Actual result: The following items have errors: report report: - Invalid Javascript expression: Total.sum(row["AMOUNT"]) Invalid group level: SUM data.engine.InvalidJSExpr ( 1 time(s) ) detail : org.eclipse.birt.data.engine.core.DataException: Invalid Javascript expression: Total.sum(row["AMOUNT"])Invalid group level: SUM at org.eclipse.birt.data.engine.expression.AbstractExpressionParser.compileExpression(AbstractExpressionParser.java:69) at org.eclipse.birt.data.engine.expression.ExpressionProcessor.calculate(ExpressionProcessor.java:436) at org.eclipse.birt.data.engine.executor.transform.group.GroupProcessorManager.calculateExpressionList(GroupProcessorManager.java:119) at org.eclipse.birt.data.engine.executor.transform.group.GroupInstanceFilter.doGroupFiltering(GroupInstanceFilter.java:64) at org.eclipse.birt.data.engine.executor.transform.group.GroupProcessorManager.doGroupFilteringAndSorting(GroupProcessorManager.java:78) at org.eclipse.birt.data.engine.executor.transform.MultiPassRowProcessor.populateResultSet(MultiPassRowProcessor.java:334) at org.eclipse.birt.data.engine.executor.transform.MultiPassRowProcessor.doPopulation(MultiPassRowProcessor.java:137) at org.eclipse.birt.data.engine.executor.transform.MultiPassRowProcessor.pass(MultiPassRowProcessor.java:103) at org.eclipse.birt.data.engine.executor.transform.ResultSetPopulator.populateResultSet(ResultSetPopulator.java:206) at org.eclipse.birt.data.engine.executor.transform.CachedResultSet.<init>(CachedResultSet.java:69) at org.eclipse.birt.data.engine.executor.DataSourceQuery.execute(DataSourceQuery.java:488) at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.executeOdiQuery(PreparedOdaDSQuery.java:257) at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:679) at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:152) at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:158) at org.eclipse.birt.report.engine.data.dte.DteResultSet.<init>(DteResultSet.java:79) at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:113) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:214) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:204) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.openResultSet(QueryItemExecutor.java:62) at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:123) at org.eclipse.birt.report.engine.executor.ReportExecutorVisitor.visitTableItem(ReportExecutorVisitor.java:205) at org.eclipse.birt.report.engine.ir.TableItemDesign.accept(TableItemDesign.java:69) at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:129) at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:89) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:171) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.actionhandler.BirtRunAndRenderActionHandler.__execute(Unknown Source) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(Unknown Source) at org.eclipse.birt.report.presentation.aggregation.layout.EngineFragment.doService(Unknown Source) at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment.service(Unknown Source) at org.eclipse.birt.report.servlet.BirtEngineServlet.__doGet(Unknown Source) at org.eclipse.birt.report.servlet.BaseReportEngineServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.eclipse.tomcat.internal.EclipseErrorReportValve.invoke(EclipseErrorReportValve.java:153) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)Caused by: org.eclipse.birt.data.engine.core.DataException: Invalid group level: SUM at org.eclipse.birt.data.engine.expression.ExpressionParseHelper.getCurrentGroupLevel(ExpressionParseHelper.java:272) at org.eclipse.birt.data.engine.expression.ExpressionParseHelper.compileAggregateExpr(ExpressionParseHelper.java:155) at org.eclipse.birt.data.engine.expression.AbstractExpressionParser.processChild(AbstractExpressionParser.java:238) at org.eclipse.birt.data.engine.expression.ExpressionParseHelper.processChild(ExpressionParseHelper.java:459) at org.eclipse.birt.data.engine.expression.AbstractExpressionParser.processScriptTree(AbstractExpressionParser.java:156) at org.eclipse.birt.data.engine.expression.AbstractExpressionParser.compileExpression(AbstractExpressionParser.java:65) ... 68 more

Files changed in fix:
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/api/querydefn/ConditionalExpression.java