Monday 29 April 2013

OBIEE11g: How to Call or Insert an Image in the Narrative View



Scenario : 

Recently we got a requirement to insert an image in to Narrative view of OBIEE Answers. We know how to call or insert an image in to Title view (by using fmap syntax).

Syntax: fmap:images/imagename.imageformat
e.g: fmap:images/ABC.jpg

In the same way we have one syntax to call an image in to Narrative view. 

Step 1: 

Place your images in the following paths 


Path 1:

OBIEE_HOME\Oracle_BI1\bifoundation\web\app\res\s_blafp\images

Path 2:

OBIEE_HOME\user_projects\domains\bifoundation_domain\servers\bi_server1\
tmp\_WL_user\analytics_11.1.1\7dezjl\war\res\s_blafp\images


Note: After adding the images in the above mentioned paths presentation server restart is mandatory.

Step 2:

Create your analysis/report by adding the required columns to the criteria tab. Click on Results tab and create "Narrative View"

Paste the following code in the Narrative box

<img src="res/s_blafp/images/imagename.imageformat" />  <b><font Size=4>&nbsp;&nbsp Test Information</font size> </b> 



Here "Image_name" is the full name of the image which you placed in the above mentioned paths.

Passing the Values or Parameters from OBIEE report to any website

Scenario: 

Recently i have got a very interesting requirement i.e passing the parameters from OBIEE report to a different website. For example we have a report which displays delivery status of an Item, Let us say you purchased a mobile in online. Then you will receive the conformation of your shipment through the mail and mobile message. They are going to provide you one Unique ID for your shipment using which we can track the status of your shipment. for example assume that your shipment is done through Fedex, by using your unique tracking number you can find the shipment status by logging in to Fedex website. In this scenario the user wants to get the status of the shipment from OBIEE report itself. The report displays the tracking number column , Once the user clicks on the particular tracking number it has to go to the respective website and gets the details of that tracking number. In this post we can see how this can be achieved....

Step 1:

 Navigate the shipping website in our example it is Fedex. Try to get the details of any dummy tracking number. This exercise is only to capture the URL of that Page.

In the above example i have just logged in to Fedex website and given one dummy tracking number to capture the URL.

https://www.fedex.com/fedextrack/index.html?tracknumbers=12345678sdfsf&cntry_code=us

Here we need to analyze where the parameters are passing in this URL.

https://www.fedex.com/fedextrack/index.html?------> It is constant for all the tracking numbers, so it is not going to change.

tracknumbers-----> (12345678sdfsf) This is variable in nature here we need to pass the tracking number on which the user is clicking from OBIEE report.

&cntry_code=us----> This is the country code if we are looking at only US tracking numbers then we can make it as constant or we can change it using a variable.

Step 2:  

Edit the OBIEE report and go to Criteria tab. Click on the column properties of the tracking number column and go to Interaction tab. Go to Value--->Primary Interaction--->Select Action Links----> click on (+) "Add Action Link"


Step 3:

Then Click on "Create New Action"---> Select "Navigate to a Web Page"






Step 4:

You can see one new window popping up.In that new window paste the URL we got from the Fedex website. (https://www.fedex.com/fedextrack/index.html?tracknumbers=12345678sdfsf&cntry_code=us) then click on "Define Parameters" 


Step 5:

Then you can see the following window...




 Here we need to define the parameters. By default it recognizes the variables and defines below...In our example we have two parameters. 
1. Tracknumber
2.cntry_code 

Step 6:

Go to Value tab and click on the options and select Column Values and select the Tracking Number column.


Step 7:

 Check in all the check boxes as shown in the below screenshot..

Now we need to check with the URL highlighted in the above screenshot. There we can find some variable values in the following format {Variable_Name}. In our example we have two variables {1} and {2}

{1} = Tracking Number , It is going to capture the value of the tracking number on which the OBIEE user is clicking in the report.

{2} = Country Code, In this case it is fixed that is why we are selecting it as a static value from the value tab. In the same way we can define multiple parameters as per the requirement.

Step 8:

After doing all these configurations click on OK and go to Results tab. You can see the hyperlink is enabled on the Tracking Number column values. Click on any value it will navigate to the Fedex website and its going to show the status of the tracking number on which we clicked.

In the same way we can add multiple websites in the Action Link menu and define the conditional navigation.