Showing posts with label Dashboard. Show all posts
Showing posts with label Dashboard. Show all posts

Default Dashboard using "PortalPath" system session Variable


I am going to explain how to make a dashboard default using portal path,you can find this on several blogs but for my reference doing this

Step1 : In below figure i have "8" dashboards out of those when a user logs in he has to see "USER" dashboard instead of My Dashboard (Default)


Step2: Create a system-session variable


Step3 : Give the following code in your default initialize box


Where "User" is my Dashboard name

Step4: Creation of Initialization block and assign PoratlPath system session variable to this newly created block




Step5:Next,Login to dashboard with Administrator user and you need to change the
"My Account" settings -->Preference-->Default Dashboard-->Default



Logout and login with Administrator you will get USER as default dashboard,if you already have "Default" no need to go for step5

Customizing OBIEE Dashboard Banners

One of the requirements regarding OBIEE dashboards often is to replace the default dashboard graphics and bring it in line with the ‘corporate look and feel’. So let’s have a look and change the top banner on a dashboard.
OBIEE comes with a set of default styles for dashboards (e.g. oracle10 and siebel77), each with their own top banners.
So how does one go about modifying these styles and replacing the top banner?
Let’s say I wish to replace the standard Oracle10 banner:
with this one:
(obviously graphic design is not part of my main skill set)
It turns out that creating and modifying a style has to be done in at least 2 locations:
  • The Presentation Server
  • The Analytics application running in an OC4J container
So first let’s have a look at the presentation server.
The styles are all located under <ORACLE_BI_HOME>\web\app\res.
Here we find several directories but the ones of interest to us in this case are the ones starting with ‘s_’.
4_obiee_theme_dir.JPG
The ‘s_’ directories contain the specific elements for each of the styles.
In order to change the banner I first make a copy of the ‘s_oracle10′ directory and rename it to ‘s_mynewtheme’ in order to preserve the original.
5_obiee_newtheme_dir.JPG
Under the new style directory you will find the ‘b_mozilla_4′ directory which contains the banner image currently used. The filename is ‘bg_banner.jpg’. I could simply replace the image with the new one but I prefer to make my life a little bit more difficult so I opt to leave the original banner in place and copy my new one into the directory under another name (bg_banner_new.jpg).
6_obiee_newbanner_jpg.JPG
To have the theme use the new file instead of the original file I have to alter ‘portalbanner.css’ which can be found in the same directory as the banner images and modify the ‘.PortalBanner’ entry.
.PortalBanner {
margin: 0px;
background-position: top left;
background-image: url(bg_banner_new.jpg); /* DO NOT REMOVE RTL-ONLY: background-rtl-image: url(bg_banner.jpg); */
background-repeat: no-repeat;
background-color: #1765AC; /*095BA9;*/
width: 100%;
padding: 0px;
}
That should do it for the Presentation Server.
Now all I have to do is copy the new style directory over to the OC4J container running the Analytics application. For an installation using the default OC4J installed with OBIEE it should be copied to
<ORACLE_BI_HOME>\oc4j_bi\j2ee\home\applications\analytics\analytics\res.
For installations using application server OC4J containers the new style should be copied to the appropriate spot on those servers. Make sure to copy the new style to all of the servers if you are using a load balancing setup with multiple application servers.
The new theme will only be available once the Presentation server and the OC4J containers have been restarted. After restarting I reopen the dashboard and modify its properties in order to use the newly created style.
Before:
8_obiee_old_dash.JPG
After:
9_obiee_new_dash.JPG
Not bad at all. However, the list of available dashboards is superimposed over the banner text and the attentive reader may have noticed that my new banner is actually a little higher than the old one but this is not visible on the dashboard. To fix both these issues I simply modify the portalbanner.css file again for the new syle.
To move the dashboard list over to the right modify the width (default 276 pixels) in the ‘.PortalLogo entry’. In my case I set it to 650, roughly the position of the vertical black line.
.PortalLogo {
vertical-align: top;
padding: 0px;
width:650 px;
}
My banner is 96 pixels in height. In order to change this modify the height (default 46 pixels) in the ‘.PanelHdg’ entry:
.PanelHdg {
width:1%;
height: 96 px;
}
Do not forget to make the changes on both the Presentation server and the OC4J instances running Analytics!
Restart the appropriate services and voilà!
10_obiee_new_dash_final.jpg

Setting the Default Dashboard

