private static String createURL( String servletName, String report, String format, boolean inDesigner )
private static String createURL( String report, Map params )
	private static String createURL( String servletName, String report,			String format, boolean inDesigner )	{		String encodedReportName = null;		try		{			encodedReportName = URLEncoder.encode( report, "utf-8" ); //$NON-NLS-1$		}		catch ( UnsupportedEncodingException e )		{			// Do nothing		}		String locale = ViewerPlugin.getDefault( ).getPluginPreferences( )				.getString( USER_LOCALE );		String svgFlag = ViewerPlugin.getDefault( ).getPluginPreferences( )				.getString( SVG_FLAG );		boolean bSVGFlag = false;		// Get maxrows preference		String maxrows = ViewerPlugin.getDefault( ).getPluginPreferences( )				.getString( PREVIEW_MAXROW );		if ( maxrows == null )			maxrows = ""; //$NON-NLS-1$		// get -dir rtl option		boolean rtl = false;		String eclipseCommands = System.getProperty( "eclipse.commands" ); //$NON-NLS-1$		if ( eclipseCommands != null )		{			String[] options = eclipseCommands.split( "-" ); //$NON-NLS-1$			String regex = "[\\s]*[dD][iI][rR][\\s]*[rR][tT][lL][\\s]*"; //$NON-NLS-1$			Pattern pattern = Pattern.compile( regex );			for ( int i = 0; i < options.length; i++ )			{				String option = options[i];				if ( pattern.matcher( option ).matches( ) )				{					rtl = true;					break;				}			}		}		if ( "true".equalsIgnoreCase( svgFlag ) ) //$NON-NLS-1$		{			bSVGFlag = true;		}		String masterPageContent = ViewerPlugin.getDefault( )				.getPluginPreferences( ).getString( MASTER_PAGE_CONTENT );		boolean bMasterPageContent = true;		if ( "false".equalsIgnoreCase( masterPageContent ) ) //$NON-NLS-1$		{			bMasterPageContent = false;		}		// So far, only report name is encoded as utf-8 format		return getBaseURL( )				+ servletName				+ "?" //$NON-NLS-1$				+ "__report=" + encodedReportName //$NON-NLS-1$				+ "&__format=" + format //$NON-NLS-1$				+ "&__svg=" + String.valueOf( bSVGFlag ) //$NON-NLS-1$				+ ( LocaleTable.containsKey( locale )						? "&__locale=" + LocaleTable.get( locale ) : "" ) //$NON-NLS-1$ //$NON-NLS-2$				+ "&__designer=" //$NON-NLS-1$				+ String.valueOf( inDesigner )				+ "&__masterpage=" + String.valueOf( bMasterPageContent ) //$NON-NLS-1$				+ "&__rtl=" + String.valueOf( rtl )  //$NON-NLS-1$				+ "&__maxrows=" + maxrows; //$NON-NLS-1$	}