Bug 199714 NPE with invalid url[0002]
viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java
.getCause( ) );
		}
		finally
		{
			if ( doc != null )
				doc.close( );
		}
	}
	/**
	 * @see org.eclipse.birt.report.service.api.IViewerReportService#renderReport(java.lang.String,
	 *      int,java.lang.String,
	 *      org.eclipse.birt.report.service.api.InputOptions,
	 *      java.io.OutputStream)
	 */
	public void renderReport( String docName, int pageNum, String pageRange,
			InputOptions renderOptions, OutputStream out )
			throws ReportServiceException
	{
		IReportDocument doc = ReportEngineService.getInstance( )
				.openReportDocument( getReportDesignName( renderOptions ),
						docName, getModuleOptions( renderOptions ) );
		HttpServletRequest request = (HttpServletRequest) renderOptions
				.getOption( InputOptions.OPT_REQUEST );
		Locale locale = (Locale) renderOptions
				.getOption( InputOptions.OPT_LOCALE );
		Boolean isMasterPageContent = (Boolean) renderOptions
				.getOption( InputOptions.OPT_IS_MASTER_PAGE_CONTENT );
		boolean isMasterPage = isMasterPageContent == null
				? true
				: isMasterPageContent.booleanValue( );