6 Replies Latest reply: Jan 25, 2013 6:53 AM by Maqs-Oracle RSS

    OBIEE SESSION variable value in report

    Maqs-Oracle
      Hi All,

      In one of my report columns I need to get value of session variables like VALUEOF(NQ_SESSION.COLUMN1).

      COLUMN1 is having values VARIABLE1 , VARIABLE2 etc .

      I have created variables with the same name using row vise initialization.

      For Example the report looks like this

      Region VALUEOF(REGION) SALES

      North Some value from North Variable 100

      South Some value from South Variable 200

      I tried getting the values like VALUEOF(NQ_SESSION."Geography"."Region") but i guess its not possible like that. But I wonder if there is a way to achieve this.


      Hope I have explained the requirement clearly.

      Thanks

      Edited by: Maqsood Hussain on Jan 25, 2013 12:32 AM
        • 1. Re: OBIEE SESSION variable value in report
          Satya Ranki Reddy
          Hi,


          You can use:
          @{biServer.variables['NQ_SESSION.variablename']}

          ex:

          @{biServer.variables['NQ_SESSION.USER']}

          Also refer to link below for more on syntax:
          http://shivabizint.wordpress.com/2008/10/02/oracle-bi-ee-variables-overview/


          Thanks
          Satya
          • 2. Re: OBIEE SESSION variable value in report
            Maqs-Oracle
            Hi Satya,

            I know how to use variables in column formula. But the problem is the variable name is different for each row based on value of Region column.
            So I cannot write the variable name in VALUEOF function.
            The text after NQ_SESSION in VALUEOF(NQ_SESSION. <>).should change for each row.

            Like this

            Region Variable value

            North valueof(NQ_SESSION.north)
            South Valueof(NQ_SESSION.south)


            Thanks
            • 3. Re: OBIEE SESSION variable value in report
              Paul
              Not really sure what you are trying to do but there is probably another way of achieving it without going to such trouble.

              Have a read about the valuelistof function which can be used with row wise variables in an init block. This may point you in the right direction.

              Paul
              http://total-bi.com
              • 4. Re: OBIEE SESSION variable value in report
                Maqs-Oracle
                Hi Paul,

                Thanks for your inputs. I will to try explain my requirement below.

                I have a detail report from which I want to navigate to the source application and pass dimension column value.

                For example if my report is like

                Order Number DatasourceIndicator Source URL Amount
                O1 ORDERSOURCE1 abc:9704/order 1000
                O2 ORDERSOURCE2 efg:9704/order 1500
                O3 ORDERSOURCE1 abc:9704/order 1700

                If I click on OrderNumber O2 i should navigate to source application 2 URL ( SOURCESERVER2:PORTNUMBER) and pass O2 to the source page.
                If I click on OrderNumber O3 i should navigate to source application 1 URL ( SOURCESERVER1:PORTNUMBER) and pass O3 to the source page.

                The URLs are stored in a separate table URL table

                DATASOURCE URL
                ORDERSOURCE1 SOURCESERVER2:PORTNUMBER/OrderPage
                ORDERSOURCE2 SOURCESERVER1:PORTNUMBER/OrderPage

                I can easily import this URL table in RPD, create a join with ORDER on DatasourceIndicator and use the URL column to get the Source URL.
                But I do not want to import table and create joins ( This is my last option though ).
                So, I was trying get the source URL values using session variables or some other easier way.

                I will check what can be done with valuelistof function. Please suggest if this can be done in some other easier way.

                Thanks
                • 5. Re: OBIEE SESSION variable value in report
                  Paul
                  If I understand you correctly (which I may not) I would advise you model this data in the traditional way using joins. Much easier than messing around with row wise session variables. You could use the action framework with a custom browser script to build up your URL to the external system.

                  Paul
                  http://total-bi.com
                  • 6. Re: OBIEE SESSION variable value in report
                    Maqs-Oracle
                    I agree I might have to model this data in the traditional way. However, I am keeping options open to achieve it in some other way where I don't have to join with Tables.

                    Thanks