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 10 December 2012

Refreshing a report Everytime it runs

In cases, where we need to refresh a report surpassing the Cache everytime, we can create a report with a column hidden and making the column formula as-
CURRENT_TIMESTAMP
This will make the report run every time, for every change in second.

Comments are always welcome...