Sunil S. Ranka’s Weblog

beginning of Blogs

How to dynamically calculate TopN

Posted by sranka on November 25, 2009

Hi All

Finally I am sitting down to post an interesting thing I came across during my recent release. I would like to than Gopal Kethineni for this.

The requirement was very interesting and important :

Business wanted to calculate Top 10 opportunities/$ amounts by different slices/dices.

In past we had accomplished the above requirement by pre calculating the values. But the permutations and combinations were many. E.g Top 10 Opportunities By Geographical Hierarchy or By Product Hierarchy or by Time Hierarchy. If we had to pre calculate all of the above permutations and combinations than we had to write too many ETL and eventual ETL load would have delayed.

To make solution more scalable and dynamic we used POWER of OBIEE by twisting giving TOPN function. Following is the example .

For Every Level 4 Of Geographical Hierarchy, show all the Top 10 Customers based on the opportunity amount. Along with this we need to show all the Level 5 of the Geographical Hierarchy.

In the above example the challenge was to select Level 4,Level 5 , Customer Name, and Opportunity amount as part of the criteria but to calculate Top 10 customer only Level 4 Of Geographical Hierarchy needed to be considered as Level 5 was needed to be considered as only an attribute. To solve the above complex problem.Following expression was used as part of formula column.


TOPN(SUM("Fact - Customer"."Opportunity Amount" by "Dim - Geo Hrchy"."Level 4", "Dim - Customer"."Customer Name"),10 by "Dim - Geo Hrchy"."Level 4") 

We have saved more than several hours of ETL development/QA and system resources time. If I can count correctly, I would say we must have saved more than $100K , by implementing this solution.

Hope This helps,
Sunil S Ranka

Posted in ..., OBIEE | Tagged: , , , , , , , , | Leave a Comment »

Oracle Open World 2009

Posted by sranka on November 7, 2009

Hi All,

Its been over few weeks since OOW is over, I know its kind of late, but better late than never. After attending OOW , was caught up with regular deliverable and time was running by. It 1:17 AM on Saturday morning and thought will update fellow readers on OOW-09. I attended OOW as a blogger and it was different experience. In past I had attended as an employee, but going as independent blogger was different ball game. Met with few famous name from blogging world. Business Intelligence , specially OBIEE was all over place in the conference. Even though the conference attendees turn out was less, but all the BI sessions were packed. Met with product managers for OBIEE, played with 11g OBIEE and in short I would say, 11g is a must. I will blog on what all things are part of 11g. Larry’s keynotes and shots at IBM were highlights. Surprise appearance and speech of  Arnold Schwarzenegger left every one astonished.

Last but not least the AEROSMIT show was fabulous, Steven Tyler, and Joe Perry duo were oustanding. Even though I am not a fan of ROCK, but it was worth stading in the front row with thousands of watt of music. Over all it was well worth.

Larry With Exadata

Larry With Exadata

Arnold Schwarzenegger

Arnold Schwarzenegger

 

Rare View -- All Oracle Think Tankers (SVPs)

Rare View -- All Oracle Think Tankers (SVPs)

Steve Tyler - Aerosmith

Steve Tyler - Aerosmith

Oracle - Aerosmith

Oracle - Aerosmith

 

 

 

Posted in ... | Tagged: , , , , , , | Leave a Comment »

On Teradata Queries are been fired twice. Once for Parsing and once for execution.

Posted by sranka on September 9, 2009

Hi All

Recently I been working with Enterprise Architect group to tune the performance of application on Tera Data platform. While working on varies issues, came across very interesting fact, a query which was taking only 15 sec on database , but was taking more that 20 sec to return the data onto the browser. While digging into the problem, Enterprise Architect found that query is been executing twice, once for parsing and next time the actual execution. This was very evident for all the request.We spoke with Oracle support and suggested following options ::

In windows:
1. Please check the setting on Teradata ODBC under Options, then check box for ‘Disable Parsing’.

This option is provided to the user to enable/disable parsing of SQL statements by the ODBC driver. If the user is using the Teradata Database specific SQL, then the SQL statements need not be parsed by the driver. If this option is checked, the driver does not parse the SQL statements.
Default: unchecked

2. Please ‘check’ on this option on Teradata ODBC driver and retest.

For UNIX:

Options Configurable in the .odbc.ini File,
NoScan=[ Yes | No ]
Default = No

After trying above option, we could not get solution to the problem, after talking with Oracle Product management they suggested to set the system variable to


   NQUIRE_EXECDIRECT=1

