Using row-wise multi-value GROUP system session variable in report filter

The title says it all except I am using 10g OBIEE.
What I want to do is filter on the dynamic system session variable GROUP created in a row-wise initialization block.
The GROUP vriable is being set up correctly and it shows the user dynamically put into the correct groups in Answers.
(Using the admin tool and looking at the user session, only the initial authentication block variables show up.)
But if I want to filter using the value of GROUP it doesn't work.
The obvious way is to choose the filter icon, then choose Add -> Variable -> Session, enter GROUP, and then display results.
It comes back with no rows.
Any idea how to do this? I've tried lots of things but none of them work either producing no rows or an error.
This is the kind of Answers SQL this report is resulting in, which makes sense to me, but produces no rows.
SELECT "Package Virtual Group (Dim)"."Package Virtual Group" saw_0, "Contact (Fact)"."Contacts All Count" saw_1 FROM "Case/Transaction/ABC" WHERE "Package Virtual Group (Dim)"."Package Virtual Group" = VALUEOF(NQ_SESSION."GROUP") ORDER BY saw_0

866038 wrote:
Errors come from trying things that don't work.
For example, instead of =, using IN VALUEOF(NQ_SESSION.GROUP) or @{session.GROUP} or lots of other things.
The question is this:
how can I filter a column in Answers using the GROUP session variable which had been initialized in a row-wise initialization block?
I can find no way to do it. Mostly it returns no rows.Hi,
we had a similar requirement, where we have an external name that has project number values. We used row wise initialization to capture all the projects that a user belongs to. Then, we applied the filters at the RPD level, instead of doing it at the report level. From you requirement I see that you are trying to filter the groups based on user login. When a user logs in, he will see the information about the groups that he only belongs to. Correct me if I am wrong here.
Assuming I am right about your requirement, providing the filter that you need apply in RPD.
On all the fact tables are joined to the Package Virtual Group dimension, apply the below filter.
case when 1=1 then (Dim)"."Package Virtual Group" END = VALUEOF(NQ_SESSION."GROUP");
The reason for use of case statement here is, it converts the logical sql to IN Clause, helping us acheive the exact query that we would want.
Please Award points if this helps.
Thanks,
-Amith.

