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/ImageItemExecutor.java
/**
	 * Creates an ImageItemExecutor using this constructor.
	 * 
	 * @param context
	 *            The execution context.
	 * @param visitor
	 *            The report visitor.
	 */
	public ImageItemExecutor( ExecutionContext context,
			IReportItemVisitor visitor )
	{
		super( context, visitor );
	}
	/**
	 * execute the image. The execution process is:
	 * 
	 * <li> create the image content
	 * <li> push it into the stack
	 * <li> open the query and seek to the first record
	 * <li> intialize the content
	 * <li> process action, bookmark, style and visibility
	 * <li> process the image content
	 * <li> execute the onCreate if necessary
	 * <li> call emitter to output the image
	 * <li> close query
	 * <li> popup the image
	 * 
	 * @see org.eclipse.birt.report.engine.executor.ReportItemExecutor#excute(org.eclipse.birt.report.engine.ir.ReportItemDesign,
	 *      org.eclipse.birt.report.engine.emitter.IReportEmitter)
	 */