After setting the above system variable, queries were not executing twice.

What it does :

After setting the variable, OBIEE server engine doesn’t parses the query and send the exact the same query to database, hence only one query is been sent to database.

Where you can not use this solution :

One word of caution, if you are using any bind variables than you can not use this option.

Hope this helps

Sunil S Ranka

Posted in ..., OBIEE | Tagged: , , , , , | Leave a Comment »

How to increase SAW (Presentation Server) logging

Posted by sranka on August 6, 2009

To increase the SAW/OBIPS logging level you need to make some changes to logconfig.xml.

  • Open logconfig.xml file located in D:\OracleBIData\web\config folder
  • Add the following lines in the <Filters> node of logconfig.xml:
<Filters>
 <FilterRecord writerClassGroup="Cout" path = "saw" information="100" warning="100" error="100" security="100"/>
 <FilterRecord writerClassGroup="File" path = "saw" information="100" warning="100" error="100" security="100"/>
 <FilterRecord writerClassGroup="File" path = "saw.httpserver.request" information="100" warning="100" error="100" security="100"/>
 <FilterRecord writerClassGroup="File" path = "saw.httpserver.response" information="100" warning="100" error="100" security="100"/>
 <FilterRecord writerClassGroup="File" path = "saw.mktgsqlsubsystem.joblog" information="100" warning="100" error="100" security="100"/>
</Filters>
  • You will also need to increase the number of log files being produced. This is also controlled in logconfig.xml.
  • In the <Writers> node, modify Writer implementation:
<Writer implementation="FileLogWriter" name="Global File Logger" writerClassId="1"
dir="{%SADATADIR%}/web/log" filePrefix="sawlog" maxFileSizeKb="10000" filesN="100" />

Set the filesN parameter to 100.

  • Logging at this level produces a lot of data. You need to make sure you have an adequate amount of free space on the hard drive to accommodate the additional logs.
  • For changes in logconfig.xml to take affect, presentation services (OBIPS) needs to be restarted.

Hope This Helps

Sunil S Ranka

The above details are been taken from Oracle Metalink3 Website (Document 740257.1). Document 740257.1 can be found at: https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=740257.1

Posted in ..., OBIEE | Tagged: , , , , , | Leave a Comment »

People I Work With

Posted by sranka on July 15, 2009

Hi All,

Always I wanted to mention about the people I work with. Due to my team’s continue support, I could post many thing on blog. Following are people I have been working with for over 2-3 years. Not in specif order.

  • Alan Rodrigues, the six pack guy,  an avid body building guy and great OBIEE guy
  • Kaushik Regulapati, one of the cool guy I ever worked,  one of the finest OBIEE resource.
  • Srikanth Rukmanagari, can’t go wrong with this guy, a rock solid trust able OBIEE resource.
  • Aditya Masabathula, guy who made What-If Analysis work using Java Script.
  • Sachin Churi, a guy who can even find a bug in Google.com, an awesome database and IT Analyst
  • Jagadesh Rachakonda, I can bet he thinks faster than IBM-Super computer.

Thanks you all for making so many thing happen.

Sunil S Ranka

Posted in ... | Leave a Comment »

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

Posted in OBIEE | Tagged: , , , , | 2 Comments »

What-If Analysis needs JavaScript on OBIEE

Posted by sranka on July 9, 2009

Hi All,

Apologies for not replying the comments and pings. Was caught up with OAUG conference in May, June was equally tough. My wife has started with her internship and daughter with day care. Life is getting hectic, but can’t complain.  Coming back to the jargon of — WHAT-IF ANALYSIS –. This was one the topic, at least talked about few time during OAUG. But it was always talked in conjunction with hyperion. After putting some thought, came to conclusion that some of the basic What-If can be done using Java Script.

At one of the client place, there was requirement for implementing a report, in which punching some number can project how many more $ worth of product selling needs to be done to attained the goal booking for the current quarter. This requirement was met using custom Java Script and few text box. Since it was very specific requirement, hence not sharing the code. But thought will just share the idea, so that any one want to create WHat-If in OBIEE dashboard, Java Script could be the way.

If you need more detail, you can send me email, I will be more than happy to answer the question.

Thanks

Sunil S Ranka

Posted in OBIEE | Tagged: , , , | 1 Comment »

Way To Solve Multiselect Prompt Bug

Posted by sranka on April 6, 2009

Hi All,

