Watching a drop down report in an IFrame - OBIEE 11g

Thanks to bittu4u4ver ( IT TOOLBOX - Javascript group ) for helping me correcting the javascript which aims at viewing a report in the IFrame that has been selected in the drop down list. Note that this exercise is carried on OBIEE 11g.

First of all open any of the existing 4 reports in the front end application and copy their URLs and keep them aside. We will be using them in the Option value of the Select tag.

Now let us look at the Javascript code which you have to put in Text object of the Dashboard editor.


<html> 
<body> 
<script type="text/javascript"> 
</script> 

<table bgcolor="#FFDEAD">
<tr>
<td>
<font color="red">
<h3>Select the report from the drop down list and it will open in the Iframe.<h3></font>
</td>
</tr>
</table>
</br>

<FORM> 

<SELECT NAME="url" onchange="document.getElementById('myframe'). src=this.value"> 
<OPTION VALUE="http://usblrnmehandal1:7001/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FRRR%2FEmptyPage" 
style="font-family:arial;color:black;font-size:90px;">Select a report >>

<OPTION VALUE="http://usblrnmehandal1:7001/analytics/saw.dll?PortalGo&SearchID=u9eelpmhafltb1meukpuv65thm&Path=%2fshared%2fRRR%2fColumnSelector&ViewState=5s57ml624m72vg5if1ifvdm3pu&ContainerID=o%3aportalgo%7er%3areport&RootViewID=go" 
style="font-family:arial;color:orange;font-size:90px;">Column selector report 

<OPTION VALUE="http://usblrnmehandal1:7001/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FRRR%2FDistrictSelector" 
style="font-family:arial;color:Yellowgreen;font-size:90px;">District selector report 

<OPTION VALUE="http://usblrnmehandal1:7001/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FRRR%2FInline%20Prompt" 
style="font-family:arial;color:red;font-size:90px;">Inline prompt report 

<OPTION VALUE="http://usblrnmehandal1:7001/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FRRR%2F25th%20Percentile" 
style="font-family:arial;color:blue;font-size:90px;"> 25 percentile report 

</SELECT> 

</FORM> 
</br>
<iframe id="myframe" height="600" width="1000" src="http://usblrnmehandal1:7001/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FRRR%2FEmptyPage"></iframe> 
</body> 
</html>

Note : I have created one dummy report ( Empty Page) that shows only 1 string "SELECT A REPORT FROM THE DROP DOWN LIST" and this is defaulted. It shows a meaningful message to the user; asking him to select a report.
Adjust the height and width of IFrame as per your requirement.

Let us look at the snapshots.

1: In the beginning. ( Default page says Select a report from Drop down )













2: Select any report from the drop down list for ex - District selector report










District selector report is opened.











This way we can select any report and it will open in the IFrame.

Have a nice day !!!

No comments: