How to Get UserID and Password

On OTN this question asked. Question is how to get current UserID and Password on a Report, to address this here I'm posting this blog so that it will be help full to other people as well.
In Reporting we can get userid by using function 'USER()' but there is no flexibility on how to get password

To get password we need to do little trick as shown below.
Create new session initialization block with sql query as
select ':USER',':PASSWORD' from dual
And assign these values to session variables, example GetUser, GetPassword
access these session variables on report by VALUEOF(NQ_SESSION.GetUser) or VALUEOF(NQ_SESSION.GetPassword) respectively.





No comments:

Post a Comment

Please give me your feed back