Has no value definition - Session INIT Block.

Hi,
I have a Session initialization block for Fetching Departments from a Security table for the user logging in.
One user can have Multiple Departments assigned to him, so i enabled Row-wise initialization in INIT Block.
But when a user not assigned to any departments logs in, i am getting 'Session variable has no value definition' error in all the reports. But i should instead pass a default value when SQL in INIT Block is not returning anything. Like '0'.
How can i do this? please respond.
Thanks
Swami

Hi Swami,
When the query fetches a result set, the variable gets initialized.
But, when the query doesn't fetch any rows, the variable doesn't gets initialized and hence "no value definition" errors out.
So, to avoid this,
In the query itself, place an exception condition which returns '0'.
select dept_name from table
where user_name = ':user'
UNION
select '0' from table
where user_name <> ':user'or you can use like this
select CASE WHEN user_name = ':user' THEN dept_name ELSE '0' END
from tableP.S: Query written orally. (Pls adjust the query accordingly)
Regards,
Raghu

Similar Messages

  • [nQSError: 23006] The session variable, NQ_SESSION.S_Budgetary_Control, has no value definition.

    Hi All,
    I have created a Initialization block named Budgetary_Control
    the query entered in the data source is
    select
         column
    from
         table
    where
         user_name=':USER';
    then i selected a connection pool and tested with 2 USER
    and it gave me expected result.
    in the Edit data target i gave a name to this variable as S_Budgetary_Control and a default valus as -1
    i checked on row wise initialization test again
    it show me multiple record.
    the i save the rpd and deployed the same to the server.
    now when i trying to create a report using this varriable like VALUEOF(NQ_SESSION.S_Budgetary_Control) it gave me error like
    [nQSError: 23006] The session variable, NQ_SESSION.S_Budgetary_Control, has no value definition.
    Please help me to get rid of this issue.

    set Required for authentication
    and followed by Authentication init block as Execution Precedence
    ~ http://cool-bi.com

  • The session variable has no value definition

    Hi Gurus,
    For all Dashboard reports and Adhoc reports suddenly we are facing the below error for some users
    A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 23006] The session variable, NQ_SESSION.AREA, has no value definition.Please have your System Administrator look at the log for more details on this error. (HY000)
    In those dashboard reports we are not using any Area prompts even if we take only area column in analysis also it is showing the same error. But for admin the reports are coming fine only for some users it is showing like that but previously it was fine.
    Regards,

    Hi,
    this means your init block is not working. Check the init block why its not resulting in any data.
    only when init block doesn't  not result in data , server checks for default value for the variable.
    Since there is no default value, you get this error.
    Init blocks can fail because
    1. connection pool is not working.
    2. The table or view does not exist
    3. no data in the table
    4. filter in the sql in init block is not initialized if its coming from another session variable.
    typically no data should bring no results in a report.
    Since you have a session variable being part of the report, and that variable failed to initialize you get this error.
    Thanks,
    Satya Ranki Reddy

  • Row wise Initialization - "Session Variable has no value Definition"

    Hi,
    I have gone through other posts relating to this error, but could not find a solution.
    I have defined an initialization block with 'Data Source' as SELECT 'TEST_VARIABLE', cost_center from XX_COST_CENTER.
    In the 'Edit Data Target', i have selected the 'Row Wise Initialization' option.
    When i 'Test' this initialization block, using the 'Test' button, i get the exected output, with all the different Cost Centers being defined.
    However, in the Presentation Services when i add a column and change its formula to VALUEOF(NQ_SESSION.TEST_VARIABLE), i get an error
    +[nQSError: 23006] The session variable, NQ_SESSION.TEST_VARIABLE, has no value definition.+
    Would appreciate some input, to check if i have missed any steps, or am doing something wrong
    Thanks & Regards,
    Ab
    Edited by: obiee_user_ab on Jan 16, 2012 6:25 AM

    Hi,
    Error is caused because no value is returned from the sesision variable for the logged in user, you may check the NQquery.log file to see if the initblock was successfull and if that returned any rows, try setting default value in the session variable
    It might also happen when
    1. You created the variable as Repository variable in RPD and referring as session variable in Answers
    2. It may also happen when you are referring the Session variable Name wrongly in Answers. E.g "Current Week" in RPD (2 Words) and CurrentWeek in Answers (Single word).
    Try to use the same letter case for the name of the variable (upper and lower).
    Hope this helps.
    Regards
    MuRam

  • The session variable, NQ_SESSION.OU_ORG, has no value definition.Please have your System Administrator look at the log for more details on this error. (HY000)

    Hi All,
    I have created a user 'Bitest' and group 'Bi_Test_Group'. Assigned the user to the group and the group to BI consumer role.
    I gave access to only procurement and spend catalog folder reports and Dashboards.
    When I login to BI Presentation Services with above created user and open any procurement and spent catalog dashboard i am getting below error in every report.
    Its BI Apps 7.9.6.3 installation.I gave read  access to group to all procurement and spent subject area.
    Error Codes: OAMP2OPY:OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P 
    Odbc driver returned an error (SQLExecDirectW). 
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 23006] The session variable, NQ_SESSION.OU_ORG, has no value definition.Please have your System Administrator look at the log for more details on this error. (HY000) 
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT Fact."PO Amount" FROM "Procurement and Spend - Purchase Orders"')}
    SQL Issued: SELECT Fact."PO Amount" FROM "Procurement and Spend - Purchase Orders"
    Please help me in resolving this issue and getting results on Dashboard.
    Thanks in advance
    Thanks,
    Sandeep

    Check your query or connection pool settings etc

  • How does one access custom function in OBIEE RPD for Session Init Block SQL

    Hello:
    We are using SSO for authentication and authorization for OBIEE, using Init Blocks in the RPD and httpHeader as the source of variables in the Instanceconfig.xml file. (As long as the user is member of one group, the results are fine. However, as soon as the user is assigned to multiple groups, group values become URI-encoded.)
    To solve the problem of URI-encoding, we have deployed a function to the DB (ora 10gr2).
    The problem I am running into is that when I call the function from an Init Block (Security), OBIEE Presentation Services (OPS) acts as though the function does not exist or is not called.
    Initialization String: select group_OBIEE(WEBGROUPS) from dual
    ("group_OBIEE" is the function that was deployed.)
    Testing: Successfully tested the function in PL/SQL as well as using the Test button in RPD.
    Reason for the fuction: The function decodes the extra characters using a substr function. SSO uses Shibboleth for Authentication and Authorization.
    For example, for our group name, we expect to obtain the following value:
    edw:hrdir;edw:findir (2 groups separated by a semi-colon)
    However, we are obtaining the following: (Determined via the narrative view in Answers: @{biServer.variables['NQ_SESSION.GROUP']} )
    URI-ENCODED&lt;edw%3ahrdir%3bedw%3bfindir&gt;
    Please note: There are no such problems when we are passing only a single group value (i.e. edw:hrdir). So, in cases when we pass only for Group for the user, we are able to authenticate and authorize w/o a problem.
    Any suggestion on how to call the function or a better way to approach this problem?
    Thanks in advance for your help.

    You don't need a function to assign the groups in your Init Block. In fact you should not use it. You need to use a standard select and define the Init Block as Row-Wise. This means the BI Server knows the Init Block will return more than one row. You select statement should look like this:
    SELECT 'GROUP', YOUR_GROUP_NAME FROM YOUR GROUP_USERS_TABLE WHERE YOUR_USER_ID_COLUMN = ':USER'

  • RPD: How to use multiple-value variables in initialization blocks ?

    Hi all,
    I have a set of initialization blocks required for authentication, two of which are running row-wise. The first one sets a multi-valued variable, and the second one uses this variable.
    Or at least, should use, because it actually fails. The NQServer log says
    [nQSError: 13011] Query for Initialization Block 'My_Init_Block_2' has failed.
    [nQSError: 23006] The session variable, NQ_SESSION.MY_VAR_1, has no value definition.
    My first variable is initialized in a basic row-wise initialization block. What's more, if I say my 2nd block isn't required for authentication, and I read in a narrative the contents of my first variable, it contains the set of value I expect it to have.
    can anybody please advise?
    thanks in advance!
    Cedric..

    There is an example in the OBIEE Server Administration manual that looks very similar to your code except that the whole of the valueof string is quoted:
    select
    NAME, VALUE from RW_SESSION_VARS
    where USERID='VALUEOF(NQ_SESSION.USERID)' {code}<br /><br /><br /><br />Pete                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • BIP Security - Data Level Security / Init Blocks

    Hello, I am using BIP 11.1.1.5. I am aware that in OBIEE data-level security can be implemented by placing permissions on a application role. However, I am wondering if this can be accomplished in BIP if I use a BI Analysis or SQL as the datasource for my data model. I have a catalog of 100 BIP reports and was wondering if I can implemented data-level security via the RPD. I am exploring the various options of executing this type of security. I already performed some research and found Oracle's whitepaper on Row Level Security with BI Publisher.
    Another Question: Does session init blocks work with BIP? I flipped the switch for BIP security model to 'Oracle BI Server' on the Admin security page. Next, I went to the RPD in online mode and created a simple query inside a init block. However, when I logged into BIP I didn't see the variable from the session init block in the Manage Sessions window.
    Thanks

    Look at the below link..It has three options. this one is from veeravalli I believe..I personally like the second option if there are not many reports to work with.
    cool-bi.com

  • Row wise init block has no value defination.

    Hi Experts,
    I ahve requirement where i need to pick the department of loged in users in dashboard prompt.
    So I created the session variable with row wise and written the query:
    SELECT DISTINCT 'Department', Department_Name FROM tableA WHERE A.LOGIN_ID= ':USER'
    But I get this error in answers:
    The session variable, NQ_SESSION.Department, has no value definitions

    Thanks for your help !
    I created a session variable UNAME
    SELECT 'VALUEOF(NQ_SESSION.USER)' FROM DUAL
    Then I created the second variable with row wise init block.
    SELECT DISTINCT 'Department', Department_name FROM Department A WHERE A.LOGIN_ID= 'VALUEOF(NQ_SESSION.UNAME)'
    in second init block i.e. for department i added the init block(Uname) in execute precedence.
    Still I am getting the same issue..any help pls?
    Thanks.

  • Session variable using :GROUP variable in init block

    I'd like to filter using session variable.
    This session variaible should be build using :GROUP special session variable
    I'd like do something like this (init block):
    select  case when instr(upper(':GROUP'), 'ADMINISTRATOR')>0 then 'Yes' else 'No' end from dual
    but it seems to doesn't work properly (It means I have always 'No' value)
    After investigation i did some simple test
    initialization block like this:
    select  upper(':USER'),upper(':GROUP') from dual
    set variables using above init block: UPP_USER and UPP_GROUP
    next i did simple reques with 4 columns:
    *1. VALUEOF(NQ_SESSION.USER)*
    *2. VALUEOF(NQ_SESSION.GROUP)*
    *3. VALUEOF(NQ_SESSION.UPP_USER)*
    *4. VALUEOF(NQ_SESSION.UPP_GROUP)*
    and my result is:
    1. Administrator
    2. Administrators;IT_Deparment ....
    3. ADMINISTRATOR
    4. _:GROUP_
    Why in 4th column I didn't get: ADMINISTRATOR;IT_DEPARTMENTS ....
    Can I use special variable GROUP in initialization block?
    Could someone explain it?

    Hi,
    Only :USER and :PASSWORD are available
    try (select 'VALUEOF(NQ_SESSION.USER)', 'VALUEOF(NQ_SESSION.GROUP)' from dual instead.
    (You migth have to force a fill of the group variable first)
    Regards
    John
    http://obiee101.blogspot.com/

  • Initialized values for Init blocks disappear at random

    Hi everyone
    I have a strange scenario and would appreciate your help with some ideas on how to troubleshoot this.
    We have OBIEE 10.1.3.4. It is a BI Apps 7.9.6.1 environment and OBIEE is integrated with EBS. Everything is working 100% fine and all initialiation blocks are initialized succesfully. Now iit has happened a couple of times that the init blocks seems to "lose" their initialized values. For example, CURRENT_FISCAL_YEAR will be initialized to 2011. Then out of the blue, next time you log in this init block has the value of 2008, which is the default initializer. The servers are all up and there are no errors.
    Any ideas about what is going on here?
    Thank you

    Check the SQL query in init block.It will take default value if SQL query does not fetch any record.
    I guess you have created a repository variable.
    Regards,
    Sandeep

  • Using session variable in init. string of session variable init. block

    hi, experts,
    is it allowed to use a loaded session variable (A) in the initialization string in the initialization block of another session variable (B).
    for example,
    in the execution precedence of initialization block of B, added the initialization block of A
    then in the initialization string in the initialization block of B,
    the sql likes:
    select yyy from a where a.xxx = 'valueof(nq_session.A)'
    what is the correct syntax?
    thank you very mucH!

    That's the correct format. If it is not working for you then you need to give more information as what's happening, how you populate your Init Blocks etc.

  • Multiple Row-wise session Variable in One Init Block

    Hi All,
    Can we create Multiple Row-wise session Variable in the same Init Block ?
    I need 10 session varibales with row-wise initialization in the same block otherwise i will have to create 10 initialization block .
    Any help is appreciated.
    Thanks,
    Ally

    Hi Ally,
    I'm not sure if this will work but have you tried a UNION ALL statement?
    ie.
    SELECT 'GROUP, group_id
    FROM groups
    UNION ALL
    SELECT 'DEPT',dept_id
    FROM depts
    etc....

  • Passing values to session variables from another application

    Hi,
    From an external application we are passing username and password for accessing the OBIEE Dashboard.In the url call we are passing NQUser and NQPassword. This is working fine.
    To setup data level security we need to pass region id list also as request object. Then we can filter the tables by the value in the region id list for that user. If we use external table to pass the home_id list then the application is working fine by setting up row-wise init block. But we need request object from an external application to send the list. How can we accept the list from OBIEE RPD?
    In the documentation it mentions about session variables - non system. But it requires an init block. How can we create a variable that accepts the values when user logins just like NQUser and NQPassword.
    Please suggest.
    Thanks.

    Try this ...
    http://oraclebizint.wordpress.com/2007/07/30/customizing-obi-ee-%E2%80%93-go-url-parameters/
    In this blog entry you'll find at the bottom ...
    Hello, Can you please explain how to pass parameter values in the url. For example, I want to run an answers query and pass into the url something like this: &Region=West
    Venkatakrishnan J Says:
    August 22, 2007 at 7:36 am
    Yes, this absolutely possible. You can get the details from the Web Services guide since it has all the necessary examples and more explanation. Thats why i did not include it in the blog. You can get it from page 213 of the Docs http://download.oracle.com/docs/cd/B40078_02/doc/bi.1013/b31766.pdf

  • Row-Wise GROUP init block isn't creating the variable

    Hi,
    I have an Init Block to set the GROUP variable using row-wise initialization. When I log into Answers with a user, and then check the session variables from Admin Tool, I don't see the GROUP variable anywhere. It seems like the init block is not creating it.
    I have execution precendence set up the way it should be. I have the groups created in both RPD and Presentation Services. Below is my simple query to try to get it to work:
    SELECT 'GROUP', 'OFFICER' FROM DUAL
    UNION ALL
    SELECT 'GROUP', 'SUPERVISOR' FROM DUAL
    Any ideas?
    Thanks
    Edited by: oroborus on Mar 24, 2010 1:25 PM

    Yes I saw the query in the log, it was successful. I added a simple request to a dashboard to display the value of GROUP, and it seems to be working correctly from there. Do the row-wise variables not show up in Admin tool session monitor?

Maybe you are looking for