X

An Oracle blog about BI Publisher

Who's on first?

Few questions recently on finding out who is logged into BIP so you can secure a dataset based on the user. In 5.6.2 the support was there, well sort of ... its a nasty work around but can be done. Check out the forum threads for the solution.
Im pleased to say in 10.1.3.2 it's sooo much better.



You can add the following string to your data sets, ':xdo_user_name' to limit the returned data set.
For example:

select  EMPLOYEES.LAST_NAME as LAST_NAME,
  EMPLOYEES.PHONE_NUMBER as PHONE_NUMBER,
  EMPLOYEES.HIRE_DATE as HIRE_DATE,
:xdo_user_name as USERID
from   HR.EMPLOYEES EMPLOYEES
where lower(EMPLOYEES.LAST_NAME) = :xdo_user_name
Notice the use of the lower() function , the xdo_user_name will always be in lowercase format.

BIP does not have a user_id so you need to go with the user name and either use it directly in the query or maybe go against a lookup table to find a user id.
So it's now simple, now you know who's on first



 



 

Join the discussion

Comments ( 2 )
  • Mustafa Tuesday, September 9, 2008
    Thanks for this usefull tip.
    Do you know where can i found the list of the build-in (system) paramters/variables like :xdo_user_name.
    regards,
    mustafa
  • Mark Thursday, August 20, 2009
    Is there any reason why the value for :xdo_user_name is blank when I used in SQL query?
    Do I need to configure something?
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.