Skip to Content

If the key entry of characteristics is initial – BI Report displays char #. To change this symbol with empty value in Web Application Designer you need to follow the steps:

 

*Step 1:*
In WAD XHTML-view after the string:

<!– insert data providers, items and other template content here –><br /> 

you need add new string with JavaScript-code:

 

Step 2:<br />Add this code to JavaScript Item (choose from miscellaneous):</p><div style=”overflow-y: scroll; background-color: #e0e0ff; width: 483px; height: 220px”><p>function ModifyData( ) { <br />  var Elements=document.getElementsByTagName(‘td’); <br />  for(var i=0;i<Elements.length;i++) {<br />    if(Elements[i].innerText==’#’) {<br />      if (Elements[i].innerHTML.charAt(1) == ‘T’ ) {<br />        Elements[i].innerHTML = Elements[i].innerHTML.replace(‘>#<‘,’> <‘);<br />      } else {<br />        Elements[i].innerText=’ ‘;<br />        Elements[i].style.whitespace=’nowrap’;<br />      }<br />    }<br />  }<br />}</p><p>function addLoadEvent(func) {   <br />  var oldonload = window.onload;   <br />  if (typeof window.onload != ‘function’) {   <br />    window.onload = func;   <br />  } else {   <br />    window.onload = function() {   <br />      if (oldonload) {   <br />        oldonload();   <br />      }   <br />       func();   <br />    }<br />  }   <br />}   </p></div><p> </p><p>Explanation:
1) Condition if (Elements[i].innerHTML.charAt(1) == ‘T’ ) need for correct replace # in hierarchy view.

2) Function +addLoadEvent +need for correct SAP_BI_Scripts works.

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Ranga K

    Thanks Andrey.. You did a great job.<br/><br/>In addition to your code. I added code for “Mozilla” as well & display “NA” instead of “Not assigned or #”<br/><br/>Please check the code below:<br/><br/>function ModifyData( ) {<br/> var Elements=document.getElementsByTagName(‘td’);<br/> for(var i=0;i<Elements.length;i+) {<br/>   if(Elements[i].innerText == ‘#’ || Elements[i].innerText == ‘Not assigned’) {<br/>        if (Elements[i].innerHTML.charAt(1) == ‘T’ ) {<br/>       Elements[i].innerHTML = Elements[i].innerHTML.replace(‘>#<‘,’> <‘);<br/>         }else {<br/>       Elements[i].innerText=’NA ‘;<br/>       Elements[i].style.whitespace=’nowrap’;<br/>     if(Elements[i].style.fontSize) {<br/>        var s = parseInt(Elements[i].style.fontSize.replace(“px”,””));<br/>      } else {<br/>         var s = 10;<br/>      }<br/>      if(s!=min) {<br/>         s -= 1;<br/>      }<br/>      Elements[i].style.fontSize = s“px”<br/>     }<br/>   }else if(Elements[i].textContent == ‘#’ || Elements[i].textContent == ‘Not assigned’) {<br/>        if (Elements[i].innerHTML.charAt(1) == ‘T’ ) {<br/>       Elements[i].innerHTML = Elements[i].innerHTML.replace(‘>#<‘,’> <‘);<br/>         }else {<br/>       Elements[i]. textContent =’RANGA’;<br/>       Elements[i].style.whitespace=’nowrap’;<br/>     if(Elements[i].style.fontSize) {<br/>        var s = parseInt(Elements[i].style.fontSize.replace(“px”,””));<br/>      } else {<br/>         var s = 10;<br/>      }<br/>      if(s!=min) {<br/>         s -= 1;<br/>      }<br/>      Elements[i].style.fontSize = s+”px”<br/>      }<br/>   }<br/> }<br/>}<br/><br/>Thanks,<br/>Ranga.K<br/>Sony India Pvt. Ltd.

    (0) 

Leave a Reply