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.

Similar Messages

  • Interactive Report - search does not work when using custom authentication

    Apex 3.2.x
    I can authenticate fine with my custom authentication and all of my pages work okay except for one page that uses the Interactive Report feature. When I click 'Filter' then enter the column name, operation (contains, =, like, etc.) and the expression, then click the 'Apply' button, the page just re-displays and my filter information is missing?
    If I first login to Apex, select and run my application, the Interactive Report features work just fine. What's missing?

    More information:
    After login into my Apex workspace (development environment), when I display the Interactive Report and click debug I see this debug message:
    "using existing session report settings"
    When I login using my application's custom authentication and click debug I see this debug message:
    "creating session report settings as copy of public saved report"
    Based on this, it appears that my session info in not set correctly when using custom authentication... but I'm not sure what needs to be set.
    Edited by: user9108091 on Oct 22, 2010 6:44 AM

  • 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

  • Interactive report column order not working properly

    Hi All,
    Can anyone help me with this situation:
    Example:
    1)
    First of all I created a interactive report with this simple query
    Select 1 col_A, 2 Col_D from dual
    2)Later I modified the query like this
    Select 1 col_A, 1 col_C, 2 Col_D from dual
    But when I run the report the new column added appear in the end?
    I already tryed to reorganize the column order in the navigator menu, but the issue remains.
    Any ideas?
    Thanks

    Hi,
    Login to APEX builder. Run your page.
    Select columns from report action menu and save default layout.
    Regards,
    Jari

  • Interactive report column search not working

    Hi,
    On Apex 4.01 and discovered that when using the individual column search functionality (clicking on the column label), the search on a column for a userid, the dropdown listing is not showing all userids that are clearly listed in the report. For example, the dropdown only shows up through IDs starting with 's--------' so when I search for an ID with 'vm' it does not show it, yet I can do a sort and go down the rows on the report and find it. Is there a limit to the dropdown list? Or is this a bug?
    Pat

    Hi,
    Login to APEX builder. Run your page.
    Select columns from report action menu and save default layout.
    Regards,
    Jari

  • 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...

  • Value of report bind variable in the add PL/SQL section?

    Hi all,
    I'm passing a page parameter into a report as a bind variable - this works. Now I need this same parameter value in the additional PL/SQL section of the report.
    I have browsed the forums & docs and seems like get_value(<param_name>) is supposed to do it, but I get no value.
    Is there any known reason for this? Maybe the fact that its a page parameter? Or any other suggestions?
    Cheers.
    Anton.

    I have tried everything - to no avail - if anyone has any ideas please help...
    In the meantime I have hacked some sort of solution - not pretty but it works!
    In the additional PL/SQL section I have:
    declare
    l_rid varchar2(20);
    begin
    l_rid:=drca_get_url_param(p_page_url,'rid');
    htp.p('<FONT CLASS="PortletText1"><A target="uedit"
    href="PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1567149528&p_arg_names=_sessionid&p_arg_values=&p_arg_names=SPECIFIC_RISK_ID&p
    _arg_values='||l_rid||'">Add</A></FONT>');
    end;
    where
    - p_page_url is a variable with the page URL that is automatically available, and
    - drca_get_url_param is a function that returns the param value form the URL ("rid" in this case). I'm sure there is such a function somewhere in the portal lib of functions, but I could not find it.

  • 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

  • VS2005 Crystal Report Print Report Button is not working on Windows 7 x64

    Hi There,
    My application is written in VS2005 C# on x86 machine. It runs smoothly on XP pro and Vista x86 machine.
    I deployed the same to windows 7 x64 machine with CRRedist2005_x64.msi and found that the Print Report button is not working.
    So, I re-compiled my application to x64 target platform, and reinstall the application to the same machine. But nothing changed. I have surf for answer over the web but nothing found.
    Please help urgently. Any helps is much appreciated. Thks in advance.
    Edited by: chanpyvivian on Mar 26, 2010 11:14 AM

    I follow your instruction as below:
    1) download the sample app vbnet_win_printtoprinter.zip to dev computer and compile it to .NET 2005.
    - Run from my dev computer
    - Click "Print Report" button
    - Error message display - please see below
        The error was due to the default printer name hard coded in the program was not found. I have edited to my printer name and it can be printed out with no error.
    2) Use a "saved data" report so that you do not have to worry about database logon.
    can't find the "saved data", please elaborate
    3) Then copy the exe to the 64 bit box and try to print using this sample app.
    -do you mean copy the exe to the 64 bit computer for testing ?
    ERROR Message
    CrystalDecisions.CrystalReports.Engine.InvalidArgumentException:
    Invalid printer specified. ---> System.Runtime.InteropServices.COMException (0x80000201):
    Invalid printer specified.
       at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.ModifyPrinterName(String newVal)
       at CrystalDecisions.CrystalReports.Engine.PrintOptions.set_PrinterName(String value)
       at CrystalDecisions.CrystalReports.Engine.PrintOptions.Copy(PrintOptions src)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
       --- End of inner exception stack trace ---
       at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
       at CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_FormatEngine()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)
       at PrintToPrinter.Form1.Button1_Click(Object sender, EventArgs e) in C:\Crystal\CRNET\vbnet_win_printtoprinter\vbnet_win_printtoprinter\Form1.vb:line 91
    OK  
    Edited by: chanpyvivian on Mar 30, 2010 6:18 PM

  • (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

  • 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

  • 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

  • BW hierarchy variable not working in Crystal Report 2008

    Hi,
    I have created BEx 7.0 report which has hierarchy on 0customer object, the report is working fine whith hierarchy variable. I have created Crystal Report by using this query as source. I have followed below link to create grouping to get data through hierarchy variable.
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BWHierarchiesinCrystalReports
    But report does not work for hierarchy variable and report is blank. When I give filter of child node which has actual data then I get report output. For ex.
    Below hierarchy for 0customer
    11396
         - 737007
         - 123456
    When I run report for 11396 then no data display but when I run 737007 child node I get report output but with blank group name.
    Can anyone came accross this issue. Please guide me . Thanks in advance.

    Thanks Ingo for your reply..
    The word filter means, I have hierarchy node variable in the BEx report that has become Parameter in CR. When I give hierarchy node variable value of parent node then there is not data display but for the child node I get the data.
    For ex. In the info cube there is data for 730707 customer but in the customer hierarchy the parent node of 73707 is 11396. I am giving 11396 in the variable pop screen for hierarchy variable. I do not see any data but for 73707 I get data.
    User does not know 73707, he always enter 11396 customer no. and he gets data in BEx query that is source of CR. but crystal report is not showing data for 11396.
    One more point I want to tell here, I am saving CR at my local system not to SAP BW server.
    Hope this clear my issue.
    Harish Swami
    Edited by: hswami27 on Jan 31, 2011 8:17 PM

Maybe you are looking for