link.append( "&__overwrite=true" );
	private void handleHyperlinkAction(IArea area)	{		IContent content = area.getContent();		if( null != content )		{			IHyperlinkAction hlAction = content.getHyperlinkAction();			if ( null != hlAction )			try			{				switch (hlAction.getType())				{				case IHyperlinkAction.ACTION_BOOKMARK: 					writer.addAnnotation( new PdfAnnotation( writer,							layoutPointX2PDF(area.getAbsoluteX()),							layoutPointY2PDF(area.getAbsoluteY()+area.getHeight()),							layoutPointX2PDF(area.getAbsoluteX()+area.getWidth()),							layoutPointY2PDF(area.getAbsoluteY()),							createPdfAction(									hlAction.getHyperlink(), 									hlAction.getBookmark(), 									hlAction.getTargetWindow(), IHyperlinkAction.ACTION_BOOKMARK)) );					break;									case IHyperlinkAction.ACTION_DRILLTHROUGH: 					String baseURL = null;										if(context!=null)					{						baseURL = context.getBaseURL();					}					StringBuffer link = new StringBuffer( );					String reportName = hlAction.getReportName( );					if ( reportName != null && !reportName.equals( "" ) )//$NON-NLS-1$					{						String format = hlAction.getFormat();						if ( "pdf".equalsIgnoreCase( format ) ) //$NON-NLS-1$			            {			    			link.append( baseURL.replaceFirst( "frameset", "run" ) ); //$NON-NLS-1$ //$NON-NLS-2$			            }						else if ( "html".equalsIgnoreCase( format ) ) //$NON-NLS-1$			            {			    			link.append( baseURL ); 			            }													link.append( "?__report=" );	//$NON-NLS-1$						try						{							link.append( URLEncoder.encode( reportName, "UTF-8" ) ); 	//$NON-NLS-1$						}						catch ( UnsupportedEncodingException e1 )						{							//It should not happen. Does nothing						}						if(format !=null && format.length()>0)						{							link.append( "&__format=" + format );//$NON-NLS-1$						}						//Adds the parameters						if ( hlAction.getParameterBindings( ) != null )						{							Iterator paramsIte = hlAction.getParameterBindings( ).entrySet( ).iterator( );							while ( paramsIte.hasNext( ) )							{								Map.Entry entry = (Map.Entry) paramsIte.next( );								try								{									link.append( "&" + URLEncoder.encode( (String) entry.getKey( ), "UTF-8" ) + "=" + URLEncoder.encode( (String) entry.getValue( ), "UTF-8" ) );//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$												}								catch ( UnsupportedEncodingException e )								{									//Does nothing								}							}						}					}										if ( hlAction.getBookmark() != null )					{						link.append( "&__bookmark=" ); //$NON-NLS-1$						link.append( hlAction.getBookmark() );					}					writer.addAnnotation( new PdfAnnotation( writer,							layoutPointX2PDF(area.getAbsoluteX()),							layoutPointY2PDF(area.getAbsoluteY()+area.getHeight()),							layoutPointX2PDF(area.getAbsoluteX()+area.getWidth()),							layoutPointY2PDF(area.getAbsoluteY()),		            		createPdfAction(link.toString( ), null, hlAction.getTargetWindow(), IHyperlinkAction.ACTION_DRILLTHROUGH )));					break;									case IHyperlinkAction.ACTION_HYPERLINK: 					writer.addAnnotation( new PdfAnnotation( writer,							layoutPointX2PDF(area.getAbsoluteX()),							layoutPointY2PDF(area.getAbsoluteY()+area.getHeight()),							layoutPointX2PDF(area.getAbsoluteX()+area.getWidth()),							layoutPointY2PDF(area.getAbsoluteY()),							createPdfAction(hlAction.getHyperlink(), null, hlAction.getTargetWindow(), IHyperlinkAction.ACTION_HYPERLINK)) );					break;				}			}			catch (Exception e)			{				logger.log(Level.WARNING, e.getMessage(), e);			}		}	}