Thanks for all the positive response . Its been while since I posted any thing. Been busy with preparing for my collaboration-09 presenation. Yes!!! I am presenting at OAUG’s collaboration-09 conference schedule in the 1st week of May in Florida. For people who are interested, topic would be — Need for web 2.0 and OBIEE integration –. Coming back to this post.

Faced some weird and unusual problem with Multiselect.  The problem was so severe that if you don’t have proper security implemented on RPD side, than any one can see any data. hmmmmmm.. sounds scary!! yes it is scary so here is what happens.  In the following image you get to see all the name of the countries from the selected continent.

Results when clicked on ... from the base page

Results when clicked on ... from the base page

The actual fun begins when you hit the Go button,  and irrespective of which continent has been selected all the countries in the world will get displayed. see the image attached

Results shown when clicked on the Go button on the result screen

Results shown when clicked on the Go button on the result screen

What is the issue :

After investigating found out that whenever GO button is clicked, the constraint value has not been passed and all the values from the dimensions, are been retrieved.

Solution:

To solve the issue we need to modify two javascript files residing in the folder res/b_mozilla/prompts/ :

  • globalfilterprompt.js changes to — GFPDoMultiSelect — function
  • gfpmultiselect.js changes to — GFPMultiSelect.prototype.search — function

Changes :

Following is the modified — GFPMultiSelect.prototype.search — function, all the text in the bold are the changes ::

GFPMultiSelect.prototype.search = function()
{
this.sWhere = “”;

var obj1 = window.parent.document.getElementById(“customMSPromptdiv”);

/* sranka — added for MultiSelect Data Persistance*/
try{
if(obj1.value == ”){
this.sWhere = ” ( 1 = 1 ) ” ;
}else{
this.sWhere =  obj1.value;
}
}catch(e){
this.sWhere = ” ( 1 = 1 ) ” ;
}

if(this.matchTable.style.display == ”)
{
if (this.searchForm.Constraint.value != “”)
{
var sValue = null;
switch (this.searchForm.Match.value)
{
case “beginsWith”:
sValue = GFPMultiSelect.SQLEscape(this.searchForm.Constraint.value) + “%”;
break;
case “endsWith”:
sValue = “%” + GFPMultiSelect.SQLEscape(this.searchForm.Constraint.value);
break;
case “contains”:
sValue = “%” + GFPMultiSelect.SQLEscape(this.searchForm.Constraint.value) + “%”;
break;
case “like”:
sValue = this.searchForm.Constraint.value;
}

if (sValue != null)
this.sWhere = this.sWhere + ” AND ” + this.vColumns[0] + ” LIKE ‘” + sValue + “‘”;

}
}
else if(this.dateTable.style.display == ”)
{
var tA = null;
var tB = null;

switch(GFPMultiSelect.primaryType)
{
case ‘date’:
tA = tDTP.parse(this.searchForm.BetweenA.value, 2 | 8 | 16 | 32);
tB = tDTP.parse(this.searchForm.BetweenB.value, 2 | 8 | 16 | 32);
break;
case ‘time’:
tA = tDTP.parse(this.searchForm.BetweenA.value, 4);
tB = tDTP.parse(this.searchForm.BetweenB.value, 4);
break;
case ‘timeStamp’:
// convert
tA = tDTP.parse(this.searchForm.BetweenA.value, 1 | 2 | 4 | 8 | 16 | 32);
tB = tDTP.parse(this.searchForm.BetweenB.value, 1 | 2 | 4 | 16 | 32);
//convert to data timezone
if (this.nDisplayToDataTZOffset)
{
if (tA != null)
tA.adjustTimeZoneOffset(this.nDisplayToDataTZOffset);
if (tB != null)
tB.adjustTimeZoneOffset(this.nDisplayToDataTZOffset);
}
break;
}

if(this.searchForm.BetweenA.value.length > 0 && !tA)
{
alert(kmsgWBInvalidInput + “\”" + this.searchForm.BetweenA.value + “\”");
return false;
}

if(this.searchForm.BetweenB.value.length > 0 && !tB)
{
alert(kmsgWBInvalidInput + “\”" + this.searchForm.BetweenB.value + “\”");
return false;
}

if(tA != null)
{
var sA = DateTimeParser.buildDateTimeClause(‘>’, this.vColumns[0], GFPMultiSelect.primaryType, tA);

if(sA != null)
this.sWhere = sA;
}

if(tB != null)
{
var sA = DateTimeParser.buildDateTimeClause(‘<’, this.vColumns[0], GFPMultiSelect.primaryType, tB);

if(sA != null)
this.sWhere = this.sWhere.length == 0 ? sA : (this.sWhere + ” AND ” + this.sWhere + ‘ AND ‘ + sA);

}

}
else if(this.numericTable.style.display == ”)
{
var tA = this.searchForm.BetweenNA.value;
var tB = this.searchForm.BetweenNB.value;

if(tA.length > 0)
{
tA = parseFloat(tA, 10);
this.sWhere = this.sWhere + ” AND ” + this.vColumns[0] + “>=” + tA;
}

if(tB.length > 0)
{
tB = parseFloat(tB, 10);
var clause = this.vColumns[0] + “<=” + tB;
this.sWhere = this.sWhere + ” AND ” + this.sWhere.length == 0 ? clause : this.sWhere + ” AND ” + clause;
}
}

this.choicesDiv.innerHTML = “”;
this.totalSpan.innerHTML = “0″;
this.totalSpan.setAttribute(“total”, 0);
this.moreLink.style.display = “none”;

VTDisplayValues(this.choicesDiv, this.vColumns, this.subjectArea, ‘kmsgGFPMultiSelectSearchValueTableRow’, this.sWhere, this.timeZone, this.timeZoneOffset,
’scroll’, this.sId, null, null, null, null, null, “idGFPMultiSelect” + this.sId);
}