Similar Messages

  • Override the GROUP system session variable within an initialization block

    Hi,
    We're trying to override the GROUP system session variable and having no luck. We've created an initialization block to return the semicolon-separated list we're looking for but when a user logs in, it seems like it is overridden with the default. When we change the name of the variable to something other than GROUP, it works great and we get the expected value. Is there something we're missing with overriding the particular value?
    Here is the query we're attempting to use for the variable:
    Select 'GROUP',
       ListAgg(OBI_ROLE, ';') Within Group (Order By USER_EMAIL)
    From CSS_OBI_USER_ROLE
    Where USER_EMAIL In (':USER')
    We also tried:
    Select
       ListAgg(OBI_ROLE, ';') Within Group (Order By USER_EMAIL)
    From CSS_OBI_USER_ROLE
    Where USER_EMAIL In (':USER')
    We made sure that the variable name was 'GROUP' as well.
    Not sure if it's important to note or not, but the returned values do correspond to existing applications groups already defined within OBI.
    Any help is greatly appreciated!
    Thanks,
    Jas

    since you have value as OpsReviewViewer;OpsReviewAuthor:BIAdministrator
    my not help row wise setting
    try to handle ; part using sql query so that you get those number of records to use row-wise
    so this
    Select 'GROUP',
       ListAgg(OBI_ROLE, ';') Within Group (Order By USER_EMAIL)
    From CSS_OBI_USER_ROLE
    Where USER_EMAIL In (':USER')
    with row-wise show work

  • Request variable not overriding session variable in report filter

    I have a dashboard edit prompt that saves value into a request variable with same name as session variable.
    The session variable has "enable any user to set the value".
    I have a filter in the report that has been converted to sql where the transaction date is greater than the value entered in the prompt.
    I see the "SET Variable" clause at the top of the sql being sent to the server in the logs.
    However, when I am in "View Logs", I see that the sql that is being sent to the database is sending the original value of the session variable instead of the new value in the request variable.
    I have tried using VALUEOF(NQ_SESSION.variablename), VALUEOF(variablename), VALUEOF("Dynamic Initialization Block Name"."variablename"), @{biServer.variables['NQ_SESSION.variablename']} with no difference.
    What am I doing wrong?

    user4006070 wrote:
    I have a dashboard edit prompt that saves value into a request variable with same name as session variable.
    The session variable has "enable any user to set the value".
    I have a filter in the report that has been converted to sql where the transaction date is greater than the value entered in the prompt.
    I see the "SET Variable" clause at the top of the sql being sent to the server in the logs.
    However, when I am in "View Logs", I see that the sql that is being sent to the database is sending the original value of the session variable instead of the new value in the request variable.
    I have tried using VALUEOF(NQ_SESSION.variablename), VALUEOF(variablename), VALUEOF("Dynamic Initialization Block Name"."variablename"), @{biServer.variables['NQ_SESSION.variablename']} with no difference.
    What am I doing wrong?When you created the prompt, did you make sure you set the variable type to Request variable?

  • System session variable ':GROUP'

    Dear Friends,
    I am having an issue with retrieving a value for the reserved system session variable :GROUP IN OBIEE 11.1.1.5
    From what I’ve read in the other posts I should be able to use :GROUP variable after where clause, and if there is more than one group assigned to a user INSTR should take care of this case. However I can’t get this to work.
    I am using row-wise variable, here is the code
    select 'ORGANIZATIONS' , s.ORGANIZATION_ID
    from T_VZA_SECURITY s
    where
    INSTR(':GROUP', trim(s.group_id)) > 0
    --INSTR('MyGroup', trim(s.group_id)) > 0
    I also tried to replace ':GROUP' session variable with 'VALUEOF(NQ_SESSION.GROUP)'
    my security table
    create table T_VZA_SECURITY
    (GROUP_ID VARCHAR(20),
    ORGANIZATION_ID VARCHAR (20),
    OWNING_DEPARTMENT_ID VARCHAR (20),
    ASSIGNED_DEPARTMENT_ID VARCHAR (20)
    Thank you

    I can't test my statement, it comes back with the error if i specify system session variable. If i replace a group variable with the string it works.
    I don't see how i can set the execution order - i only have one init block with row-wise initialization enabled. Basically followed
    http://www.rittmanmead.com/2012/03/obiee-11g-security-week-row-level-security/
    guide, and it does work for :USER but doesn't for :GROUP.
    Thank you for spending time to look at the issue!

  • Load more than one user groups to system session variable GROUP from table

    hi, I found that the value of the system session variable GROUP can be assigned by setting a sql in initialization blocks.
    however, if there are some users with more than one user group.
    can this be done by table driven (using sql in initialization blocks) ?
    thanks !!

    Referencing GROUP session variable in initialization blocks for different types of authentication
    http://108obiee.blogspot.com/2009/10/referencing-group-session-variable-in.html
    Users are assigned to multiple groups from external table with semicolons, see example two and three from the post.
    Regards
    Goran
    http://108obiee.blogspot.com

  • Nested groups ,multi-valued groups,nested roles ,multi-valued roles

    Does OID support
    1)groups, nested groups and multi-valued groups
    2)nested roles and multi-valued roles
    Thanks in advance

    You will typically see problems when multi-valued attributes are in the range of 10k-20k values. 10 values in a multi-valued attribute should not have much impact at all.

  • Non-system session variable is not initializing

    Hi,
    I have created a non-system session variable using Row wise initialization, and using it in answers to filter a column. it is displaying below error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 23006] The session variable, NQ_SESSION.Visible_All_Offices1, has no value definition. (HY000)
    I have tried all possible ways like giving the session variable in SQL result set, giving with quotes and without quotes. In all ways it is throwing the same error.
    I think this variable is not getting initialized when starting the session, is there any way to check it. this variable is also not showing in Manage > Sessions > Variables in OBIEE Admin.
    Please reply, if anyone faced similar issue. I am trying this from last 2 days.
    Thanks,
    Ash.

    When you run this sql query against the database, are you seeing results? and why are you using non-system session variables for this? Session variables are usually used to retrieve data into variables based on the user login.
    Check the following things:
    1) In variable target, make sure the row-wise initialization is checked.
    2) Make sure the cache option is UN-checked
    3) Run the sql against the database and make sure it is retrieving results.
    4) Try this in init block:
    select distinct 'Visible_Regions', NVL(Regions, '0') from SH.Regions_Dim A inner join SH.USER_Table B on A.employee_ID = B.employee_ID;
    -Amith.

  • Using Double Byte Characters in URL For Session Variables

    When I supply the value for a session variable in the URL for an IRPT page where the value contains double byte characters, Japanese in this case, the characters are corrupted by the time they are entered for the session variables.  Does anyone know a solution to this problem or experience in this area?  Currently using xMII 11.5 SR3.

    Hi Bryan,
    I would suspect that under the covers the session variable is of datatype string.  For double byte characters, it would need to be wstring.  There is a better explanation to be found at:
    Link: [Kanji and Java Datatypes|http://www.unix.com.ua/orelly/java-ent/jenut/ch10_04.htm] or you can try google on  Kanji Datatype  OR Kanji Java Datatype
    It could also be a problem with the operating system which I ran into about 10 years ago, but I would hope that Microsoft had moved beyond that by now.
    Maybe some more technical folks could chime in to confirm or deny my explanation.
    Mike
    Edited by: Michael Appleby on Jul 8, 2008 5:23 PM

  • Is it Possible to Create System Session variable

    Hi Gurus,
    I am creating a new Session variable but it is created under non-system variable. Is it any way to create a System Session variable. I am using User and GROUP the defualt Session System variable, i want to creat a new one for my requirement. Is it possible to do it? If so please give me some steps todo.
    Thanks in advance
    Regards
    @li

    Hi
    as far my knowledge, it's not possible...
    All system variables are predefined.. if you want to define anything you will have to satisfy with Non-System variable
    But curious, why do you want to create session variable there only???

  • Passing multi value parameter to the Drill through report

    Hi
    I have two reports say Report A and Report B.
    Both reports using same parameters.
    I am Navigating from Report A to Report B using Jump to Report option.
    Now when I pass multiple parameter to the Report B it only displays first parameter results.
    In report B I have parameter multi value select to true.
    I would like to know if its possible or not to pass multi value parameter in drill through report?
    I would appreciate if someone can help me here.
    Regards
    Amit

    Yes you can pass multi value parameters to a drill through report.
    It works similar to multi value parameters for subreports, which is discussed in detail in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=163803&SiteID=1
    -- Robert

  • Can i store the Result set values as a Session variable

    hai,
    I want the result set values of a query to be used many times and I want the same resultset between different page calls.
    I want all those records fetched from the database to be available in the next page with out refetching from the database.
    can any one help me out. its very urgent.....
    Thanks and regards,
    Ravikiran
    mail to me at : [email protected]

    "can i store the Result set values as a Session variable "
    Practically Yes u can
    but u want be able to accesses it in other pages
    u can try it and see
    the other thing u can do is store the values from the resultset in a object say vector and put vector in seesion and u can use this any where
    for e.g
    Vector v=new Vector();
    While(rs.next())
    v.addElement(rs.getString(1));
    v.addElement(rs.getString(2));
    session.putValue("myVector",v);
    now where u want to get it do this
    Vector myvec=(Vector)session.getValue("myVector");
    do do futher

  • Use row wise session variable in IN CLAUSE

    Hi,
    I' have a question. Suppose I have a row wise session variable named Users setted in an initialization block with following SQL query:
    SELECT 'NAMES', names from NAMES_TABLE where GROUP='Administrators'
    Suppose it returns value list 'JOHN, MARIE'.
    Can I set another row wise session variable named COUNTRY in initialization block with following SQL query:
    SELECT 'COUNTRY', country from COUNTRY_TABLE where names IN (VALUEOF(NQ_SESSION.Users))?
    so that COUNTRY variable returns for example list 'CANADA','OHIO'?
    or OBIEE returns error?
    If it's not possible can you give me a solution?
    Thanks

    Hi,
    I've resolved, but now I have another problem.
    I have a row-wise session variable called COMPANY_FILTER
    In Dashboard Prompt "Show" Section I have following query:
    SELECT Country."Company Description" from Prototype where Country."ID" = VALUEOF(NQ_SESSION.COMPANY_FILTER).
    When COMPANY_FILTER has at least one value it works fine. But COMPANY_FILTER can be even empty.
    In the latter case query fails.
    Now, when COMPANY_FILTER is null I must execute following query:
    SELECT Country."Company Description" from Prototype
    otherwise when it is filled i must execute following query:
    SELECT Country."Company Description" from Prototype where Country."ID" = VALUEOF(NQ_SESSION.COMPANY_FILTER).
    I have tried with CASE WHEN, but i don't know the exact syntax. Can you suggest me a correct query for my goals?
    Thanks

  • Unable to access value in System Environment Variable using Java

    I am using Java code to get the value of a System Environment Variable using the Runtime, Process java classes.
    The code works fine in tomcat, but when deployed in 9ias the code is unable to retrieve the value stored in the System environment variable in Windows 2000.

    Thanks for the comment steve, here is the code which i am using.
         public String getEnvironmentVariable()
                   // This will get the FEDREP_HOME environment variable
                   String FEDREP_HOME = null;
                   Process p = null;
                   Runtime rt = Runtime.getRuntime();
                        try {
                             // invokes a shell-command to retrieve FEDREP_HOME variable
                             String OS = System.getProperty("os.name").toLowerCase();
                                  // Get the Windows 95 environment variable
                                  if (OS.indexOf("windows 9") > -1)
                                            p = rt.exec( "command.com /c echo %FEDREP_HOME%" );
                                  // Get the Windows NT environment variable
                                  else if (OS.indexOf("nt") > -1)
                                            p = rt.exec( "cmd.exe /c echo %FEDREP_HOME%" );
                                  // Get the Windows 2000 environment variable
                                  else if (OS.indexOf("2000") > -1)
                                            p = rt.exec( "cmd.exe /c echo %FEDREP_HOME%" );
                                  // Get the Windows XP environment variable
                                  else if (OS.indexOf("xp") > -1)
                                            p = rt.exec( "cmd.exe /c echo %FEDREP_HOME%" );
                                  // Get the unix environment variable
                                  else if (OS.indexOf("linux") > -1)
                                            p = rt.exec( "sh -c echo $FEDREP_HOME" );
                                  // Get the unix environment variable
                                  else if (OS.indexOf("unix") > -1)
                                            p = rt.exec( "sh -c echo $FEDREP_HOME" );
                                  // Get the unix environment variable
                                  else if (OS.indexOf("sunos") > -1)
                                            p = rt.exec( "sh -c echo $FEDREP_HOME" );
                                  } else
                                            System.out.println("OS not known: " + OS);
                             // set up to read subprogram output
                             InputStream is = p.getInputStream();
                             InputStreamReader isr = new InputStreamReader(is);
                             BufferedReader br = new BufferedReader(isr);
                             // read output from subprogram
                             FEDREP_HOME = br.readLine();
                             br.close();
                        } catch(Exception ex)
                                  System.out.println("Error when getting FEDREP_HOME environment variable");
                                  ex.printStackTrace();
              return(FEDREP_HOME);

  • System session variable USER

    Hi,
    i have setup-ed the action links and used the USER variable for the EBS secuirty context init block as this
    EBS_RESP_ID
    EBS_RESP_APPL_ID
    EBS_SEC_GROUP_ID
    EBS_RESP_NAME
    EBS_USER_ID
    EBS_EMPLOYEE_ID
    USER
    Now for the sso configuration in the RPD i need to use the USER variable again as per the document (section A.1.1 )http://docs.oracle.com/cd/E14571_01/bi.1111/e10543/legacy.htm#BABFJEJF
    "To set up LDAP authentication:
    Create an LDAP Server as follows:
    Select Manage then Identity in the Oracle BI Administration Tool to launch the Security Manager.
    Select Directory Servers from the left pane in Security Manager.
    Right-click in the right pane in Security Manager and select New LDAP Server. The LDAP Server dialog is displayed.
    Create the LDAP server by completing the fields.
    Create an LDAP initialization block and associate it with an LDAP server. For more information. see "Creating Initialization Blocks" in Oracle Fusion Middleware Metadata Repository Builder's Guide for Oracle Business Intelligence Enterprise Edition.
    Define a system variable named *USER* and map the USER variable to an LDAP attribute (uid or sAMAccountName)."
    So how can i use the same user variable and assign it to LDAP init block as well the EBS security context init block.
    can you provide your valuable inputs here.

    Referencing GROUP session variable in initialization blocks for different types of authentication
    http://108obiee.blogspot.com/2009/10/referencing-group-session-variable-in.html
    Users are assigned to multiple groups from external table with semicolons, see example two and three from the post.
    Regards
    Goran
    http://108obiee.blogspot.com

  • Passing different (multi-) values for parameters to drill-through report, based on clicked subtotal in main report

    In Report Builder 3.0, I have made a main report in which the user can filter the underlying dataset using three parameters (all multi-value). The report shows totals grouped by these three parameters, as well as a grand total. What I want is to click
    on a total, which then opens the drill-through report for the corresponding records. I have achieved this for the grand total; the action in the corresponding text box passes all selected values of the parameters to the drill-through report.
    What I cannot figure out is how to make this work right when clicking on a subtotal. When I use the same expression as for the grand total, the same values for the parameters are passed, instead of the subset that apply to the corresponding text box in the
    main report. I expected this to work, because Report Builder /does/ correctly calculate the SUMs for the different levels, even though the expressions are the same.
    My question is: how do I pass different drill-through (multi-) values for parameters, corresponding to the respective subtotals in the main report?
    (FYI: I am using Microsoft SQL Server 2008 R2 and Report Builder 3.0 .)

    Hello Katherine,
    Thanks once more for your quick reply.
    I was aware of the textbox action "Go to report", and how to pass parameters in general. My question concerned how to determine the scope of the passed multi-value parameters (to the values that apply to the respective group/subtotal). The article you linked
    to is informative, but not a solution to my problem.
    A colleague of mine came up with a pragmatic solution: instead of trying to determine the scope of the parameter values, now I "look to the left in the results table". The two screenshots below should illustrate this. (Screenshots are in Dutch. Specific information
    is pixelated.)
    Unfortunately, I am not able to post images. Once my account is verified, I will edit them in. For now, I hope the text speaks for itself enough.
    [Screenshot: Drill-through parameters - 01: Report Builder tablix with subtotals]
    [Screenshot: Drill-through parameters - 02: Textbox properties (selected in screenshot 01) - Action - Go to report]
    The first screenshot shows the tablix in the Report Builder. The second screenshot shows the properties of the textbox selected in the first.
    Notice that I do not pass parameters for the first two columns, but the actual values. I only pass the parameter (containing /all/ user-selected values) for the third column. In the textbox below the selected one, I pass the actual values for the first column,
    and parameters for the last two. In the textbox above the selected one, I pass the actual values for all three columns.
    The only (cosmetic) flaw this approach has is that in the drill-through report, the list of selected parameters might show values that do not occur in the (corresponding part of the) results, and only for those parameters for which the main report passes (all
    user-selected) parameter values, and not the actual values in the results. The results are correct, though.
    If there is a way to directly determine the scope of multi-value parameters for passing to a drill-through report, I would still like know. But for now, this seems to work.

Maybe you are looking for

  • Printing in XML Publisher

    I am curious as to why you can't direct print an XML Publisher Report just like any other Oracle report. If you can print Oracle reports in PDF straight to the printer, why do XML Publisher reports require ps2pdf (note:338990.1)? We are having many i

  • Socket Demo works for Bell but not Verizon?

    Why does the same Socked Demo (sample from RIM JDE 4.5.0) work perfectly for Bell Mobility Blackberry 8830 (World Edition) and does not work for identical Verizon device (throws “Unable to open connection”)? Here is the sample code:  * SocketDemo.jav

  • Who Has An NVidia 7800 GT in their Quad G5?

    I just upgraded to an NVidia 7800 GT video card in my G5 quad 2.5 GHz. The video card has a power cable with a 6-prong connector (3 over 3). I can't see where this cable connects to the computer, nor do I see any 3 over 3 prong connectors anywhere in

  • Regarding Number ranges at plant level

    Hi all,    We have a requirement for number ranges at plant level for purchase orders. How it can be done ? whether to go for this with userexit or directly from config. it can be done. Thanks And Regards

  • Creating table in Database

    Hi, Can we create a table in database through XI, using JDBC Adapter? Thanks, Yogi.