Sunil S. Ranka's Weblog

Superior BI is the antidote to Business Failure

How To disable hyperlink for Value Interaction column

Posted by sranka on July 15, 2009

Hi All,

Recently at client place, came across very interesting requirement. The tone of requirement was very basic, but it was amazing to see the tremendous business value, for this requirement.

Following was the requirement :

If the data value in value interaction column is null, than there should be some “Custom Text” with out any hyperlink, but if column has value than functionality should be same as Out-Of-Box.

Steps to follow ::

  • In the Column Formula, under — Edit  Column Formula window — put following code (change “TableName”.”ColumnName” appropriately)  :

case when "TableName"."ColumnName" is null then 'No Data' else "TableName"."ColumnName" end

  • Create Static Text View and add following Java Script, make sure Static Text View is last in the compound laye out :

<script>
var aElm=document.getElementsByTagName('td');
for(var i=0; i<aElm.length; i++) {
	if((aElm[i].className.indexOf("OOLD") > -1)){
	//alert(aElm[i].innerHTML);
		if((aElm[i].innerHTML.indexOf("<span><span>No Data</span></span>") > -1)){
			aElm[i].innerHTML = '<span><span>No Data</span></span>';
		}// end of if
	}// end of if
}// end of for
</script>
  • Below image shows the final out come and Compound Lay out view.

Compound Layout and Final View

Compound Layout and Final View

I have tried explaining with an abstraction, I will be more than happy to answer any specific question.
Hope This Helps,

Sunil S Ranka

About these ads

7 Responses to “How To disable hyperlink for Value Interaction column”

  1. Aditya said

    Really cool Post , Did You ever work for cisco ?
    Regards

  2. Srinivas Malyala said

    Thanks for sharing with us …nice article

  3. santhi said

    Hi Sunil,
    I have a wrequirement like,

    In discoverer at runtime we can drag a column into page items. How to do it for a pivot table in OBIEE

    Thanks

  4. santhi said

    i am very much impressed with your scripts and all.

    The above requirement is very urgent. I really need your help. please help me.

    thanks,santhi

  5. santhi said

    hi,

    Above you have explained how to disable link for part of the data.
    How to disable links for entire report.

    currently iam doing like,setting the No interaction property in data foramat for each and every column. But if it will be done using one script it will be helpful to us.

    thanks and Regards,

  6. santhi said

    hI
    ANY ONE PLEASE HELP ME ON THE ABOVE REQUIREMENTS.

    Thanks and Regards,
    santhi

  7. Raghu said

    Excellent Stuff..

    Cheers..:)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 45 other followers

%d bloggers like this: