Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Disable drill through actions in PDF format (How to disable drill-through actions when rendering is not HTML format)
Disable drill through actions in PDF format [message #768092] Mon, 19 December 2011 15:09 Go to next message
donino donino is currently offline donino doninoFriend
Messages: 183
Registered: July 2011
Senior Member
Hi,

I implemented a custom IHTMLActionHandler to manage drill-through exactly with my requirements.
But i would need to enable drill through hyperlinks only when format is HTML.

For instance, i tried when format is PDF to return an empty string in IHTMLActionHandler.getURL(IAction actionDefn, Object context), but it didn't work: the render task replaced the empty string by a default baseURl and keeps displaying hyperlinks.

Is there a way to do this?

Thanks!
Re: Disable drill through actions in PDF format [message #768314 is a reply to message #768092] Mon, 19 December 2011 22:33 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I do not see an easy way of doing this without changing the pdf emitter
code.

You could try putting in something like:
protected String buildDrillAction( IAction action, Object context )
{
String baseURL = null;
if ( context != null )
{
if ( context instanceof HTMLRenderContext )
{
baseURL = ( (HTMLRenderContext) context ).getBaseURL( );
}
if ( context instanceof PDFRenderContext )
{
return "javascript:void(0);";
}
..
..
..
..

But this most likely will show the user an error.

Jason

On 12/19/2011 10:09 AM, dpardon wrote:
> Hi,
> I implemented a custom IHTMLActionHandler to manage drill-through
> exactly with my requirements. But i would need to enable drill through
> hyperlinks only when format is HTML.
> For instance, i tried when format is PDF to return an empty string in
> IHTMLActionHandler.getURL(IAction actionDefn, Object context), but it
> didn't work: the render task replaced the empty string by a default
> baseURl and keeps displaying hyperlinks.
> Is there a way to do this?
>
> Thanks!
Re: Disable drill through actions in PDF format [message #768549 is a reply to message #768314] Tue, 20 December 2011 10:48 Go to previous message
donino donino is currently offline donino doninoFriend
Messages: 183
Registered: July 2011
Senior Member
Thanks Jason,

indeed that's much better: with javascript:void(0), at least Adobe or Excel won't try to open a browser if a user click on hyperlinks. Moreover, on mouseover on these links, users now won't see a a huge URL, but just a small javascript tooltip. So i will let it like that, though it's still not ideal: for PDF it's ok, but for example in Excel it may confuse users when they try to select cells range in a crosstab, as shown in screen below it displays a security warning and tries to download a file named void(0):

index.php/fa/6505/0/

I will try to have a look on emitters code to see if it could be conceivable to disable hyperlinks when needed

Dom

[Updated on: Tue, 20 December 2011 11:31]

Report message to a moderator

Previous Topic:Asynchronous invocation of reports
Next Topic:How to handle click on image with areas
Goto Forum:
  


Current Time: Tue Apr 23 12:41:40 GMT 2024

Powered by FUDForum. Page generated in 0.04359 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top