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/ReportEngineService.java
if ( value == null )
		{
			return null;
		}
		value = value.replaceAll( "\"", "\"\"" ); 
		boolean needQuote = false;
		needQuote = ( value.indexOf( ',' ) != -1 )
				|| ( value.indexOf( '"' ) != -1 )
				|| ( value.indexOf( 0x0A ) != -1 )
				|| value.startsWith( " " ) || value.endsWith( " " ); 
		value = needQuote ? "\"" + value + "\"" : value; 
		return value;
	}
	/**
	 * Prepare the report parameters.
	 * 
	 * @param request
	 * @param task
	 * @param configVars
	 * @param locale
	 * @return map of the request parameters
	 */
	public HashMap parseParameters( HttpServletRequest request,
			IGetParameterDefinitionTask task, Map configVars, Locale locale )
	{
		assert task != null;
		HashMap params = new HashMap( );
		Collection parameterList = task.getParameterDefns( false );
		for ( Iterator iter = parameterList.iterator( ); iter.hasNext( ); )
		{