There are many times when the clients ask for landing to a particular dashboard instead of the default My Dashboard. I came across this request too. So what i did is explained below.
There are basically some approaches to it.
1)  Go to the settings -> My Account and set the Default Dashboard for you out there.
2) The other method is used when you have to set the Default Dashboard for all the users. To accomplish this you need to follow the steps below:
a) Login using the Administrator user and click on settings -> Administration.
b) Go to “Manage Presentation Catalog” and navigate to the Dashboard which you want to set as default.
c) Click on properties of that Dashboard and copy the Path of the Dashboard from the ‘Path’ Attribute. Copy the path exactly as its mentioned in that attribute.
d) Now open the RPD and go to Manage-> Variables.
e) Create an Initialization block in session section and name it as PORTALPATH_IB.
f) Now set the Data source as SELECT <PATH> FROM DUAL. Assign it to a connection pool and click ok.
g) Click on Edit Target and click New and type in PORTALPATH for the session variable name. A warning will appear saying that this is a server variable. Click OK.
h) Save your changes.
i) Now, check that your user has default dashboard set to ‘default’ in settings->My Account.
j) Log out and log in and you should be directed to the targeted dashboard mentioned in the PORTALPATH variable.

OBIEE Save Current Selection

This OBIEE feature is known for User friendliness . Using save selection allow users to view the dashboard page with their most frequently use choices like what we have done while Bookmarks any URL in browser for ease of navigation and facilitate quick search .It applies typically for the prompts and then press Go to let the Request/Report filtered out based on the selected Prompts and then Save the Selection using any conveninent name for future access .See below :
Save Selection 0
Let  say I have saved this as ‘Germany’ .
Save Selection 1
You can see the “Saved selection” entry has been created under         “root\users\administrator\_selections”  as below :
Save Selection 2
Save Selection 3
———————————————————————————————————-
Thus making the alteration in your filter criteria you can choose save selections for multiple items .
You can clear the existing saved selection from Page Options -) Clear My Selections .Note that clearing this doesn’t physically remove the saved selection .It is the way to logically clear the selection .I have clear the selection and after that to apply it once again we need not to save it once again as you can choose ‘Apply Saved Selection’ .
Save Selection 4
To physically delete a selection you need to click ‘Page Options’ -) Edit Saved Selections and Defaults and delete the already saved selection .
Save Selection 5
You could rename the already saved selection here .So whatever changes you do over here it will be reflected directly to the physically stored file at location “root\users\administrator\_selections” .
You could perform “Clear My Selections” functionality using a HTML based button added across all dashboard pages so that users need not to navigated across Page Options and the HTML is as below :
Save Selection 6

Using more then one GO URL request navigation with HTML drop down list

There was a question on OTN forumhttp://forums.oracle.com/forums/thread.jspa?threadID=968563&tstart=0 and it's very good base for me to write this post on how to place multiple GO URL navigation to a different subject areas in one column using drop down list.

In one of my previous posts 
http://108obiee.blogspot.com/2009/09/go-url-request-navigation-between.html I describe how to use/make GO URL request navigation between different subject areas.

I this example we'll use GO URLs from previous post and put them in only one column and give the user ability which one GO URL navigation from the drop drown list to choose.

As a reference for writing this post I use this link 
http://www.tek-tips.com/faqs.cfm?fid=2960 and thanks to that site for placing the code in. The code is combination of javascript and html select and option tag which makes drop down list and put links inside them. So when the user chooses value from the drop down list he navigates on the target report.

This first thing is to make Answers report, I used my Normal model subject area:


Write expression with HTML select and option tag to make drop down list and inside put your GO URLs:





We call javascript function inside column expression in Answers in the select tag and onChange so now we need to declare it somewhere.

This can be done in the dashboard text object in the text properties:





Now place report along with the text object inside the dashboard:


Test

Initial start:


The first report navigation from the drop down list:


Result:


The second report navigation from the drop down list:



Result:

OBIEE navigation between different dashboards, passing multiple parameters

In this post I'll show how to navigate from the source dashboard page on the one dashboard to the target dashboard page on the second dashboard with passing multiple parameters.

I want to navigate from the Test Page 2 on Development 2 dashboard:


To the Test Page 2 on Development 3 dashboard and pass parameters to target dahboard prompts:


The source report columns and filter:

PRODUCTS.PROD_CATEGORY
CHANNELS.CHANNELS_CLASS
SALES.QUANTITY_SOLD
PRODUCTS.PROD_CATEGORY is prompted

The target report columns and filter:

CHANN.CH_CLASS
PROD.PR_NAME
SALES.Q_SOLD
PROD.PR_CAT is prompted
CHANN.CH_CLASS is prompted

Note that I'm using different subject areas with different BMM logical table and column names for the source as well as for the target report.

The one more important thing is the target dashboard prompt in which we'll pass parameters:


Let's go back to the source report.

I realy tried all options to call dashboard page on the different dashboard but with no luck, the only solution that works fine I'll explain later, but now let's see what have I try in the source report.

