Passing a value to Inline View  WHERE clause through JDev...

Hi ,
I need to pass a value to inline view which is mentioned in below VIEW query.
That view is created inside a view using jDev. Note that there are two WHERE clauses one in the Main query and the other in the Inline view.
How to set the value for the innerView.
//copied the code from Java
view.volAlertsHistroyView.setWhereClauseParam(1, new Integer(clientId));
Gives an error Missing IN or OUT parameter at index:: 1
SELECT Alerts.SEND_TIME,
     Alerts.STATUS,
     Alerts.TEXT ,
     Groups.NAME,
          VolRoles.ROLE_NAME,
               VolRoles.ID as vid,
               Groups.ID as gid
     FROM ALERTS Alerts, ALERTS_GROUPS AlertsGroups, GROUPS Groups, VOL_ROLES VolRoles,
--Inline view starts
(SELECT GRP_ID, VRL_ID FROM vol_groups WHERE cli_id = :1) user_group_role
--Inline view ends
--Actual WHERE clause starts
     WHERE ((Alerts.ID = AlertsGroups.ALT_ID)AND (AlertsGroups.GRP_ID = Groups.ID))AND (AlertsGroups.VRL_ID = VolRoles.ID)
     AND AlertsGroups.VRL_ID = user_group_role.VRL_ID AND AlertsGroups.GRP_ID = user_group_role.GRP_ID
Please get back to me .
Regards
Mohan
[email protected]

What happens when you change your Java code to:
view.volAlertsHistroyView.setWhereClauseParam(0, new Integer(clientId));
The ":1" does not directly relate to the where clause param index you use in Java. In your query you could also use a ":2" for example. In BC4J you still use "0" for the first param.
Sascha

