Collection rowExpressions = ( query == null ? null : query .getRowExpressions( ) ); IResultIterator rsIterator = ( ( DteResultSet ) rset ) .getResultIterator( ); IRowData rowData = new RowData( rsIterator, rowExpressions );
IRowData rowData = null; if(query!=null) { Collection rowExpressions = ( query .getRowExpressions( ) );  IResultIterator rsIterator = ( ( DteResultSet ) rset ) .getResultIterator( ); rowData = new RowData( rsIterator, rowExpressions ); }
	public void execute( ReportItemDesign item, IContentEmitter emitter )	{		GridItemDesign gridItem = ( GridItemDesign ) item;		ITableContent tableObj = report.createTableContent( );		IContent parent = context.getContent( );		context.pushContent( tableObj );		openResultSet( item );		accessQuery( item, emitter );		initializeContent( parent, item, tableObj );		processAction( item, tableObj );		processBookmark( item, tableObj );		processStyle( item, tableObj );		processVisibility( item, tableObj );		for ( int i = 0; i < gridItem.getColumnCount( ); i++ )		{			ColumnDesign columnDesign = gridItem.getColumn( i );			Column column = new Column( );			column.setStyleClass( columnDesign.getStyleName( ) );			column.setWidth( columnDesign.getWidth( ) );			tableObj.addColumn( column );		}		IBaseQueryDefinition query = item.getQuery( );		Collection rowExpressions = ( query == null ? null : query				.getRowExpressions( ) );		IResultIterator rsIterator = ( ( DteResultSet ) rset )				.getResultIterator( );		IRowData rowData = new RowData( rsIterator, rowExpressions );		if ( context.isInFactory( ) )		{			GridScriptExecutor.handleOnCreate( ( TableContent ) tableObj,					rowData, context );		}		startTOCEntry( tableObj );		if ( emitter != null )		{			emitter.startTable( tableObj );		}		ITableBandContent body = report.createTableBody( );		initializeContent( tableObj, null, body );		context.pushContent( body );		startTOCEntry( body );		if ( emitter != null )		{			emitter.startTableBody( body );		}		for ( int i = 0; i < gridItem.getRowCount( ); i++ )		{			RowDesign row = gridItem.getRow( i );			if ( row != null )			{				executeRow( i, body, row, emitter );			}		}		if ( emitter != null )		{			emitter.endTableBody( body );		}		finishTOCEntry( );		context.popContent( );		if ( emitter != null )		{			emitter.endTable( tableObj );		}		finishTOCEntry( );		closeResultSet( );		context.popContent( );	}