Following is the modified — GFPDoMultiSelect– function, all the text in the bold are the changes ::

function GFPDoMultiSelect(tEvent, sTextAreaID, sColumn, sSubjectArea, sWhere, sID, sCategory, sPrimaryType, sDisplay, sSQL, sDataTimeZoneOffset, sDisplayTimeZone)
{

/* sranka — Added this code as patch for persisting values for MultiSelect */
var parentElem = window.parent.document.getElementById(sTextAreaID);
//alert(‘GFPDoMultiSelect GlobalFilterPrompt.js :: ‘ +sTextAreaID);
var newdiv = window.parent.document.createElement(‘input’);
var divIdName = ‘customMSPromptdiv’;
newdiv.setAttribute(‘id’,divIdName);
newdiv.setAttribute(‘name’,'name’);
newdiv.setAttribute(‘value’,sWhere);
newdiv.setAttribute(‘type’,'text’);

var browserName=navigator.appName;

if(browserName == ‘Netscape’){
parentElem.appendChild(newdiv);
}else{
window.parent.parent.document.body.appendChild(newdiv);
}

var tMultiSelect = new GFPMultiSelect();
var tDialog = new XUIDialog(“idGFPMultiSelect”+sID, tMultiSelect, null);
tDialog.show(null, -1, -1, null, null, null, null, true);
tMultiSelect.initialize(sTextAreaID, sColumn, sSubjectArea, sWhere, sID, sCategory, sPrimaryType, sDisplay, sSQL, sDataTimeZoneOffset, sDisplayTimeZone);

return false;
}

I hope this will help solving some of the issue. I know that the code I have provided is not well formatted, please ping me or leave me a message for any questions or difficulties.

Hope this helps

Thanks

Sunil S Ranka

Posted in ..., OBIEE | Tagged: , , , , , | 5 Comments »

How To Implement Breadcrumb in OBIEE / Siebel Analytics

Posted by sranka on December 7, 2008

Hi All,

Feeling accomplished as one more battle with Business has been won. Had a long debate over UI and usability of reports. Business kept complaining for certain navigation, and all I could say was, definitely will look into it. After every single discussion, felt helpless and incompetent. Spoke with folks at oracle support and got the same answer, “We don’t support this feature.”

Business had valid concern, all the needed was a mechanism to navigate back to the page they came from. In short they need the “BREADCRUMBS”.

The challenge was how to implement some thing like breadcrumb. Thought of many ways, even went to the extend of re writing some of the internal javascripts, but data and report persistent failed every time. At times I could navigate to the page, but the data integraty was lost between the pages.

One night got a dream that breadcrumbs are working on the application, but I knew the dream was too good to be true.

With all the knowledge of internal javascript, began my journey of debugging and wallahaa, got answer to the BREADCRUMB, thing which was sounding next to the impossible was possible now. See the image below ::

Bread Crumb

Bread Crumb

As the imagesI could click on UNITED STATES and could go back to level 1 of report, no need to clicking browser back button 4 times.

Below is the piece of code I used in the narrative view of the breadcrumb report. I know it may be difficult to understand, but I am open to work with individuals and can be reached email address provided in — About Me — page.

Following is the Javascript Code :

<span onclick=”javascript:PortalPageNav(event,’/shared/attach rate/_portal/2attach rate’,'Sales View – Detail’)” class=”Nav”><u>@1</u></span>
<img src=”https://www.microstrategy.com/graphics/Homepage/Feb05/icon_arrow_red.gif”>
<span onclick=”javascript:PortalPageNav(event,’/shared/attach rate/_portal/2attach rate’,'Sales View – Drill Down Level 2′)” class=”Nav”><u>@2</u></span>
<img src=”https://www.microstrategy.com/graphics/Homepage/Feb05/icon_arrow_red.gif”>
<span onclick=”javascript:PortalPageNav(event,’/shared/attach rate/_portal/2attach rate’,'Sales View – Drill Down Level 3′)” class=”Nav”><u>@3</u></span>
<img src=”https://www.microstrategy.com/graphics/Homepage/Feb05/icon_arrow_red.gif”>
<span onclick=”javascript:PortalPageNav(event,’/shared/attach rate/_portal/2attach rate’,'Sales View – Drill Down Level 4′)” class=”Nav”><u>@4</u></span>
<img src=”https://www.microstrategy.com/graphics/Homepage/Feb05/icon_arrow_red.gif”>
<span onclick=”javascript:PortalPageNav(event,’/shared/attach rate/_portal/2attach rate’,'Sales View – Drill Down Level 5′)” class=”Nav”><u>@5</u></span>

Apologies for any confusion, but breadcrumbs are confusing, please ping me or call me for this implemetation. I would be more than happy to help out on the implementation aspect.

Posted in OBIEE | Tagged: , , , , , , , | 6 Comments »

How To Replace Multiple Go Button By One Go Button In Prompts

Posted by sranka on November 9, 2008

Hi All,

Waited too long for posting. Been thinking about posting 3-4 blog entries, but release cycle kept me busy. For this blog content, all  excitement began on Friday evening, one of the project manager, from other group called me and asked me if I could help them with one of their business show stopper, may result in delaying Go-Live.  The problem statement was very simple :

Business doesn’t like multiple Go button when they need to use multiple prompts on the same dashboard page.

Following was Oracle’s stance :

Can not be done in Maui (10.3.X), but they will have it in the next release. (Schedule for next summer)

Last week end, worked through Sunday till Tuesday on working this particular problem. We faced the same problem about 1.5 years back, but business was not that tough that time, but this time it was do or die situation. There were many suggestions, one of the suggestion was to integrate Java and OBIEE. Have prompts define in Java and pass on the values to OBIEE, with the mean of SSO, GoNav, GoURL etc… From architectural and presentational point of view, the solution looked great, but implementation sounded really scary. One tiger team was formed to solve the problem. After listening and understanding the problem, I asked for couple of hours to find solution to the problem withing OBIEE.

Following images shows, what OBIEE provides out of box :

Multiple Go Button

Following images shows, what Businees Requirement was :

Single Custom Go Button

Single Custom Go Button

Following are the steps ::

Add following piece of code in C:\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\b_mozilla\calendar.js file under — DoLoad() — function

// sranka — following is the customize code writting by sranka for hidding standard Gobutton

var tCustomTagX  = ”;
try{
tCustomTagX = document.getElementById(“customTag”); // Need to create a hidden input as customTag in the report
}catch(e){
tCustomTagX = ”;
}

try{
if(tCustomTagX.value == “customTag”){
custom_hideGoButton();
}
}catch(e){}

// End of customize code by sranka

Add the following function in calendar.js file :

// samvi :: sranka — custom Java Script for Hiding the Go Button

function custom_hideGoButton()
{

try{
var aElm=document.getElementsByTagName(’span’);
for(var i=0; i<aElm.length; i++) {
if (aElm[i].innerHTML.indexOf(‘GFPDoFilters’) > -1)
{
aElm[i].style.display = “none”;
}//if
}// for
}// try
catch(e)
{alert(‘ Error in calendar.js sranka :: ‘ + e);}

} // end of hideGoButton

Create a dummy HTML tag with following type and value. (This should be the 1st element on the page) ::
<input type=”hidden” id=”customTag” name=”customTag” value=”customTag”/>
Use following JS for hiding the Go Button:
<script>
try{
var aElm=document.getElementsByTagName(’span’);
for(var i=0; i<aElm.length; i++) {
if (aElm[i].innerHTML.indexOf(‘GFPDoFilters’) > -1)
{
aElm[i].style.display = “none”;
}//if
}// for
}// try
catch(e)
{alert(‘ XXX ‘ + e);}
</script>
Add following piece of code in 

C:\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\b_mozilla\prompts\globalfilterprompts.js
//——————-
// Called by form onsubmit to move all filter data into the main view form

// —- start of customization for hidding GoButton — Modified by Sunil S Ranka (sranka)

function GFPDoFilters_samvi(sViewID, tTable, bGFPReloadInline)
{
// RIE: calling GFPDoFilters in preview mode
// doesn’t do anything so we are going to just return
if(sViewID == ksGFPStatePath) // ksGFPStatePath = o:preview~g:globalfilter
return;

var tExpr = XUICreateElement(saw.xml.kSawxNamespace, ‘expr’);
tExpr.setAttribute(“xsi:type”, “sawx:logical”);
tExpr.setAttribute(“op”, “and”);

for (var h = 0; h < tTable.length; ++h)
{
var tPromptCells_New = tTable[h].getElementsByTagName(“TD”);

for (var i = 0; i < tPromptCells_New.length; ++i)
{
var tElement = tPromptCells_New[i];
if (tElement.getAttribute(“GFPBuilder”) != null)
{
try
{
var tFilter = eval(tElement.getAttribute(“GFPBuilder”));
if (tFilter)
{
tExpr.appendChild(tFilter);
}
}
catch (e)
{
alert(‘XXXX ‘ + e);
return;
}
}
}

}

/*
var tPromptCells = tTable.getElementsByTagName(“TD”);
for (var i = 0; i < tPromptCells.length; ++i)
{
var tElement = tPromptCells[i];
if (tElement.getAttribute(“GFPBuilder”) != null)
{
try
{
var tFilter = eval(tElement.getAttribute(“GFPBuilder”));
if (tFilter)
{
tExpr.appendChild(tFilter);
}
}
catch (e)
{
alert(e);
return;
}
}
}

*/

var tDelayedDash = document.getElementById(“sawDashboardDelayed”);

if (tExpr.childNodes.length == 0 && !document.getElementById(“sawDashboardDelayed”))
return false;
else if (tExpr.childNodes.length == 0)
tExpr = null;
else if (tExpr.childNodes.length == 1)
tExpr = tExpr.childNodes[0];

if (tExpr)
{
tExpr.setAttribute(“xmlns:xsi”, “http://www.w3.org/2001/XMLSchema-instance”);
}

// inline report load support on dashboard
// now we have a switch to control whether we do it inline
var tForm = GetViewForm(”, -1, bGFPReloadInline);

if (sViewID == ksGFPStatePath) // the view id (for GFP preview) is recently changed to this
{
//tForm.P1.value = saw.getXmlText(document.getElementById(“idXUIGFPPreview”)); //this doesn’t work
var tRoot = XUIGetRootXML(“idXUIGFPPreview”);
tForm.P1.value = saw.getXmlText(saw.getFirstChildElement(tRoot));
tForm.action = saw.commandToURL(“ViewPreview”);
submitViewForm(tForm,null);
return;
}

GFPApplyFilters(tForm,tExpr, sViewID);
return false;
}


Use Following JS for creating customGo button :
<script>
/* created by sranka
function customCall()
{
try{
var aElm=document.getElementsByTagName(‘table’);
var tTableArray = new Array();
var k = 0;
for(var i=0; i<aElm.length; i++) {
if(aElm[i].className==’GFPBox’) {
tTableArray[k] =  document.getElementById(aElm[i].id);
k++;
}
}
GFPDoFilters_samvi(”,tTableArray,true);
}
catch(e)
{alert(‘ XXX ‘ + e);}
}
</script>

<td class=”GFPSubmit”><table cellspacing=”0″>
<tbody><tr>
<td class=”XUIPromptEntry”><span class=”minibuttonOn”><a onclick=”javascript:customCall();” href=”javascript:void(null)”>Custom Go New</a></span><div value=”dashboard” id=”d:dashboard~p:b10pia6cf02k1ngq~s:j8obsfvm99vnd77s~g:c7te6i611dqgunnkScope”/></td>
</tr>
<tr>
<td/>
</tr>
</tbody></table>
</td>
Hope this helps
Sunil S Ranka

Posted in OBIEE | Tagged: , , , , , , | 29 Comments »