Similar Messages

  • Pass values dynamically to the WHERE clause in SFAPI

    Hi there
    We have a requirement to pass values dynamically (in the run-time of the interface) to the WHERE condition to our SFAPI query.
    Eg -
    SELECT person, personal_information, address_information, phone_information, email_information, employment_information, job_information, compensation_information, paycompensation_recurring, paycompensation_non_recurring, job_relation, accompanying_dependent,         global_assignment_information, direct_deposit, national_id_card, person_relation
              FROM CompoundEmployee
              WHERE last_modified_on >= to_date('LAST_RUN_DATE')  AND
                           last_modified_on <= to_date('CURRENT_RUN_TIME') 
    LAST_RUN_DATE is stored in a custom entity for which we execute another OData query. The custom entity is updated with the CURRENT_RUN_TIME once the interface has been executed successfully. So the next time the interface is run it picks up the LAST_RUN_DATE from the custom OData entity.
    SAP PO has the functionality to run a dynamic query for OData adapters. Refer to Note 2051137 - PI Successfactors adapter : Dynamic odata query and single synchronous sfapi query
    Eg - select fields from position (this is what you state in OData query path in the comms channel; this is static); and you have an advanced tab in comms channel where you mention dynamicquery and set it to true (this points to a XSD which has the keyword TOP, SKIP & FILTER in it).
    This gets the filter values passed from the BPM from another query (from a OData cust_table).
    So the whole query is - select fields from position filter field a = x field b = y etc. Field a field b are fields in position that are you passing values x and y in run time of the interface.
    SAP PO also has the advanced tab feature for SFAPI for dynamic query.
    Question is -
    how to use it?
    has anyone implemented this before?
    What does XSD will look like?
    How do we pass values to the fields to the Where clause for SFAPI.
    Any ideas are welcome!
    Regards
    Arijit Das

    After you have added a new where clause on the detail VO, try re-executing VO's query by DetailVO.executeQuery()
    If it doesn't work try re-executing the MasterVO's query after you have added the where clause on the detail

  • How to pass column values to narrative view  in obiee11g

    Hi All,
    my report values like this
    Month_name value
    Jan 100
    Feb 500
    march 400
    April 1000
    Now I can display march values in narrative view
    Ex:march values is 400.
    when i use @1,@2 it will display the Jan values.
    And Also i want show the Table view also in same report.

    Hello,
    Using dynamic sql you can pass column name to function. well I am not getting what you really want to do ? Please write in more detail. By the way I am providing one example here. see it uses dynamic sql.
    Create or replace function fun_updtest (p_columnname_varchar2 in varchar2,
    p_value_number in number)
    return number is
    v_stmt varchar2(500);
    begin
    v_stmt := 'update emp
    set '||p_columnname_varchar2||' = '||to_char(p_value_number)||'
              where empno = 7369';
    execute immediate v_stmt;
    return 0;
    commit;
    end;
    call to this function can be like this..
    declare
    v_number               number;
    begin
    v_number := fun_updtest('SAL',5000);
    end;
    Adinath Kamode

  • View where clause with "IN"

    Hi,
    Is there a nice way to specify the list eg.
    where itemNo IN(:1/?),
    where i can just set the where clause parameter with a array?

    If TABLE_OF_VARCHAR is a table type declared like this:
    CREATE TYPE TABLE_OF_VARCHAR AS TABLE OF VARCHAR2(2000);
    Then you can do this:
    select ...
    from ...
    where column_value in (select *
    from TABLE(CAST(? as TABLE_OF_VARCHAR)))
    this allows you to set an array-valued bind variable and cast its values into a table to select in the IN clause.
    This lets you have a variable number of args in the IN clause in a way that doesn't change the text of the SQL statement each time.
    I've posted a working sample project at:
    http://www.geocities.com/smuench/ArrayOfStringDomain.zip

  • Can pipelined functions' return values be used in WHERE clause?

    If I have function MY_FUNC that returns a REFCURSOR with columns COL1, COL2, COL3
    can I use the values returned in the output cursor in my WHERE clause as well as in the SELECT clause?
    e.g.
    SELECT COL1, COL2, COL3
    FROM TABLE(MY_FUNC(param1, param2))
    WHERE COL1 = 24 AND COL2=25
    Would that be proper SQL?

    Hi,
    SQL> Create OR Replace Package Pkg_Test_ Is
      2 
      3     Type my_typ Is Table Of Number;
      4 
      5     Function fnc_test Return my_typ Pipelined;
      6 
      7  End;
      8  /
    Package created
    SQL> Create OR Replace Package Body Pkg_Test_ Is
      2 
      3     Function fnc_test Return my_typ
      4        Pipelined Is
      5        va_typ my_typ := my_typ();
      6     Begin
      7        For i IN 1 .. 10 Loop
      8           va_typ.Extend;
      9           va_typ(va_typ.Count) := i;
    10           Pipe Row(va_typ(va_typ.Count));
    11        End Loop;
    12        Return;
    13     End;
    14 
    15  End;
    16  /
    Package body created
    SQL> SELECT *
      2    FROM Table(PKG_TEST_.FNC_TEST)
      3   WHERE COLUMN_VALUE > 5
      4  /
    COLUMN_VALUE
               6
               7
               8
               9
              10Regards,
    Christian Balz

  • How can I pass a value from one application to another through URL

    I am passing a value APP_USER from one application to another application (item is P_ASK_U) through navigation bar entrees URL.
    This is working with in the application..(javascript:popupURL('f?p=&APP_ID.:165:&SESSION.::&DEBUG.::P_ASK_U:#&APP_USER.#') )
    This one is not passing the value, eventhough it open the application..
    javascript:popupURL('http://htmldb.oracle.com/pls/otn/f?p=35129:1:::P_ASK_U:&APP_USER.');
    Is there any syntax error or is it not possible, please let me know..
    Thanks
    Venu

    Hi Scott,
    You are right, the first one do not need # character.
    In the Doc it is mentioned as....
    Pass the value on a URL reference using f?p syntax. For example:
    f?p=100:101:10636547268728380919::NO::MY_ITEM:ABC
    I am using the following URL, it pops up the external application, but it is not passing the APP_USER value to the page item of that application.
    javascript:popupURL('http://htmldb.oracle.com/pls/otn/f?p=35129:1::P_ASK_U:&APP_USER.');
    sorry I still do not know what I am missing..
    Thanks
    Venu

  • IS there any way to pass a value in the view as a variable

    Hi
    I have 2 views and 1 view on top of them that calls the 2 views e.g.
    View1
    select ename, deptno, date from emp;
    View2
    select sal, date from salary;
    view3
    select v1.ename, v1.deptno, v2.sal from view1, view2 where date = SOME VARIABLE;
    sql query
    Select * from v3 where date='10-AUG-2007'';
    ITs taking a while is there any way that I can define the V3 as follows
    view3
    select v1.ename, v1.deptno, v2.sal from view1, view2 where v1.date = SOME VARIABLE and v2.date=SOME VARIABLE;
    and then at the sql plus level can i use it like
    I have 2 views and 1 view on top of them that calls the 2 views e.g.
    View1
    select ename, deptno, date from emp;
    View2
    select sal, date from salary;
    view3
    select v1.ename, v1.deptno, v2.sal from view1, view2 where date = SOME VARIABLE;
    sql query
    Select * from v3 where date='10-AUG-2007''; can this date be passes as a variable in side the view definition.

    Setting up a view which contains a substiutution variable

  • Count all values with a special WHERE clause in a select for a group?

    Hello,
    I have the following table1:
    code, month, value
    *1,1,40*
    *1,2,50*
    *1,3,0*
    *1,4,0*
    *1,5,20*
    *1,6,30*
    *1,7,30*
    *1,8,30*
    *1,9,20*
    *1,10,20*
    *1,11,0*
    *1,12,0*
    *2,1,10*
    *2,2,10*
    *2,3,20*
    *2,4,20*
    *2,5,20*
    *2,6,30*
    *2,7,40*
    *2,8,50*
    *2,9,20*
    *2,10,20*
    *2,11,20*
    *2,12,20*
    This is a table with 3 columns, first column is a code, second one is the number of month, third one is a value.
    Now I want to select the records for each code. For example all records for code=1.
    I want to count how much values=0 for this code=1. After this counting I want to update the value with this count of 0.
    For my example:
    For code 1 there are 4 fields with value 0. Therefore I want to update all values of code1 to 4.
    For the second code=2 there are no value=0. Therefore I want to update the values of code2 to 0.
    This should be the result:
    code, month, value
    *1,1,4*
    *1,2,4*
    *1,3,4*
    *1,4,4*
    *1,5,4*
    *1,6,4*
    *1,7,4*
    *1,8,4*
    *1,9,4*
    *1,10,4*
    *1,11,4*
    *1,12,4*
    *2,1,0*
    *2,2,0*
    *2,3,0*
    *2,4,0*
    *2,5,0*
    *2,6,0*
    *2,7,0*
    *2,8,0*
    *2,9,0*
    *2,10,0*
    *2,11,0*
    *2,12,0*
    My question is:
    Is there any possibility in oracle to count in a select (or in a insert/update statement) all values=0 for one group (in this example named CODE) and do an update in the same statement for this group?
    Hope anyone can give me a hint if this is possible?
    Thanks a lot.
    Best regards,
    Tim

    Here's the select:
    SQL> select code, month
      2        ,count(decode(value,0,1,null)) over (partition by code) ct
      3  from   t
      4  order by code, month
      5  ;
                    CODE                MONTH                   CT
                       1                    1                    4
                       1                    2                    4
                       1                    3                    4
                       1                    4                    4
                       1                    5                    4
                       1                    6                    4
                       1                    7                    4
                       1                    8                    4
                       1                    9                    4
                       1                   10                    4
                       1                   11                    4
                       1                   12                    4
                       2                    1                    0
                       2                    2                    0
                       2                    3                    0
                       2                    4                    0
                       2                    5                    0
                       2                    6                    0
                       2                    7                    0
                       2                    8                    0
                       2                    9                    0
                       2                   10                    0
                       2                   11                    0
                       2                   12                    0

  • Parsing an input parameter for the where clause or record select value

    In my limited CR experience, I've always used a command database connection so that I can write my own SQL.  However, now I have to parse a  pipe delimited parameter to get my value for the where clause, so I'm selecting several tables and joining them through the Database Expert Links tab.  All works fine, but after doing that and then parsing the parameter with the below formula in the Select Expert, I notice that there is no where clause in the SQL query, and although the report eventually displays the proper values, it runs through thousands of records first.  Here is my Select Expert - Record formula:
    StringVar array Parm1;
    Parm1 := Split({?DATA_AREA}, "|");
    {SO_ORDERS.CASE_ID} = Parm1[2]
    If I change "Parm1[2]" on the last line to a valid Case ID, then there is a where clause in the SQL and the report generates immediately. 
    It seems like the record select formula is applied AFTER all of the records (without a where clause) are searched when I use the parsed parameter value, but when I hard code a valid value, it places that into the where clause BEFORE the sql is executed.  Is there a way to get the parameter parsed first and then use that parsed value in the SQL where clause?
    Thanks.
    Bill

    Yes crystal will run the query first to get 100% data and then applies record selection condition. To increase the performance you need to pass the where condition at the command level instead of report level. So you need to create a report using add command like this
    select * from tablename where field={?Parameter}
    {?Parameter} is a command level parameter.
    Now insert this report as a subreport in another report which has no connection but has a parameter
    {?DATA_AREA} and create a formula like this in the main report
    Split({?DATA_AREA}, "|")[2]
    Now right click on the subreport and go to change subreport links and add this formula from main report and link this to sub report parameter {?Parameter} without linking any database field from the subreport.
    Now your subreport runs with the where clause to get the data.
    Regards,
    Raghavendra

  • Pass Values to Output View WDA

    Hello WDA experts,
    I am creating a simple application to create 2 views. 1 Input and othe output view. I created Input view and able to get the input fields and do further selections in some strucutres in the method. Now I want to pass these values to output view fields. Where should I do the coding and what interface is to be used? Some coding clue please.
    Thanks
    Prasad

    hi prasad..........
              Consider you are having two views, view1 and view2.
              You want to pass a value from view1 to view2.
              Have an input field in view1.
              Create a node in the component controller.
              create an attribute in that node.
              now go to your view1->context.
              drag the node you created, from the component controller to your view context.
              now map the attribute to your input field.
              you might be having a button to navigate to view2.
              in view2 consider you are having another input field which displays the value you enterd in view1.
              now drag the same node into your view 2 context.
              so now view1 nad view2 will be sharing the same node.
              so automatically the values will be passed.
    ---regards,
       alex b justin.

  • Issue with dynamically setting where clause in OAF

    Hi All,
    I have a View object having the query below:
    SELECT  rownum LINENUM,
            B.line_id LINE_ID,
            B.INVENTORY_ITEM_ID INVITMID ,
            B.QUANTITY_DELIVERED PICKQTY         
    from   MTL_TXN_REQUEST_HEADERS A,
            MTL_TXN_REQUEST_LINES  B
      WHERE A.HEADER_ID=B.HEADER_ID
       AND A.MOVE_ORDER_TYPE=2 
       AND 'on'=:1
       AND B.TO_SUBINVENTORY_CODE=NVL(:4,B.TO_SUBINVENTORY_CODE)
       AND A.request_number=NVL(:5,A.REQUEST_NUMBER) 
    UNION ALL
    SELECT  rownum LINENUM,
            a.wip_entity_id LINE_ID,
            a.INVENTORY_ITEM_ID INVITMID,
            a.QUANTITY_ISSUED PICKQTY      
      FROM  WIP_REQUIREMENT_OPERATIONS a,
            eam_work_orders_v b
      WHERE a.wip_entity_id=b.wip_entity_id
         AND 'on'=:2
        AND a.ATTRIBUTE2=NVL(:4,a.ATTRIBUTE2)
      and b.wip_entity_name=NVL(:6,b.wip_entity_name)
    I need to pass dynamically a condition to my where clause that i can handle it by defining two bind parameters in the vo query and can pass it but the problem is the bind variable contains a string like 1311,13112,14445 that i need to pass for a field such as B.line_id in the first query and b.wip_entity_id in the second query so when i am trying by passing the string as one value it is working fine but for value separetd by comma it is giving prob.
    so i tried by passing dynamic where clause but it is everytime executing for first clause only how i can pass dynamically both the queries.
    vo.setWhereClause("LINE_ID in "+wherclause);
    please help me out
    Thnaks
    Deb

    Hi Gaurav,
    Thnaks for the reply i tried belwo way u suggested but the query is executing multiple times and i am not getting the correct data as expected.
    public void processPOData (String wherclause)
                 OAViewObject vo = this.getXXDPECONTAINLINESVO1();
                    String query =vo.getQuery();
                    String newwhereclause ="LINE_ID = "+wherclause;
                    StringBuffer stringbuffer = new StringBuffer();  
                stringbuffer.append("SELECT * FROM (");
                stringbuffer.append(query);
                stringbuffer.append(") where ");
                stringbuffer.append(newwhereclause);          
        ViewDefImpl viewdefimpl = getXXDPECONTAINLINESVO1().getViewDefinition();
                viewdefimpl.setQuery(stringbuffer.toString());
                 vo.reset();
                 vo.clearCache();
                vo.executeQuery();
                    System.out.println("where clause:"+wherclause);
    in my log file the query is forming like below:
    SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM ( SELECT * FROM ( SELECT  rownum LINENUM,
            B.line_id LINE_ID,
            B.INVENTORY_ITEM_ID INVITMID ,
            B.QUANTITY_DELIVERED PICKQTY ,
            B.TO_SUBINVENTORY_CODE UNLOADINGPNT,
            A.REQUEST_NUMBER RRNUM,
            NULL WORKORDNUM,
            NULL DTRNUM,
            A.description,
            A.FROM_SUBINVENTORY_CODE FROM_SUB,
            A.TO_SUBINVENTORY_CODE  TO_SUB,
            NULL SOURCE       
    from   MTL_TXN_REQUEST_HEADERS A,
            MTL_TXN_REQUEST_LINES  B
      WHERE A.HEADER_ID=B.HEADER_ID
       AND A.MOVE_ORDER_TYPE=2  
    UNION ALL
    SELECT  rownum LINENUM,
            a.wip_entity_id LINE_ID,
            a.INVENTORY_ITEM_ID INVITMID,
            a.QUANTITY_ISSUED PICKQTY,
            a.ATTRIBUTE2 UNLOADINGPNT,
            NULL RRNUM,
            b.WIP_ENTITY_NAME WORKORDNUM,
            NULL DTRNUM,
            b.description,
            NULL FROM_SUB,
            NULL TO_SUB,      
            b.source SOURCE
      FROM  WIP_REQUIREMENT_OPERATIONS a,
            eam_work_orders_v b
      WHERE a.wip_entity_id=b.wip_entity_id ) )) where LINE_ID = 30026) where LINE_ID = 30026) where LINE_ID = 30026
    But in my page i am getting all the data instead of only for line 30026, please help me out

  • Where clause in Master-Detial (BC4J+uiXML)

    Hi All,
    I have used uiXML + BC4J. I have problems again.
    I create two ViewObjects PlannerVO and ObjectiveVO,its have ViewLink Planner-0..1 to Objective - * ,which like master-detial pattern ,and join by EN Attribute (its have common fileds both).
    I create uiXML for BC4J by wizard. First i can render it and can click next or browse. Now I would like to pass parameter for filter it by where clause on master (PlannerVO). like this
    http://10.50.0.152:8988/Workspace4-TestBG-context-root/Planner2Objtive_View.uix?en=002182
    in Planner2Objtive.uix on the last line code I write more my tag , this is
         <event name="*">
              <bc4j:findRootAppModule name="Planner2ObjtiveAppModule">
                   <bc4j:findViewObject name="PlannerVO">
                        <method class="mypackage.ViewFilter" method="filterByEn"/>
                   </bc4j:findViewObject>
              </bc4j:findRootAppModule>
         </event>and in ViewFilter.java
    public class ViewFilter  {
      static public EventResult filterByEn(
        BajaContext   context,
        Page          page,
        PageEvent     event) throws Throwable
        EventResult result = new EventResult(page);
        // Check for event parameters that we care about
        if (event != null)
         String en = event.getParameter("en");
         ViewObject view = ServletBindingUtils.getViewObject(context);
         view.setWhereClause("Planner.EN = "+en);
         view.executeQuery();
          // Shove the value on the EventResult so we
          // can reference it from our UIX page
          result.setProperty("en", en);
        return result;
    }I get EN from URL and then pass it to uiXML and to Java for query BC4j Object,it not return any thing. In debug windows ,its have to query first for PlannerVO and second for ObjectiveVO ,on second query ObjectiveVO I see it pass null to second query (becuase of its must pass EN attribute from master PlannerVO to join it). What this its mean, first query has not success? or in this method can not filter by where clause.

    I am not sure I understand your problem.
    What I do see is that there is no event on your url:
    Planner2Objtive_View.uix?en=002182
    so your check:
    if (event != null)
    will always be false.
    If you port the uiXML fragment that you use to create the url, I can tell you how to set an event on it.

  • Default where clause

    i am passing dynamic where clause to a detail block from the main control block by pressing a button, the problem is different types of criterias are not comming together, like i may choose any value of machine or if its null it should bring all the machines combined with status which can be either opened,closed,inspected and i added them as elements of list and if the selected item has status with value All  it shoud bring all the status for all the machines.but the problem is its not satisfying the criteria properly and when i choose all nothing is displayed in the detail block.
    {code}
    declare
    cnt number;
    var varchar2(32000);
    VAAL VARCHAR2(32500);
    begin
    cnt := Get_List_Element_Count('IP_REP_INFO.T_LIST_IN');
    if cnt >= 1
    then
    var := null;
    for i in 1..cnt loop
      var := var||','||''''||Get_List_Element_Value('IP_REP_INFO.T_LIST_IN',i)||'''';
    end loop;
    Set_Block_Property('OV_JOB_MAINT', DEFAULT_WHERE,
        'WHERE (1=1 AND JOB_MACH IS NULL) OR (1=0 OR JOB_MACH in ('||substr(var, 2)||'))  AND (1 = 1 and :ORDER_STATUS IN ('||'''ALL'''||') AND
       STATUS IN (''OPENED'',''CLOSED'',''INSPECTION'') ) or ( 1=0 OR STATUS = :ORDER_STATUS)');
    GO_BLOCK('OV_JOB_MAINT');
    EXECUTE_QUERY;
    GO_ITEM('JOB_DT');
    end;
    {\code}

    First, when setting the DEFAULT_WHERE property of a block, I like to assign the dynamic where clause to a variable so I can output it to the screen or look at the value through the Forms Debugger to ensure it is formatted correctly.
    Second, have you perfected your WHERE clause in SQLPlus or SQL Developer to ensure it is returning exaclty what you want?  To me, this is a critical first step that should be completed first before trying to create the dynamic where clause through code.
    Third, it is not necessary to include the 'WHERE' keyword in your code because Forms will automatically do this for you.  Will it work?  Yes, but your query ends up looking like this when Forms executes the query.
    SELECT {...list of your columns here...}
    WHERE ( WHERE 'Your Dynamic Where Clause' )
    See my comments in your code sample...
    Set_Block_Property('OV_JOB_MAINT', DEFAULT_WHERE,
        'WHERE (1=1 -- This is not needed, just evaluate JOB_MACH IS NULL
         AND JOB_MACH IS NULL)
          OR (1=0 -- I don't understand why you want a FALSE test here...
              OR JOB_MACH in ('||substr(var, 2)||')
                 -- Have you outputted the value of VAR to the screen to ensure
                 -- it is formatted correctly?
         AND (1 = 1 -- Again, this is not needed
              and :ORDER_STATUS IN ('||'''ALL'''||')
         AND STATUS IN (''OPENED'',''CLOSED'',''INSPECTION'') )
          or ( 1=0 -- Again, why do you need a FALSE test here?
               OR STATUS = :ORDER_STATUS)'
    Regarding...
    if the selected item has status with value All  it shoud bring all the status for all the machines.but the problem is its not satisfying the criteria properly and when i choose all nothing is displayed in the detail block.
    Do you have an Order Status with the value of "ALL" in your table?
    My guess is that you don't because each record would have to record its actual status as well as the ALL status.  Based on this assumption, I recommend you alter your SQL so that it looks for the actual status as well as perform an IN comparison.
      'AND status IN ('||DECODE(:ORDER_STATUS,'ALL','''OPENED'',''CLOSED'',''INSPECTION'' ',''''||:ORDER_STATUS)||''')'
    The addition of the DECODE enables you to query on all statuses when the :ORDER_STATUS = ALL or it returns the status listed in the :ORDER_STATUS field.
    Hope this helps.
    Craig...

  • SSAS report action to pass multi-value list of dimention key values to a SSRS report parameter

    This was originally posted on StackOverflow and suggested I try here as well.
    I want to create a report action in an SSAS OLAP cube that generates a list of formatted values to pass into an SSRS report parameter that accepts a multi-valued parameter list.  This would be applied at the
    cell level in the SSAS action.  I have found a solution that gets me most of the way:
    How to Pass Multiple Values from an SSAS Report Drill Through Action to an SSRS Multi-Value Parameter, but not quite.  The action does appear in Excel and works
    if I run the action from a cell that is at or below the dimension attribute I am generating the list for, in this case,
    Account Key.
    Below is a link to a screen capture (unable to embed it due to lack of reputation) showing the action and dimension structure in Excel.  The action works as long as I run it at the
    Account Key level or below.  I want to be able to run it at higher levels, such as
    Account Major and still have it generate all then related Account Key values for the SSRS report parameter.  Running it at the higher
    Account Major level does not trigger the report to run.
    Excel Action Screen Shot:
    http://i.stack.imgur.com/QCGSp.png
    Below is the MDX I am using to generate the value for the report parameter:
    UrlEscapeFragment(
    GENERATE(
    DESCENDANTS(
    [Account].[Account Key].CurrentMember,
    [Account].[Account Key].[Account Key]
    [Account].[Account Key].CURRENTMEMBER.Name,
    "&rp:Account="
    I am hoping that I can somehow modify the MDX above to make it return all the
    Account Keys for any attribute of the Account dimension when ran from any measure cell, not just when ran at self and children of
    Account Key in the pivot table.
    Also, if it helps, I can execute the following MDX query on the cube and get the results I am looking for.
    WITH MEMBER [Measures].[Account Key List] as
    GENERATE(
    DESCENDANTS([Account].[Account].CurrentMember, [Account].[Account].[Account]),
    [Account].[Account].CURRENTMEMBER.NAME,
    "&rp:Account=")
    SELECT {[Measures].[Account Key List]} on 0,
    ([Account].[Account Company Number].[Account Company Number],[Account].[Account Major].[Account Major]
    ) on 1
    FROM [Company 10 Action Demo]
    Below are partial results:
    10.116&rp:Account=10.116.010
    10.117&rp:Account=10.117.010&rp:Account=10.117.020
    10.120&rp:Account=10.120.005&rp:Account=10.120.006&rp:Account=10.120.010&rp:Account=10.120.020&rp:Account=10.120.030&rp:Account=10.120.040&rp:Account=10.120.050&rp:Account=10.120.060&rp:Account=10.120.380&rp:Account=10.120.999
    10.123
    Questions
    Any ideas what I might need to do to get Account Key to be returned for any attribute of the
    Account dimension?
    Would I possibly have to alter my Account dimension in the cube to get this to work?
    Thanks in advance.
    Edit 1 - Adventure Works Cube Version
    I was unable to get the suggested answer with the "Exists" function to work.  To better demonstrate this issue, I have recreated it using the Adventure Works Cube.
    I will focus on the Customer dimension, specifically the Customer and
    Education attributes.  I created a report action called Test Report Action.  Below is the XML created for it in the cube.
    <Action xsi:type="ReportAction" dwd:design-time-name="f35ad5ee-5167-4fb8-a0e0-0a74cc6e81c6">
    <ID>Report Action 1</ID>
    <Name>Test Report Action</Name>
    <TargetType>Cells</TargetType>
    <Target></Target>
    <Type>Report</Type>
    <ReportServer>SQLSERVER</ReportServer>
    <Path>ReportServer?/Test Report</Path>
    <ReportParameters>
    <ReportParameter>
    <Name>Test Customer Existing</Name>
    <Value>UrlEscapeFragment(
    GENERATE(
    EXISTING DESCENDANTS(
    [Customer].[Customer].CurrentMember,
    [Customer].[Customer].[Customer]
    [Customer].[Customer].CURRENTMEMBER.Name,
    "&amp;rp:Customer="
    )</Value>
    </ReportParameter>
    </ReportParameters>
    <ReportFormatParameters>
    <ReportFormatParameter>
    <Name>rs:Command</Name>
    <Value>Render</Value>
    </ReportFormatParameter>
    <ReportFormatParameter>
    <Name>rs:Renderer</Name>
    <Value>HTML5</Value>
    </ReportFormatParameter>
    </ReportFormatParameters>
    </Action>
    Below are the steps to re-create the issue.
    Connect to the cube in Excel
    Add dimension Customer -> More Fields -> Customer
    Add measure Internet Sales -> Internet Sales Amount
    Right-click Internet Sales Amount cell, select "Additional Actions" -> "Test Report Action" and see customer values created for URL 
    When the action is ran at this point with Customer, I see the values created in the URL shown message box (since there is no SSRS report server at location specified).
    Now the part I'm unable to resolve
    Remove the Customer dimension and add Customer -> Demographic -> Education
    Right-click Internet Sales Amount cell, select "Additional Actions" -> "Test Report Action"
    Nothing happens. If I ran the action on the cell next to "Bachelors", I would want it to build up all the list of all the "Customers"  that make up the "Bachelors" in the
    Customer dimension as part of the report parameter.  If no attributes where used in the cube from the
    Customer dimension for that cell, then I would like it to return "All Customers", or something similar to show that all customers are included in the aggregations.
    I am not too MDX savvy, thus far.  I think I need to somehow join the
    Customers to Internet Sales Amount in the Generate function portion.  I have tried several different combinations of the
    Customer dimension and Internet Sales Amount, along with various functions to see if I could get this to work with no success.  I am hoping that someone more knowledgeable the me will have a solution.   If you need more details,
    please ask and I will provide them.

    Simon,
    Thanks for you help with this.  This morning I found a workaround.  Below describes what that is.
    What I ended up doing was getting a list of values from a degenerate dimension that I could use to pass to SSRS to get a list of transactions for a report.  Below is how I did this, in relation to the Adventure Works cube using the degenerate dimension
    Internet Order Details.
    WITH MEMBER [Measures].[Order Param List] AS
    GENERATE(
    EXISTS([Internet Sales Order Details].[Sales Order Number].[Sales Order Number].Members, ,
    "Internet Sales"),
    [Internet Sales Order Details].[Sales Order Number].CurrentMember.Name,
    "&rp:OrderNum=")
    SELECT {[Measures].[Order Param List], [Measures].[Internet Sales Amount]} ON 0
    ,([Date].[Calendar].[Date]) ON 1
    FROM [Adventure Works]
    This will get a list of Sales Order Number in a text string, separated by "&rp:OrderNum=" for each measure of
    Internet Sales. This would allow me to create an SSRS report to bring back detail information for each
    Sales Order Number. Below are some sample results.
    May 16, 2007 SO50493&rp:OrderNum=SO50494&rp:OrderNum=SO50495&rp:OrderNum=SO50496&rp:OrderNum=SO50497&rp:OrderNum=SO50498&rp:OrderNum=SO50499&rp:OrderNum=SO50500 $12,157.80
    May 17, 2007 SO50501&rp:OrderNum=SO50502&rp:OrderNum=SO50503&rp:OrderNum=SO50504&rp:OrderNum=SO50505&rp:OrderNum=SO50506&rp:OrderNum=SO50507&rp:OrderNum=SO50508 $13,231.62
    May 18, 2007 SO50509&rp:OrderNum=SO50510 $4,624.91
    With this, I can then create a Report Action in SSRS with a Parameter Value of
    UrlEscapeFragment(
    GENERATE(
    EXISTS([Internet Sales Order Details].[Sales Order Number].[Sales Order Number].Members, ,
    "Internet Sales"),
    [Internet Sales Order Details].[Sales Order Number].CurrentMember.Name,
    "&rp:OrderNum=")
    The way I was going about it before was flawed, as I was trying to get a list of the granular values from each dimension used to build the measure value and pass each one of those as separate parameters. I just needed to set something unique for each fact
    measure transaction that represents the value and uses that in a query parameter for the SSRS report.

  • Passing multiple values to a parmeters in SQL Query

    Hi friends,
    I have the following requirement -
    I need to pass multiple values to the parameter 'WHERE hou.name = (:id1)' and the query is copied below for your reference .
    SELECT partno part_num,
         customer customer_name,
         hou.name op_name
         FROM hr_organization_units hou,
         oe_transaction_types_all sot,
         ra_customers rc,
         ra_addresses_all ra,
         ra_site_uses_all rsu,
         oe_order_headers_all h,
         oe_order_lines_all l,pwr_sod50 ps
         WHERE hou.name = (:id1)
    -- and hou.name = (:id4)
    --hou.name in ('CPS FRANCE','CPS GERMANY')
    --and hou.name = (:id1,hou.name)
         and trunc(ps.sch_ship_date) between nvl(:id2,trunc(ps.sch_ship_date)) and nvl(to_date(:id3)+.99999,trunc(ps.sch_ship_date))
         and ps.group_id = 9999999
         and hou.organization_id=h.org_id
         and ps.line_id =l.line_id
         and l.header_id =h.header_id
         and h.invoice_to_org_id=rsu.site_use_id
         and rsu.address_id =ra.address_id
         and ra.customer_id =rc.customer_id
         and h.order_type_id =sot.transaction_type_id
    Looking for your help on this.
    Thanks In Advance.
    Thanks & Regards
    Ramya Nomula

    Hi karthik,
    I am sorry for the wrong updation of my anonymus block.
    My requirement is to pass a multiple values to the parameter in SQL query, and here is the code which is working now for the multiple values with ourt single quotes to the values -
    SELECT partno part_num,
         customer customer_name,
         ps.customer_id customer_id,
         avail_qty avail_qty,
         sch_ship_date schedule_Ship_date,
         so_num order_no,
         h.header_id header_id,
         line_num line_no,
         l.ordered_quantity ordered_quantity,
         scd_qty qty_open,
         s_price unit_price,
         part_flag flag,
         sub_inv subinv,
         sbu,
         hold,
         qoh,
         line_detail_id detail_id,
         picking_line_id,
         picking_line_detail_id,
         rc.customer_name cust_name,
         rc.customer_number customer_number,
         rsu.location location,
         sot.attribute5 order_type,
         ps.line_id line_id,
         h.transactional_curr_code transactional_curr_code,
         hou.name op_name
         FROM hr_organization_units hou,
         oe_transaction_types_all sot,
         ra_customers rc,
         ra_addresses_all ra,
         ra_site_uses_all rsu,
         oe_order_headers_all h,
         oe_order_lines_all l,pwr_sod50 ps
         WHERE ','||:id1||',' like '%,'||hou.name||',%'
         and trunc(ps.sch_ship_date) between nvl(:id2,trunc(ps.sch_ship_date)) and nvl(to_date(:id3)+.99999,trunc(ps.sch_ship_date))
         and ps.group_id = 9999999
         and hou.organization_id=h.org_id
         and ps.line_id =l.line_id
         and l.header_id =h.header_id
         and h.invoice_to_org_id=rsu.site_use_id
         and rsu.address_id =ra.address_id
         and ra.customer_id =rc.customer_id
         and h.order_type_id =sot.transaction_type_id;
    Condition for sending multiple Oprtaing Units -
    WHERE ','||:id1||',' like '%,'||hou.name||',%'
    This above condition is working when i am passing multiple values with out single quotes...but not working for multiple values with single quotes.
    Sample queries tested -
    select 1 from dual where ',aa,bb,cc,' like '%,bb,%' (This is working)
    select 1 from dual where ','aa','bb','cc',' like '%,'bb',%'(This is not working).
    Thanks In Advance!
    Looking for Your Great Help.
    Thanks & Regards
    Ramya Nomula

Maybe you are looking for

  • Lookandfeel in forms 9i

    Is that possible create my own look and feel to Forms 9i, or change oracle default look and feel?

  • SOAP (Axis) Adapter

    Hello XI SDNers, I want to use SOAP (Axis) Adapter for my Webservice Scenario. According to the SAP Note 1028961, I deployed the "aii_af_axisprovider.sda" file with corresponding ".jar" files from Apache AXIS 1.4 and the deployement was successful. B

  • Getting the network interface up in solaris 10

    Hi, I am a solaris newbie and am trying to get the network interface up on solaris 10. I have set the required details in /etc/hostname.if /etc/hosts /etc/inet/ipnodes /etc/inet/netmasks /etc/defaultrouter yet on the startup i get a message "failed t

  • Smart View 11.1.2.1 - Single Sign On Error

    Hello experts, we are using EPM 11.1.2 (Essbase Standalone mode) with Smart View 11.1.2.1. We have to authenticate several times and we get the following error: "Single sign on external authentication is disabled. Do you want to connect with user nam

  • Mail rejects password and inbox is blank

    Dear All, I hope someone can help! Earlier today my Mail was working fine: then it suddenly demanded my password. It rejects what I believe to be my password, and has emptied (seemingly) my Inbox. I can still gain access to it all through Mobile Me,