builder.startPageFlow( report.getContent( i ).getStyle( ) .getMasterPage( ) ); report.getContent( i ).accept( builder );
for ( int i = 0; i < report.getContentCount( ); i++ ) { builder.startPageFlow( report.getContent( i ).getStyle( ) .getMasterPage( ) ); report.getContent( i ).accept( builder ); builder.endPageFlow( ); } } else { builder.startPageFlow( null );
	public void execute( Report report, HashMap paramValues )	{		IReportContent reportContent = ContentFactory.createReportContent( report, null );		context.pushContentObject( reportContent );		context.setReport( report );		// Exceute scripts defined in included libraries. For each library,		// executes		// first the included scripts, then the initialize method.		// The current release does not supported externally included library		// files		// handle global libraries in the future		// execute scripts defined in include-script element of this report		// Parameters are not available at this stage		Iterator iter = report.getIncludeScripts( ).iterator( );		while ( iter.hasNext( ) )		{			String fileName = (String) iter.next( );			context.loadScript( fileName );		}		// DE needs to support getInitialize() method		// context.execute(report.getInitialize());		// call methods associated with report		context.execute( report.getBeforeFactory( ) );		// beforeRender is not supported for now		// Set up report parameters		setParameters( paramValues );		// Prepare necessary data for this report		context.getDataEngine( ).prepare( report );		// Report documents are not supported for now		// context.execute(report.getBeforeOpenDoc());		emitter.startReport( reportContent );		// report documents are not supported for now		// context.execute(report.getAfterOpenDoc());		// process page set up information		handlePageSetup( report );		context.pushMasterPage( context.getDefaultMasterPage( ) );		context.pushMasterPage( null );		// process the report body		emitter.startBody( );		//assert ( report.getContentCount( ) >= 1 );		// only top-level elements maybe have the master page reference for now		for ( int i = 0; i < report.getContentCount( ); i++ )		{			builder.startPageFlow( report.getContent( i ).getStyle( )					.getMasterPage( ) );			report.getContent( i ).accept( builder );			builder.endPageFlow( );		}		//Outputs the error message at the end of the report		if ( context.getMsgLst().size() > 0 )		{			IReportItemEmitter textEmitter = emitter.getEmitter( "text" ); //$NON-NLS-1$			if ( textEmitter != null )			{				builder.startPageFlow( null );				textEmitter						.start( ContentFactory								.createTextContent( "There are errors on the report page:" ) );//$NON-NLS-1$				textEmitter.end( );				for ( int i = 0; i < context.getMsgLst( ).size( ); i++ )				{					textEmitter							.start( ContentFactory									.createTextContent( "Error"											+ ( i + 1 )											+ ":"											+ context.getMsgLst( ).get( i )													.toString( ) ) );//$NON-NLS-1$					textEmitter.end( );				}				builder.endPageFlow( );			}		}		//USED TO FIX BUG 74548		//FIXME: update the master page handle routines.		if ( report.getContentCount( ) > 0 )		{			emitter.getPageSetupEmitter( ).endBody( );		}		emitter.endBody( );		context.popMasterPage( );		context.popMasterPage( );		// Report document is not supported		// context.execute(report.getBeforeCloseDoc());		emitter.endReport( );		// close eport document		// Report document is not supported		// context.execute(report.getAfterCloseDoc());		//call afterFactory method of the report		context.popContentObject( );		context.execute( report.getAfterFactory( ) );		context.getDataEngine( ).shutdown( );	}