Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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 10:09 Go to next message
donino donino is currently offline donino donino
Messages: 160
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 17:33 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
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!


Jason Weathersby

BIRT Exchange
Re: Disable drill through actions in PDF format [message #768549 is a reply to message #768314] Tue, 20 December 2011 05:48 Go to previous message
donino donino is currently offline donino donino
Messages: 160
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 06: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: Fri Apr 18 14:12:46 EDT 2014

Powered by FUDForum. Page generated in 0.04886 seconds