Bind Variable NOT working in APEX 4.0 within charts SQL

All,
I had a chart working fine in 3.2 which had a bind variable like :P11_EMP_NAME, when I created the same chart in 4.0 using the same query it did not work, until I changed the variable to v('P11_EMP_NAME'). Does anyone have experienced the same behaviour?
Thanks
Venkat

Hi Deb,
Both of your queries are using multi-series syntax i.e. returning more than one series of data, therefore your generated chart is actually generating 6 series rather than just the two that you're aiming for. You could try changing your queries to ensure they each generate a single series of information, which would then result in the extra Y-axis being applied to your "Series 2". Here's an example of what I mean:
Series 1:
select null link, label, value from (
select 'test' label, 1 value from dual
union all
select 'test2' label, 2 value from dual
union all
select 'test3' label, 3 value from dual
)Series 2:
select null link, label, value from (
select 'test' label, 100 value from dual
union all
select 'test2' label, 200 value from dual
union all
select 'test3' label, 300 value from dual
)I hope this helps.
Regards,
Hilary

Similar Messages

  • Interactive Report Bind variable not working ?

    Hello,
    i am new to APEX and trying to find how to use APEX Interactive Reports them with bind variables. So, i have created one with the following query:
    SELECT i1.if_bic_code, b.bicname, count(*) cnt
    FROM IF_DATA i1, bic b
    WHERE i1.if_bic_code = b.biccode(+)
    AND i1.insert_date BETWEEN :P40_X1 AND :P40_X2
    GROUP BY i1.if_bic_code, b.bicname
    The Report is supposed to show a count of submissions per bic_code (=bicname) from the table IF_DATA for the specified time period.
    These 2 bind variables are actually 2 Items in the same region, using a Date Picker for them. They have no initial values. So, the report initially displays no records. After either using the Date Picker or manually entering values in these 2 Items, and pressing Go button still displays no rows. Am i missing something here? It seems that either the query is not submitted again to database, or the bind variables are not taken the values entered to them.
    TIA

    I tried with the date mask you proposed with no success though. It seems that it does not take into consideration the values of those items (variables) and i am wondering whether i have missed any step in this. The items are also of Date type with those settings for them under Source Group:
    Source Used
    Always, replacing any existing value in session state Only when current value in session state is null
    Source Type
    Static Assignment (value equals source attribute)
    My aim is to filter the rows in the where statement through these variables(items), so this way letting the user specify the range and also display the report with the grouped values. The date field (insert_date) is not part of the Select part of the sql statement.
    Also if i eliminate the date part of the where clause of the sql statement, the report displays correctly, but of course with the full date range, which is not what i want.

  • Touch Panel Shared variable binding does not work.

    Hi,
    Is there any reason why shared variable binding is not working under Touch Panel Target?
    Is there any plan for implementing or there is some trick I should know?
    Andras

    RebeccaFo wrote:
    Hello Andras,
    which version of LabVIEW are you using? As yu can see in:
    http://digital.ni.com/public.nsf/websearch/04AAA6903A9456F08625715A0026BC57?OpenDocument
    it should work. So what for problems do you have?
    Thanks,
    Just FYI, the KnowledgeBase article linked above has been revised and moved to a new location.  See the new KnowledgeBase 58JFBGD2: Are Shared Variables Available For LabVIEW Mobile Module (Formerly PDA Modul...

  • Select count(*) not working in Apex

    Hello,
    The following sql works in both SQL*Plus and Toad but not in apex.  The variable seems always to be 0 no matter what data I have on the table.
    Basically I try to flip the status from "Inactive" to "Active" only when there is no "Inactive" status left on the table.  Say there are 2 inactive statuses.
    If I delete one inactive status, the overall status should still be "Inactive".  However, with this code, it flips to "Active" status regardless. 
    I tried manually assign the variable to 1 and the status was not flipped.  Therefore, it sounds to me that the count(*) is not working in APEX.
    Does anyone experience this before? 
    Thanks in advance,
    Ning
    ===================================
    DECLARE
    v_status_count NUMBER;
    BEGIN
    UPDATE LGR_APP_STATUSES
    SET DELETED = 'Y'
    WHERE LGR_APP_STATUS_ID = :P42_LGR_APP_STATUS_ID;
    commit;
    select count(LGR_STATUS_ID) into v_status_count from LGR_APP_STATUSES
    where DELETED = 'N'
    and LGR_APPLICATION_ID = :p42_application_id
    and LGR_STATUS_ID in (3,8);
    IF (v_status_count = 0) THEN
    update lgr_applications
      set lgr_application_status = 'ACTIVE'
      where LGR_APPLICATION_ID = :P42_LGR_APPLICATION_ID;
    commit;
    END IF;
    END;

    Hi,
    In query you have used p42_application_id.
    Other statements use P42_LGR_APP_STATUS_ID
    Do you have that item? What is session state for that?
    Regards,
    Jari

  • Java.sql.BatchUpdateException: ORA-01027: bind variables not allowed for da

    Hi guys, I m facing a problem while executing below query .Query is working fine in toad i don't know what is the issue with the code
    <code>
    String url3 = "CREATE OR REPLACE VIEW Table2(PERIOD, YEARS, COST_CENTRE, S_DIR_PERM, S_DIR_CONT, S_INDIR_PERM, S_INDIR_CONT, O_DIR_PERM, O_DIR_CONT, O_INDIR_PERM, O_INDIR_CONT)AS select period, year, cost_center, sum(s_dir_perm), sum(s_dir_cont), sum(s_indir_perm), sum(s_indir_cont), sum(o_dir_perm), sum(o_dir_cont), sum(o_indir_perm), sum(o_indir_cont) from ( select b.period, b.year, a.cost_center, sum(a.perm_dir_hc) as s_dir_perm, sum(a.contract_dir_hc) as s_dir_cont, sum(a.perm_indir_hc) as s_indir_perm, sum(a.contract_indir_hc) as s_indir_cont, 0 as o_dir_perm, 0 as o_dir_cont, 0 as o_indir_perm, 0 as o_indir_cont from ZVHR_ACT_HC_ASOF_FISPRD a, pertable b where to_char(as_of_date, 'mm/dd/yyyy') = b.ENDPERIOD and shift not in ('G','N','O2','O7') and b.endperiod = ? group by b.period, b.year, a.cost_center union select b.period, b.year, a.cost_center, 0 as s_dir_perm, 0 as s_dir_cont, 0 as s_indir_perm, 0 as s_indir_cont, sum(a.perm_dir_hc) as o_dir_perm, sum(a.contract_dir_hc) as o_dir_cont, sum(a.perm_indir_hc) as o_indir_perm, sum(a.contract_indir_hc) as o_indir_cont from ZVHR_ACT_HC_ASOF_FISPRD a, pertable b where to_char(as_of_date, 'mm/dd/yyyy') = b.ENDPERIOD and shift in ('G','N','O2','O7') and b.endperiod = ? group by b.period, b.year, a.cost_center) group by period, year, cost_center";
    PreparedStatement statement3 = connection.prepareStatement(url3);
    statement3.setString(1, "12/10/2008");
    statement3.setString(2, "12/10/2008");
    statement3.addBatch();
    statement3.executeBatch();
    </code>
    i m getting the following error
    java.sql.BatchUpdateException: ORA-01027: bind variables not allowed for data definition operations
    can any1 help me with this.

    Can you explain what you are trying to do from a business perspective?
    If you are creating a view, it doesn't make sense to pass bind variables to that DDL statement. The view definition itself is going to have to end up with hard coded date values there. So what possible benefit is there to using bind variables?
    As an aside, if you are using bind variables and you have DATE columns, you really want to pass in the proper data type (i.e. setDate or setTimestamp rather than setString). Otherwise, Oracle has to do implicit string to date conversion, which depends on the session's NLS settings, which is likely to be different on different client machines and lead to all sorts of odd errors and behaviors down the line.
    Are you trying to build a view that takes parameters? If so, there are a few options for that sort of thing.
    Justin

  • Oracle dbms.set_role does not work in APEX application

    Hi, in our j2ee applications, we use secure application role. Basically, the data source use the app user schema to connect to the database. the app user only has create session privileges. the database logon trigger will copy a set of attribute to the local secure context. (ip address, session user, client id, application name). The applications explicitly invoke the stored procedure sec_mgr.set_role before any DMLs are executed.
    the sec_mgr.set_role will check the local context attribute , authorize the ip, application name, and set an appreciated role to this session based on session user.
    we want to apply the same framework to the APEX application. First, we change the paring schema to the app schema which only has create session privilege. then we put the plsql code in which sec_mgr.set_role is called in the application builder --> shared components ---> edit security attribute ---> Virtual Private Database (VPD).
    however, we got the error ORA-06565: cannot execute SET ROLE from within stored procedure
    the sec_mgr.set_role is defined as invoker's right(AUTHID CURRENT_USER)
    do i missing something in APEX to get it work?
    Thanks

    Please explain it does not work in APEX? Is the application updating tables that have a trigger? APEX does NOT override trigger actions. Is it possible the values your trigger is looking for are NOT available in your APEX application? Can you post the trigger code here for review?
    Thank you,
    Tony Miller
    Webster, TX
    What if you really were stalking a paranoid schizophrenic... Would they know?
    If this question is answered, please mark the thread as closed and assign points where earned..

  • (Substitution Variables) not working in "SQL Developer" Environment !!!!!!!

    this photo illustrate how that (Substitution Variables) not working in "SQL Developer" Environment :-
    http://www.imagehosting.com/show.php/1555180_ddddd.PNG.html
    any solve for this problem ?????!!!!!!!!!!

    There is a dedicated forum for SQL Developer related questions
    SQL Developer
    I should admit however, that query you have provided ( with substitution variables) works like a charme in my environment (SQL Developer 1.1.0.23 build 23.64)
    Best regards
    Maxim

  • Authentication function not working in APEX but works in pl/sql

    Greetings, Jim here.
    I have written a very simple authentication funtion which uses the dbms_ldap package to authenticate using the userid and password from the login page.
    I've tested this function thru pl/sql and it returns true and false accordingly.
    I've created a custom authentication schema and in the authentication function I have return myfunction;
    The problem is, when called thru APEX, it appears to always return true and lets the login proceed, even if the password is correct. I know its using the function due to the fact that if I enter a bogus function as the authentication function, APEX spits up a message saying so.
    So, I know the function works, but I don't know why it does not work with APEX. Posting function below.
    CREATE OR REPLACE FUNCTION ODBS.CUSTAPEXLOGIN (p_username IN VARCHAR2,p_password IN VARCHAR2)
    RETURN BOOLEAN AS
    retval PLS_INTEGER;
    emp_session DBMS_LDAP.session;
    ldap_host VARCHAR2(256);
    ldap_port VARCHAR2(256);
    ldap_user VARCHAR2(256);
    ldap_passwd VARCHAR2(256);
    ldap_base VARCHAR2(256);
    BEGIN
    ldap_host := 'oraldap';
    ldap_port := '389';
    ldap_user := p_username;
    ldap_passwd := p_password;
    ldap_base := 'cn=users,dc=company,dc=com';
    emp_session := DBMS_LDAP.init(ldap_host,ldap_port);
    retval := DBMS_LDAP.simple_bind_s(emp_session,('cn=' || ldap_user || ',' || ldap_base),ldap_passwd);
    if retval = 0 then
    return true;
    else
    return false;
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    begin
    if sqlcode = -31202 then
    return false;
    end if;
    end;
    END;
    /

    Hi Jim,
    Can you clarify this -
    The problem is, when called thru APEX, it appears to always return true and lets the login >proceed, even if the password is correctThat implies you're saying your authentication function ALWAYS returns true? Is that correct? Also 'even if the password is correct' doesn't read correctly to me, did you mean 'even if the password is incorrect'?
    You then say -
    now the function works, but I don't know why it does not work with APEX.So by 'does not work' you mean in APEX it is always returning true therefore allowing you to login regardless of the username/password you use? Is that correct?

  • Payload variables not working

    Hi all,
    I've been trying to use Profile Manager to specify user e-mail accounts on Mac devices (eg, MacBooks) but I've been encountering a couple of problems. I've tried searching around and didn't find any answers.
    First of all I'm running the latest Mountain Lion Sever. All clients have up-to-date Mountain Lion too.
    Problem 1: Payload variables not working
    I'd like to automatically setup Gmails on the MacBooks. Now the users' email addresses are already set to their gmail accounts. So all I have to be able to do is use the %email% payload variable as the username when I go set up the (IMAP) mail accounts in the Profile Manager. However, when I download the profile to the device, it does not convert the payload variable; ie, it tries to log into gmail with the username '%email%'. Other payload variables do not work either.
    Oddly enough, the payload variables work as they should with iOS devices...
    Problem 2: Profiles stuck on 'Sending'
    After enrolling the devices, it seems a hit and miss whether the MacBook downloads the correct profiles from the server... Is there a way to force on the MacBook to update/refresh its profiles? Also, when I update profiles within Profile Manager, the changes are pushed to iOS devices fine but not to MacBooks. Those tasks are all stuck on Sending... Logging in, restarting etc. sometimes helps but not always... Is there a reason why?
    Thanks in advance.
    P.S. Sorry I posted in the wrong forum first...

    Same problem here. Some profiles are being sent, some are stuck on the server. I have no idea why this difference.
    Any luck solving the issue?

  • Payload variables not working & Profiles stuck on 'Sending'

    Hi all,
    I've been trying to use Profile Manager to specify user e-mail accounts on Mac devices (eg, MacBooks) but I've been encountering a couple of problems. I've tried searching around and didn't find any answers.
    First of all I'm running the latest Mountain Lion Sever. All clients have up-to-date Mountain Lion too.
    Problem 1: Payload variables not working
    I'd like to automatically setup Gmails on the MacBooks. Now the users' email addresses are already set to their gmail accounts. So all I have to be able to do is use the %email% payload variable as the username when I go set up the (IMAP) mail accounts in the Profile Manager. However, when I download the profile to the device, it does not convert the payload variable; ie, it tries to log into gmail with the username '%email%'. Other payload variables do not work either.
    Oddly enough, the payload variables work as they should with iOS devices...
    Problem 2: Profiles stuck on 'Sending'
    After enrolling the devices, it seems a hit and miss whether the MacBook downloads the correct profiles from the server... Is there a way to force on the MacBook to update/refresh its profiles? Also, when I update profiles within Profile Manager, the changes are pushed to iOS devices fine but not to MacBooks. Those tasks are all stuck on Sending... Logging in, restarting etc. sometimes helps but not always... Is there a reason why?
    Thanks in advance.

    Same problem here. Some profiles are being sent, some are stuck on the server. I have no idea why this difference.
    Any luck solving the issue?

  • Bind variable not declared - please help

    Hello,
    I have wrote a PL/SQL script to update some order_id's in a table. I have declared all my variables but get an error -- bind variable not declared. Can anyone tell me what the problem might be?
    DECLARE
             last_ship      DATE ;
             last_order     NUMBER;
             last_cust      NUMBER;
    VARIABLE curr_item      NUMBER;
    VARIABLE curr_order     NUMBER;
             aorder_id      CHAR(6);
             aitem_id       CHAR(2);
             acust_id       NUMBER(6);
             aship_date     DATE;
    CURSOR c1 IS
          SELECT 
                  order_id,
                  item_id,
                  ship_date,
                  cust_id
          FROM
                  test_sales
          ORDER BY
                  1,2,3,4,5;
    BEGIN
          SELECT
                  MAX(order_id)
          INTO
                   curr_order
          FROM
                   sales_order;
    OPEN c1;
         LOOP
             FETCH c1 INTO aorder_id, aitem_id, aship_date, acust_id;
             EXIT WHEN c1%NOTFOUND;
               last_cust      := c1.cust_id;          -- Saves the last values to check if processing same order
               last_order     := c1.aorder_id;        --
               last_ship      := c1.aship_date;       --
               IF c1.aorder_id = last_order AND c1.cust_id = last_cust AND c1.ship_date = last_ship THEN
                  curr_item   := curr_item  +1;
                  UPDATE test_sales SET c1.aorder_id = :curr_order;
                  UPDATE test_sales SET c1.aitem_id  = :curr_item;
               ELSE
                  curr_order := curr_order + 1;
                  curr_item  := 1;
                  UPDATE test_sales SET c1.aorder_id =  :curr_order;
                  UPDATE test_sales SET c1.aitem_id  = :curr_item;
               END IF; 
        END LOOP;
    CLOSE c1;
    END;
    /Cheers
    Mike

    check yours code you are direct accesing cusrsor named directly which is not allowed
      1  DECLARE
      2  vemp  emp.empno%TYPE;
      3  vemp1 emp.empno%TYPE;
      4  CURSOR c1 IS SELECT empno FROM emp;
      5  BEGIN
      6   OPEN c1;
      7    LOOP
      8     FETCH c1 INTO vemp;
      9     EXIT WHEN c1%NOTFOUND;
    10     vemp1:=c1.empno;
    11    END LOOP;
    12   CLOSE c1;
    13* END;
    SQL> /
       vemp1:=c1.empno;
    ERROR at line 10:
    ORA-06550: line 10, column 14:
    PLS-00225: subprogram or cursor 'C1' reference is out of scope
    ORA-06550: line 10, column 4:
    PL/SQL: Statement ignored
    SQL> DECLARE
      2  vemp emp.empno%TYPE;
      3  CURSOR c1 IS SELECT empno FROM emp;
      4  BEGIN
      5   OPEN c1;
      6    LOOP
      7     FETCH c1 INTO vemp;
      8     EXIT WHEN c1%NOTFOUND;
      9    END LOOP;
    10   CLOSE c1;
    11  END;
    12  .
    SQL> /
    PL/SQL procedure successfully completed.Yours code
    OPEN c1;
    LOOP
    FETCH c1 INTO aorder_id, aitem_id, aship_date, acust_id;
    EXIT WHEN c1%NOTFOUND;
    last_cust:= c1.cust_id;
    last_order:= c1.aorder_id;
    END LOOP;
    CLOSE c1;
    END;You sholud move it c1.cust_id within fetch statment or
    bind the cursor name with another local cursor variable
    then fetch into this local bind variable and use cursor
    via this variable
    e.g
    DECLARE
    CUSRSOR c1 IS SELECT cust_id,aorderid
        FROM <TABLE>;
    c2      c1%ROWTYPE;
    OPEN c1;
    LOOP
    FETCH c1 INTO c2;
    aorder_id:=c2.aorderid;
    last_cust:= c1.cust_id;
    last_order:= c1.aorder_id;
    END LOOP;
    CLOSE c1;
    END;Khurram

  • Switch Theme is not working in apex 4.2.Plz  help me out.........

    Hi.......
    Switching from one theme to another theme is not working in apex 4.2..............
    Thanx in advance

    Hi!
    Same problem.
    Upgraded from 4.1 -> 4.2.
    Change theme from slightly modified Green theme (in mine case 101 is number and original was 11, One level Tabs) to Theme 25 Blue Responsive.
    Login page for instance doesn have "Login Region" for instance (not in LOV). And all pages are softly said strange.
    All have DISPLAY problem described on "http://1.bp.blogspot.com/-GzseTk6Lpes/UHvJkg9GulI/AAAAAAAAHRQ/Wt406GGZADQ/s640/Screen+Shot+2012-10-15+at+10.25.29.png", but without many parts that Dmitri describe.
    Rg
    Damir

  • Bind variable not fully enabled

    Hello to everyone.
    I'm debugging a VBA macro with the following code:
    Dim qry_1 As String
    OraDatabase.Parameters.Add "ext_var1", UserForm3.TextBox1.Text, 1
    qry_1 = "begin SELECT max(name) into :clinom FROM sap_customers WHERE & " cust_number = :ext_var1; end;"
    OraDatabase.Parameters.Add "clinom", 0, ORAPARM_OUTPUT
    While executing the last code line i'm receiving the following message:
    OIP-04122:Bind variable not fully enabled
    Can please anyone tell me what am i doing wrong?
    Thanks in advance.
    Octavio

    ORAPARM_OUTPUT isnt defined in vbscript. You need to either define it, or replace it with the defined value like you did with the other parameter.
    ORAPARM_OUTPUT = 2
    Hope it helps
    Greg

  • Interactive Reports not working with APEX listener

    Hi,
    I have posted this question APEX listener forum couple of weeks ago but very few responses.
    If any one from here can help then it would be great.
    Interactive Reports not working with APEX listener
    Best Regards,
    Baig

    Sorry for late response.
    It was a firewall issue

  • I/o server shared variable not working in deployment system ( error no-1950679034 (0x8BBB0006) (Warning))

    Hello ,
             am using shared variable from opc client in labview when am run a exe file at development system its working fine but when am running it in deployment system its not working am using same configuration file in opc server at development and deployment system error -1950679034 (0x8BBB0006) (Warning)

    First Root cause needs to be identified before any actions.
    I would suggest first check if you can access the shared variable hosted in PC from RT using other ways like using SVE API (Logos and PS protocols, Datasocket etc..)
    Check if antivirus or firewall is playing...
    Check the same experiment with some other PC if you can.
    You can also try creating another Shared Variable in RT and binding the same to the PC and try to access it...
    Since you have did all the reinstallations already
    Best Regards,
    Vijay.

Maybe you are looking for