IRowSet rowSet = rowSets[0]; Collection expressions = queries[0].getBeforeExpressions( ); for ( Iterator iter = expressions.iterator( ); iter.hasNext( ); ) { rowSet.evaluate( (IBaseExpression) iter.next( ) ); }
rowSet.evaluate( (IBaseExpression) iter.next( ) ); }
	public void onRowSets( IRowSet[] rowSets ) throws BirtException	{		String javaHandlerClass = handle.getEventHandlerClass( );		if ( javaHandlerClass != null && javaHandlerClass.length( ) > 0 )		{			// use java handler if available.			cm.setScript( javaHandlerClass );		}		// prepare the chart model.		rtc = Generator.instance( ).prepare( cm,				new BIRTExternalContext( context ),				new BIRTScriptClassLoader( ),				Locale.getDefault( ) );		// check		if ( rowSets == null				|| rowSets.length != 1				|| rowSets[0] == null				|| queries == null				|| queries[0] == null )		{			// if the Data rows are null/empty, do nothing.			return;		}		else		{			// Evaluate the expressions so that they are registered by the DtE			// in the Report			// Document			IRowSet rowSet = rowSets[0];			Collection expressions = queries[0].getBeforeExpressions( );			for ( Iterator iter = expressions.iterator( ); iter.hasNext( ); )			{				rowSet.evaluate( (IBaseExpression) iter.next( ) );			}			expressions = queries[0].getRowExpressions( );			while ( rowSet.next( ) )			{				for ( Iterator iter = expressions.iterator( ); iter.hasNext( ); )				{					rowSet.evaluate( (IBaseExpression) iter.next( ) );				}			}			expressions = queries[0].getAfterExpressions( );			for ( Iterator iter = expressions.iterator( ); iter.hasNext( ); )			{				rowSet.evaluate( (IBaseExpression) iter.next( ) );			}		}	}