for ( int i = 0; i < report.getPageSetup().getMasterPageCount( ); i++ ) { MasterPageDesign masterPage = report.getPageSetup().getMasterPage( i ); if ( masterPage != null ) { SimpleMasterPageDesign pageDesign = (SimpleMasterPageDesign) masterPage; for ( int j = 0; j < pageDesign.getHeaderCount( ); j++ ) { pageDesign.getHeader( j ).accept( this, null ); } for ( int j = 0; j < pageDesign.getFooterCount( ); j++ ) { pageDesign.getFooter( j ).accept( this, null ); } } }
		public void buildQuery( Report report, ExecutionContext context )		{			this.report = report;			this.context = context;			queries = report.getQueries( );			// first clear the collection in case the caller call this function			// more than once.			queries.clear( );			queryIDs = report.getQueryIDs( );			queryIDs.clear( );			// visit report			for ( int i = 0; i < report.getContentCount( ); i++ )				report.getContent( i ).accept( this, null );		}