Showing posts with label Page. Show all posts
Showing posts with label Page. Show all posts

Sunday, 30 December 2012

Searching a Text in Page

If your report is too large and you want to search your desired record, if you know the value.
Then add the below code in the text with 'HTML' tag enabled.

<script type="text/javascript" language="JavaScript">

var OtherBrowser = (document.getElementById);
var IE4 = (document.all);
var NS4 = (document.layers);
var win = window;
var n = 0;


function findInPage(str) {
var txt, i, found;
if (str == "") {
alert("Enter some thing to search");
return false;
}

else if (IE4) {

txt = win.document.body.createTextRange();

for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}
else {
if (n > 0) {
n = 0;

findInPage(str);
}
else
alert("Sorry, we couldn't find.Try again");
}
}
else if (OtherBrowser) {
if (!win.find(str)) {
while (win.find(str, false, true, false, false, false, true))
n++;
}
else if (win.find(str)) {

n++;
}
}


if (NS4) {
if (!win.find(str)) {
while (win.find(str, false, true, false, false, false, true))
n++;
}
else if (win.find(str)) {
n++;
}
}
return false;
}

</script>



</head>
<body>
<div style="padding-top: 5px; padding-right: 10px; float: right;">
<form name="Search" action = "" onsubmit="return findInPage(this.string.value);">
<p align="center">
Keyword Search:
<input style="width: 200px; border-right: #666666 1px solid; border-top: #666666 1px solid;
font-size: 10pt; border-left: #666666 1px solid; border-bottom: #666666 1px solid"
onchange="n = 0;" size="16" name="string" />
&nbsp;<input style="border: #fff 1px solid; font-family: Tahoma; color: #FFF; background-color: #2e6ebd"
type="submit" value="Search"/>
</p>
</form>

Result-


Comments are always welcome...
 

Saturday, 29 December 2012

Adding Bookmark Link in OBIEE

To add 'Bookmark' link in OBIEE, you need to pull a text object in Dashboard and add the following code with 'HTML' check box enabled.

<a href="javascript:void(0);" onclick="if(document.all) window.external.AddFavorite(window.document.location,window.document.title);">Bookmark Page</a>
Save and Run the dashboard page. A pop-up box opens to save the page.

Result-


Comments are always welcome...
 

Monday, 25 June 2012

Multiple Measure Selection For A Graph- INDEXCOL

One of my colleague wanted to display the measure columns in the graph, but not all the measures at the same time. User will select the name of the measure columns to select from the prompt. And the measure which the user selects should be painted on the graph.
So, going forward I preferred to give the option to select the number of measures in check box (thanks to OBIEE 11g to provide the check box option as default).

First we need to create the prompt with the check box.  I am considering to have two measure columns. For our requirement we need to display the first measure prompt as the default selection. So including the default selection as 1.





Remember when you are passing the presentation variable values then it accepts the number data type in this case to paint on the graph. So I am passing 1 for the first prompt and 2 for the second prompt.



In the report I am pulling three columns ie., first is the dimension column, second is the first measure column and third is the second measure column.




In the column formula we can write case statements, but I am preferring to put down the formula using the INDEXCOL function.

Similarily I am using the INDEXCOL function in the second column formula.



Check the results in the compound layout and yes both the measure columns doesnt produce results and is expected.




Save and view the report in the dashboard.

By default the 1st prompt measure column is selected.



When we select the second prompt measure column then both the measure columns display with beauty.

Thursday, 14 June 2012

Sub-Pages/ Tabs within a Page of a Dashboard

In one of the interview, a question was asked to show the sub-pages/ tabs. :)
To hide the header banner of the application we can use custom javascript to override the default properties. This can be used in cases where we need to embed a dashboard pages/ tabs inside another page/ tab.
Refer below link for the above-
http://obiee10grevisited.blogspot.in/2012/06/hiding-removing-header-banner.html
When the things are ready by hiding the header banner then in the dashboard page where we need to see the sub-pages/ tabs.
We first edit the dashboard page and give the embedded link

In the URL of the embedded link give the link to the page which needs to show as sub-tabs/ pages.







Tuesday, 15 May 2012

Disabling Right Click on OBIEE with javascript

We had to disable the right click button of mouse.
Thansk to Javascript ;)

<script language=JavaScript>
<!--
var message="Function Disabled!";

function clickIEbrowser4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNSbrowser4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNSbrowser4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIEbrowser4;
}
document.oncontextmenu=new Function("alert(message);return false")
</script>

Master Detailed report on the same page. Navigate to the same page/ window


We had a requirement where Master and Detailed report should be shown on the same report on click of the measure value as shown below.


Initially, I have built a Master report and gave navigation to the same page.


In the Detailed report made the columns as 'is prompted' and kept the two reports in two different sections.



Built one intermediate report for the validation. That is, generally the detailed report should not be shown to the user, when the user clicks on the measure value then only the Detailed report should be visible at the below of the Master Report.


In the Detailed report section in the 'Edit Dashboard' gave the condition with reference of the Intermediate report and gave the condition as "equal to 1".So that the report is not visible at the initial view to the user. And save the page.

Now when the user clicks on the measure value then it navigates to the same page, but the values is passed to the detailed report as it contains 'is prompted'.


Hope this helps alot people out there.

Monday, 30 April 2012

Dashboard in Drop Down


Below is the method followed to show multiple dashboards with multiple pages in a drop down.
You need to have a default page with static text -HTML enabled and with the following piece of code.

<center>
<html>
<body>
<script type="text/javascript">
</script>
<FORM>
<SELECT NAME="url" onchange="document.getElementById('myframe'). src=this.value"><OPTION VALUE="None" style="font-family:arial;color:red;font-size:90px;">Select a dashboard 
<OPTION VALUE="http://usblrnmehandal1:7001/analytics/saw.dll?Dashboard&PortalPath=%2Fshared%2FTesting%2F_portal%2FTestDashboard&page=Test1">Testdashboard
</SELECT>
</FORM>
<iframe id="myframe" height="1500" width="1500" src="about:blank"></iframe>
</body>
</html>
</center>

If multiple dashboard has to be added then you need to have multiple option values.

Saturday, 31 March 2012

Refresh a Single Report

Hi,

In my previous post to refresh the whole page-http://obiee10grevisited.blogspot.in/2012/03/obiee-autorefresh-no-prompts.html.  is useful to refresh the complete page.
In the below post, you can try to refresh the report alone:


<script>
function refreshTheFrame()
{
parent.frames[0].location.href='http://muram:9704/analytics/saw.dll?Go&Path=/users/administrator/2';
}
setInterval('refreshTheFrame()',"6000");
</script>
<div>
<iframe frameborder="0" border=0 marginwidth=0 marginheight=0 hspace=0 vspace=0 width=1200 height=600 scrolling=auto>
</iframe>
</div>

The above code would place the report in a text object and then load the report after the refresh time interval.






Tuesday, 13 March 2012

OBIEE Autorefresh no prompts

Use the

Ok this trick only works if you don't have any prompts on the dashboard page. They can live on other pages if you want to keep them.
Add a text element to your dashboard
image
Enter :
<META HTTP-EQUIV = "REFRESH" CONTENT = "10">
where 10 is the refresh time in seconds. Don't forget to check the Contains HTML Markup box.


<META HTTP-EQUIV = "REFRESH" CONTENT = "10">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" >

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" >
To avoid caching of the browser.

Thanks to- http://obiee101.blogspot.in/2009/01/obiee-autorefresh-no-prompts.html