Bug 146352 support cancel execution for "view report ..." tool bar and menu actions.
Current "view report as HTML" and "view report as PDF" in the menu tool bar uses RunAndRender task to stream back the report output. As a result, total page count is not available when the report is being streamed back. Please change these two requests to use Run task and then render task to generate HTML or PDF, so that the total page count is calculate. preview tab could continue to use RunAndRender task, since it is for preview.
viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java
if ( node == null )
		{
			if ( doc != null )
				doc.close( );
			throw new ReportServiceException(
					BirtResources
							.getMessage( ResourceConstants.REPORT_SERVICE_EXCEPTION_INVALID_TOC ) );
		}
		if ( doc != null )
			doc.close( );
		return transformTOCNode( node );
	}
	public String findTocByName( String docName, String name,
			InputOptions options )
	{
		IReportDocument doc = ReportEngineService.getInstance( )
				.openReportDocument( getReportDesignName( options ), docName,
						getModuleOptions( options ) );
		String tocId = null;
		if ( doc != null )
		{
			Locale locale = null;
			if ( options != null )
				locale = (Locale) options.getOption( InputOptions.OPT_LOCALE );
			if ( locale == null )
				locale = Locale.getDefault( );
			ITOCTree tocTree = doc.getTOCTree(
					DesignChoiceConstants.FORMAT_TYPE_VIEWER, ULocale
							.forLocale( locale ) );
			assert tocTree != null;