Bug 198221 Different master page when export report current page to different format.[05]
Description: Different master page when export report current page to different format. Build number:2.2.1.v200707270630 Steps to reproduce: 1. Preview attached report in Web Viewer. (the report uses multiple master page) 2. Jump to the third page. 3. Export report, select current page, select different formats. Expected result: All formats apply the same master page for the third page. Actual result: In pdf/ps, Master page content is page number in page header. In word/ppt, Master page content is current date in page footer. Error log:n/a
engine/org.eclipse.birt.report.engine.tests/test/org/eclipse/birt/report/engine/api/document/ReportDocumentTest.java
String[] bookmarks = new String[]{"reportlet_table",
				"reportlet_group_0", "reportlet_group_1", "reportlet_group_2"};
		for ( int i = 0; i < bookmarks.length; i++ )
		{
			IRenderTask renderTask = engine.createRenderTask( document );
			renderTask.setRenderOption( option );
			renderTask.setReportlet( bookmarks[i] );
			renderTask.render( );
			assertTrue( renderTask.getErrors( ).isEmpty( ) );
			renderTask.close( );
			String pageContent = out.toString( "UTF-8" );
			if ( bookmarks[i].indexOf( "group" ) == -1 )
			{
				
				assertTrue( pageContent.indexOf( "reportlet_table" ) != -1 );
				int indexOf = pageContent.indexOf( "reportlet_group" );
				int lastIndexOf = pageContent.lastIndexOf( "reportlet_group" );
				assertTrue( indexOf != -1 && lastIndexOf != -1
						&& indexOf != lastIndexOf );
			}
			else
			{
				
				assertTrue( pageContent.indexOf( "reportlet_table" ) != -1 );
				int indexOf = pageContent.indexOf( "reportlet_group" );
				int lastIndexOf = pageContent.lastIndexOf( "reportlet_group" );
				assertTrue( indexOf != -1 && lastIndexOf != -1
						&& indexOf == lastIndexOf );
			}
			out.reset( );