Bug 133780 Execution sequence of valueExpr(DataItem) and onCreate() is not correct.
In the attached design. There is a DataItem in the table footer that I used to do a sum of the "Amount" column. In the test, I write the onCreate() method as: params["amount"]=Total.sum(row["AMOUNT"]); It passes the aggregation value to a parameter. In the "valueExpr" I write as: "AMOUNT:" + params["amount"] The expression is expected to export the sum. Actual output is: AMOUNT:null Followings are the definitions from Rom Text Spec & Rom Scripting Spec, valueExpr usually should be evalated after the onCreate() method. DataItem.valueExpr: The expression is usually evaluated when the report is rendered, not in the Factory, though it may be evaluated in the Factory also. onCreate: Executed when the element is created in the Factory. Called after the item is created, but before the item is saved to the report document file.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/DataItemExecutor.java
* http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.engine.executor;
import org.eclipse.birt.report.engine.content.IContent;
import org.eclipse.birt.report.engine.content.IDataContent;
import org.eclipse.birt.report.engine.content.impl.DataContent;
import org.eclipse.birt.report.engine.emitter.IContentEmitter;
import org.eclipse.birt.report.engine.ir.DataItemDesign;
import org.eclipse.birt.report.engine.ir.IReportItemVisitor;
import org.eclipse.birt.report.engine.ir.ReportItemDesign;
import org.eclipse.birt.report.engine.script.internal.DataItemScriptExecutor;
/**
 * <code>DataItemExecutor</code> is a concrete subclass of
 * <code>QueryItemExecutor</code> that manipulates data items from database
 * columns, expressions and so on.
 * <p>
 * Data item executor calculates expressions in data item design, generate a
 * data content instance, evaluate styles, bookmark, action property and pass
 * this instance to emitter.
 * 
 * @version $Revision: 1.24 $ $Date: 2005/12/03 05:34:28 $
 */
public class DataItemExecutor extends QueryItemExecutor
{
	class DataItemExecutionState
	{
		Object lastValue;