Friday, November 7, 2014

how to use presentation vaiable in direct db request for date in between

 Use presentation variable in direct db request for date in between


Use below format for between filter in direct db request in OBIEE.
Here v_date is presentation variable

to_char(trunc(day_dt),'YYYY-MM-DD') between substr('@{v_date}{2001-01-01}',1,instr('@{v_date}{2001-01-01,}',',')-1)
AND SUBSTR('@{v_date}{2020-01-01}',INSTR('@{v_date}{2020-01-01}',',')+1 )

Disable Case sensitive search features in prompt –OBIEE


1. Disable Case sensitive search features in prompt –OBIEE :

Requirement:

Whenever a user selects some parameter from the Dashboards Prompt, the filters are applied to the report accordingly. The case of the parameter is also taken in to consideration while filtering the report. However, the users want to disable case sensitive search in obiee

The CASE_SENSITIVE_CHARACTER_COMPARISON parameter in the NQConfig.ini file controls the case sensitive search within OBIEE. The CASE_SENSITIVE_CHARACTER_COMPARISON parameter is only meant to describe the BI Server case sensitive setting not the Database. In other words it doesn't affect the DB queries, only data that has been cached by the BI Server is affected by this parameter.

Hence we can include the following command in the connection pool of the repository.

Alter session set NLS_SORT=BINARY_CI
Alter session set NLS_COMP=LINGUISTIC

write above script in 'Connection Script'

 2.Custom Error Messages –OBIEE :

 

Requirement:
           
            If a report shows any error, user wants a custom error message to be displayed instead of OBIEE default message. Also this message will contain a link to a help portal where user can raise a ticket for the incident.

Solution:

            The default OBIEE messages are stored in the directory <InstallDirectory>:\OracleBI\web\msgdb (on windows machine). The msgdb folder contains many subfolders different languages. The folder l_en contains web messages for the language English. The folder l_en\messages contains a file odbcaccessmessages.xml. We can modify this file in order to include our custom error message.

The screenshots are given below

1.            The default English UI messages are stored in the folder <InstallDirectory>:\OracleBI\web\msgdb\l_en
2.            Open the file odbcaccessmessages.xml in notepad.
3.            Change the content of the WebMessage kmsgOdbcAccessOdbcException with the custom error message. In order to add a link (HTML Anchor Tag), we have to put one more tag i.e. <HTML> immediately after the WebMessage opening tag as shown in the screenshot. This way the anchor tag will be treated as HTML content while showing on the UI.

Clear selected filters from prompt in OBIEE (clear button)

Below HTML will clear selected filters from OBI prompt except default selection.

<div class="XUIPromptEntry minibuttonOn"><a href="#" onclick="return PersonalizationEditor.removeDefaultSelection(false)">Clear</a></div>