Solutions that don't work well

PortalPageNav javascript function to call target dashboard with target dashboard page in the column PRODUCTS.PROD_CATEGORY custom text format (data format tab on the column properties):


But with this we can use only current column value (PRODUCTS.PROD_CATEGORY, referencing it with @) and we want to pass CHANNELS.CHANNEL_CLASS, so this solution is not good.

I tried with the second filter in PortalPageNav but we can pass only static values further, only one filter is dynamic (with @):

PortalPageNav(event, '/shared/Development/_portal/Development 3', 'Test Page 2','PROD','PR_CAT',"'@'", 'CHANN','CH_CLASS','Direct')

The next thing that I tried is writing the similar code with thread text as HTML option, but still no progress, we can't put PRODUCTS.PROD_CATEGORY and CHANNELS.CHANNEL_CLASS columns in the PortalPageNav instead of static values.

I tried to write Answers column in HTML form fields and call PortalPageNav to read it with document.getElementsByName or document.myform.field.value, instead of static values, but still no luck.

And the last one attempt is using DASHBOARD URL to navigate to dashboard page on the different dashboard:


No luck again, with DASHBOARD URL we can navigate between dashboard pages that are located on the same dashboard, like in the code below:


Working solution

The only solution that works fine with passing multiple filters (dynamic) and call another dashboard page on the another dashboard is using HTML code with PortalPageNav javascript function in the narrative view of the source report.

With this we can easily reference PRODUCTS.PROD_CATEGORY and CHANNELS.CHANNEL_CLASS columns with @1 and @2 (like in my example) and passing parameters to the target dashboard prompt fields on the target dashboard page, target dashboard.

HTML code with PortalPageNav function in the source report narrative view:


<--a href class="Nav" onclick="JavaScript:PortalPageNav(event, '/shared/Development/_portal/Development 3', 'Test Page 2','PROD','PR_CAT', '@1', 'CHANN', 'CH_CLASS', '@2');">@1 and @2
<--/a>

We display all rows in the narrative.

Test

The source dashboard page on the first dashboard:


Ok, at first sight is not pretty, but the functionality is important here. We'll navigate with Electronics as category and Direct as channel class.

The result is new opened window with target dashboard page on the target dashboard. We successfully pass two filters to the target dashboard prompt and we see the target report:


NQQuery.log for the target report:


All parameters are transferred to the target.

If we want to navigate to the second dashboard and open it in the same window we use target="_self":

<--a href class="Nav" onclick="JavaScript:PortalPageNav(event, '/shared/Development/_portal/Development 3', 'Test Page 2','PROD','PR_CAT', '@1', 'CHANN', 'CH_CLASS', '@2');" target="_self">@1 and @
<--/a>

Dashboard URL navigation from source to target dashboard page and unicode replacement

This post is translated from Croatian, from one of my previous posts. For navigation between reports we use GO URL, but for navigation between dashboard pages we use DASHBOARD URL. Basic documentation about this can be found in the presentation services administration guidehttp://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31766.pdfon the page 210 (referencing dashboard content in external portals or applications using
the oracle BI presentation services DASHBOARD URL. I'll not explain basic syntax how to use DASHBOARD URL. This can be found in documentation or other blogs.

Example (with unicode replacement):

I will explain dashboard url navigation between two pages on the same dashboard. Dashboard pages, columns, etc, are based on Croatian terminology, so I will try to translate it, although it's not so important, the technique is.

So, there are two dashboard pages on Development dashboard, revenues, which give us some measure for products from the fact table and the second is šifarnik proizvoda which give us some detailed information about products, in this case only product group is shown in the detail part.


I'll explain reports on each dashboard pages later.

The basic idea on the first page is that the user enters some value on the dashboard prompt field and we need to give a possibility to enter the code or the product name. Also, the user want to use LIKE condition it the report.

This is the dashboard prompt in the first page (the name of the field is 5):


We set here presentation variable v_ulaz_var. This is very important to set. We'll use it later in te second report in the second dashboard page to remember what user enters in this prompt when we return back from the second report on the second dashboard page to this one (first report on the first dashboard page). We want to return value that user enters, not reseting it.

Abbreviations:

The first report on the first dahboard page -> FRFDP
The second report on the second dashboard page -> SRSDP


The first report on the first dashboard page (FRFDP):


The first two columns are product name and the code, the third one is the measure and the last one is important for DASHBOARD URL navigation.

Note that we enter manually filter for LIKE condition in case that the user enters product name or the product code.

Now, here is our next step. We want to go to the another report (SRSDP) and parse the product code from the current row column from FRFDP, and the result will be detailed information for that product (product code).

But we need one more thing here. We want to parse the value that we set in the v_ulaz_var, which in presentation variable that we set in the first page. And we want to show it in the second report (SRSDP). So for this case we will do some tricks.

In the second dashboard page we make a dummy dashboard prompt first:


Inside it we can parse what ever we want to from the first dashboard page (current row column report values, constants, presentation variables from dashboard prompts from the first page, etc). In every field we set new presentation variables that we can use in the SRSDP. So, this is a trick that works here. And in any case we can return any value to dashboard prompts on the first page.

Note that when using DASHBOARD URL you are parsing value to a dashboard prompt fields and the GO button is automatically executed and you get the report. So beware what you are putting on your dashboard page.

Here are fields and presentation variables on dummy dashboard prompt:

Field 1, presentation variable v_var1 -> we'll parse current row product code (šifra proizvoda) value from the FRFDP inside it.

Field 2, presentation variable v_var2 -> we'll parse harcoded string 'Dva' inside it.

Field 3, presentation variable v_var3 -> we'll parse harcoded string 'Tri' inside it.

Field 4, presentation variable v_var4 -> we'll parse v_ulaz_var presentation variable from the dashboard prompt from the first dashboard page inside it.

The second report on the second dashboard page (SRSDP):


The first two columns are product name and the code and the third is product group.

In the column four (Varijable) we concatenate all presentation variable from the dummy dashboard prompt, to see if our navigation works fine and if all parameters are successfully transferred:


The last column (Povratak) we'll explain later, because it's a part of DASHBOARD URL for returning back to the previous dashboard page and return v_var4 into v_ulaz_var.

In this report we have a filter that is important, because we are parsing product code (Šifra proizvoda) from FRFDP to SRSDP. We are using v_var1 presentation variable in which we parse product code before:


Now, let's go to FRFDP. There is a column Go dashboard navigation in which we'll place DASHBOARD URL code to call a second dashboard page and parse parameters to a dummy dashboard prompt and according to that implicitly call the second report on the second dashboard page (SRSDP).

Column GO dashboard navigation on FRFDP:


Basic explanation:

PortalPath=/shared/Development/_portal/Development/&Page=%u0160ifarnik%20proizvoda

%u0160 and %20 is required because of unicode translation (Šifarnik proizvoda).

Col1=1 -> target field on the dummy dashboard prompt on the second page is 1.
Val1=... -> source field from FRFDP.

In the field 1 in the dummy dashboard prompt we are parsing product code (Šifra proizvoda).

If the product code (šifra proizvoda) has spaces inside the data (for example, PR 01), we need to replace space ' ' first with a plus sign '+' and then the plus sign '+' replace with ASCII 2B.

Now, let's go to again to SRSDP. There is a column Povratak in which we'll place DASHBOARD URL code to return back to the previous page without reseting dashboard prompt from it, so basicly we are returning parameter from the presentation variable v_var into field 5 in the first page dashboard prompt. In case that we don't do that, when returning back with DASHBOARD URL to first page we would get all rows in the FRFDP, and we don't want that, we want to apply what we have in the prompt in the previous state.

Column Povratak on SRSDP:


Col1=5 -> target field on the first page dashboard prompt is 5.
Val1=v_var4 -> the source parameter is the presentation variable v_var4 that we set in the second page dummy prompt.

Finally, this is complete view, with both dashboard pages and sections inside them:



Note that in the second page we put dummy dashboard prompt on the separate section.

Test

At initial, the user place the value in the first page prompt and according to that we receive the result on the first page report. We don't know whether the user enters all product code or product name or just few strings (LIKE condition), both conditions are supported in the report filter. We press GO button and get the data:


We see that the product name LIKE condition (Naziv proizvoda LIKE 'Trk%') is satisfied and we receive one row in the result of the first report.

Also in the current row of the report we know the product code (Šifra proizvoda) which is hidden column (the value is PR-01, we don't see it).

With the column GO dashboard navigation we are going to second page and forwarding already mentioned parameters.

The result is the second page with the second report:


Note that all parameters are forwarded correctly and we get the desired data in the report.

We can hide dummy dashboard prompt with guided navigation applied on the section:


For guided navigation we use dummy report that always shows the data, so the section is always hidden in that case:


Now, we don't see dummy prompt:


After we press column Povratak (string Povratak na prvi page) we are going to the fist page without reseting filter to the first report, this is previous state:


Conclusion

This is the way and example that we can parse presentation variable from the first report to the second. Each report has its own page and its own dashboard prompt. We can hide the second page and when we call it from the DASHBOARD URL on the first page report it's look like we are calling a new report, the only difference brtween GO URL (which is only for reports) and this one is that we can parse real presentation variable to the target dashboard prompt on the target page and use it in the target report which is paced in the target page.