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.

Similar Messages

  • How can I assgin a master feild value in combobox bind variable in the detail

    Hi All,
    I'm working on a MD-Form in portal.
    I want to pass a master block value in the dynamic combobox where clause.
    Combo box is in the detail Block. Can anyone please give a solution for this?
    This a very urgent Requirement for me. I really appreciate.
    Thanks
    Murali

    Does this help?
    Dreamweaver Dynamic Master List with link to Detail - YouTube

  • How to use SYSDATE as a default value of a bind variable in a query report?

    Hi,
    I want to use SYSDATE as default value for a bind variable in Query based report.
    I don't see any way to do it, someone helps?
    Thanks a lot.
    Paulo.

    You can aslo use #sysdate directly.
    Hi,
    The way I'm doing in my report is, I have a database function (f_ret_sysdate) with the following code
    create function f_ret_sysdate return varchar2
    begin
    return to_char(sysdate,'mm/dd/yyyy');
    end;
    Now, in the 'Customization Form Display Options' section of the report I'm calling this function as #f_ret_sysdate in the default value field of corresponding bind variable to display SYSDATE with the format.
    Hope this helps!...
    -Krishnamurthy

  • How to pass a value to a bind variable in a query report in oracle apex

    Hi Guys,
    I have requirement to send weekly reports via email to some users. The users should receive their own records in the report. The user details is stored in a table. What I am planning to do is to create a report query in oracle apex to generate the report and then run a function/procedure via a scheduler to email the report to respective users. Now my query is ............. is it possible to pass a value (user name) to the report query to pull records of only that user? I know we can have bind variables in the report query but I have no idea how to pass a value for bind variables from a function/procedure.
    Can anyone help me on this issue or suggest a better approach?
    Thanks,
    San

    You need to use dynamic sql
    But please keep in mind that since you're using Oracle you may be better off posting this in some Oracle forums
    This forum is specifically for SQL Server
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to use bind variables in the following query

    CREATE OR REPLACE PROCEDURE MMDB.test IS
    sel_qtn VARCHAR2 (10);
    CURSOR PT_QUANTITY IS select * from mmdb.product_tree WHERE QUANTITY_CHECK ='E'
    AND run_id = 100
    a PT_QUANTITY%ROWTYPE;
    BEGIN
    FOR i IN PT_QUANTITY
    loop
    sel_qtn := i.quanttity-1;
    While sel_qtn>=1
    loop
    insert into mmdb.product_tree (BILLING_ACCOUNT_NO ,S_CODE) values (i.BILLING_ACCOUNT_NO ,i.S_CODE||'E');
    sel_qtn :=sel_qtn -1;
    End loop;
    commit;
    end;

    Don't duplicate threads: How to use bind variables in the following query

  • Bind variables improve the performence of  query??

    Hi,
    Bind variables improve the performence of program or SQL Query.
    Select empno,ename,sal from emp where empno=:eno;
    select sal into :vno from emp;
    According to these queries i am asking performence of bind variables to learn more from you.
    Regards,
    Venkat.
    Edited by: Venkata2 on Sep 16, 2008 6:40 PM

    Karthick_Arp wrote:
    any variable inside a stored procedure is a bind variable.
    using bind variables can help you avoid hard parse. which leads to performance improvement.
    Well, you mentioned pros and I will mention cons. Since bind variable value is not known until execution time optimizer can not select best plan. So Oracle introduced bind variable peeking where plan is deferred until first execution. With bind variable peeking optimizer costructs plan using bind variable values at the first execution. However, if first execution has "not typical" bind variable values we end up with sub-optimal plan.
    SY.
    P.S. Please do not consider my reply as "we should not use bind variables".

  • Make List of Values for Required Bind Variables

    In the SQL query for my View Object, I have a bind variable, which I set to "required". In the search form resulting from a View Criteria, a textbox shows up asking the user for the value of that variable. Is there a way to make it a List of Values instead?

    Hi WV,
    Create a transient attribute in your VO that contains the LOV and then set the value of your bind variable to point to this new transient attribute. Also here is another approach
    https://blogs.oracle.com/shay/entry/adf_query_with_parameters_and
    Let us know how it goes.
    -Juan Camilo

  • Where is the value of report repository stored in the database?

    Hi all,
    One of our developers is trying to write a code that would send the output report (pdf)of a process through mail, typical work flow stuff.But the problem is that we are not supposed to hard code the value of report repositiry from where the report has to be picked.can anybody suggest a table in the database from where the value of report repository can be queried.
    we tried using
    select reportrepositorypt from pswebprofile.
    but this doesnt return the correct path. we went to PIA->peopletools->webprofile ->webprofie configuration
    here we updated the value in report repository field and saved it and queried again.
    But this didnt solve our problem.
    Its showing the previous value which is different from the actual report repository path.
    all the servers are in solaris box.
    please suggets.
    Thanks!

    Right now, I am trying to send a PDF (XML Publisher report) as an email to our vendors (it is their ACH Advice).
    What I have done so far is: Created an App Engine, one step to populate a state record with run control information and the second step that runs XML Publisher and creates PDF report(s) which are published to the Report Repository and saved to a file on our network. Now I think I just need to create a third step to recall the PDF(s) and send the PDF(s) out as emails to our vendors.
    I have found that the PDF information from Report Repository is stored in the Database in the CDM_LIST_VW record (this is a view and the main underlying table is CDM_LIST, but this contains what I need for now, so I'm going to try using it first). The Report ID is stored in the CONTENTID field and the Report Description (description shown on the Report Repository -- which in our case contains the email address) is stored in the CONTENT_DESCR field. So I am going to try over the next week to write the logic to query the CDM_LIST_VW for the data needed for the email address and the ReportID to go and grab the file....The hardest part is finding the actual file but I am hoping that I can also find a URL on that table. I'd pull the file from the network, but XML Publisher writes them out into numbered folders where all the PDFs are named the XML Report Defn - thus same name). I have not tried any of this yet, but am hoping I'm on the right path.
    I hope this helped answer your question.
    Good Luck!
    Jennifer

  • DB2Exception - The value of a host variable in the EXECUTE or OPEN statemen

    I want to store a XML file into database.
    To undersdande my problem, please see the code below:
    java.sql.Connection conn = null ;
    PreparedStatement ps;
    // Here I'm calling a function to get Database Connection.
    String sXmlFile = "" ; // This variable stores a XML file as String
    String sSQL = "INSERT INTO Crs_x_xml (XML_TRAN_ID,XML_MESSAGE,SUSPENDED_FLAG ) VALUES(?,?,?)";
    try {
         ps = conn.prepareStatement(sSQL);
         ps.setLong(1,1);
         ps.setBytes(2, sXmlFile.getBytes());
         ps.setString(3,"A");
         ps.executeUpdate();
         conn.close();
    } catch (Exception e) {
         e.printStackTrace();
    The Problem:
    The table Crs_x_xml that I used has three columns, the first is a int, the second is a BLOB and third is Char(1) and its in DB2 running on AIX.
    Sometimes it execute very well. But sometimes gives following error :=
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/AIX64] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001
    I dont know whats going wrong. Plz help....
    ~Abhijeet

    Hi,
    I am using a CMP query in websphere, in which i am trying to execute a select query.
    The query is as follows:
    SELECT OBJECT(o) FROM HrTmmbrAct o WHERE o.tmmbrActC IN ( 1,2,3 ) AND o.effD BETWEEN '2000-02-11' AND '2008-02-22'
    The tmmbrActC is defined as a string in the Websphere CMP fields. I am not sure now to pass the value to it. Do we need to pass it as objects. pls help.
    Thanks
    - Giri

  • HELP: Bind Variable does't work in SQL statement

    I am trying to connect a text item bind variable into the where
    clause of an SQL statement. Specifically into an INSERT
    statement and SELECT statement. It gives me an message box
    error, saying it is unable to insert. There is no Oracle error
    number associated with it. Is this a bug? Has this happened to
    anyone else. PLEASE HELP! URGENT!
    null

    I assume this is a forms problem. You need to check out the
    dbms_error_code and dbms_error_text to get your oracle error.
    You can trap and report these types of errors using an on-error
    trigger. Also, if you are using the default menu then check
    out help -> display error immediately after the form reports
    unable to insert ...... This should give you enough information
    to solve your problem, or at least point you in the right
    direction.
    Daniel Jensen (guest) wrote:
    : I am trying to connect a text item bind variable into the where
    : clause of an SQL statement. Specifically into an INSERT
    : statement and SELECT statement. It gives me an message box
    : error, saying it is unable to insert. There is no Oracle error
    : number associated with it. Is this a bug? Has this happened to
    : anyone else. PLEASE HELP! URGENT!
    null

  • I can't find 'Add all tracks' in the add to playlist section in iOS 7

    what happend 2 adds l tracks' in the add to playlist section in iOS 7

    yes I agree, I was disappointed when this feautre was missing in iOS 7. But iOS 7.1 has place the "Add All Songs" option to creating playlists

  • How to set a bind variable across the pages in a report

    I want to create a portal report where data will come from a table for a date range for a week.
    For e.g select event_date,last_name, event_name
    from RESOURCES
    where event_date between trunc(to_date(:curr_date,'DD-MON-RRRR'))
    and trunc(to_date(:curr_date,'DD-MON-RRRR')+ 7)
    The :curr_date is defined as a bind variable whose default value is sysdate.
    Now, when we run the report for the first time, it takes the :curr_date as
    sysdate and prints the report.
    I have two buttons in the report output like "previous week" and "next week".
    If someone presses previous week, the same report should run with curr_date
    as sysdate-7 and if someone presses next week, the report should run with
    curr_date as sysdate +7 and also the :curr_date sets to sysdate - 7 or sysdate + 7
    depending on the button pressed.
    Problem:
    How do I set the value of curr_date if someone presses any of
    previous week/next week.
    null

    Best to state your JDev version, and technology stack (eg. ADF BC) when posting.
    I can think of 2 approaches.
    1) Create a parent VO based on SELECT :bindVar FROM dual, then create links between your other VOs and the parent
    2) Create a AM client interface method that programatically sets the bind variable in each VO.
    Can you specify your use case? This one tends to come up when discussing effective from/to dated queries.
    CM.

  • Hide Bind Variable in the Customization form of a Report

    I have a report where I set the bind variable default using a API call. I do not want the user to change the value. How do I keep the text box for the bind variable value from showing????
    Thanks,
    Linda

    Hi,
    It is not possible to hide a bind variable from appearing in the customization form. You can run the report directly with the
    parameters and not take the user to the customization screen.
    Say you have a bind variable dept in a report new_report then the url the user should use will be like this
    http://mydomain/pls/portal30/portal30.new_report.show?p_arg_names=dept&p_arg_values=10
    Thanks,
    Sharmila

  • How to compare the value of a binding variable with a string "HOLD" ......?

    Hi All,
    I have two tables - TABLE1 & TABLE2 and both the tables are having STATUS column. The requirement is like if the STATUS column of TABLE1 is updated as "HOLD" then the same value has to be updated to the STATUS column of TABLE2.
    create or replace trigger "TEST_TRG"
    BEFORE
    update of "STATUS" on "TABLE1"
    for each row
    begin
    if(:new.STATUS ='HOLD')then
    insert into TABLE2 (STATUS)
    value (:new.STATUS);
    end if;
    end;
    COMPILATION ERROR:
    Compilation failed, line 3 (02:40:14) The line numbers associated with compilation errors are relative to the first BEGIN statement. This only affects the compilation of database triggers.
    PLS-00103: Encountered the symbol "{" when expecting one of the following: ( begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge The symbol "{" was ignored. Compilation failed, line 7 (02:40:14) The line numbers associated with compilation errors are relative to the first BEGIN statement. This only affects the compilation of database triggers.
    PLS-00103: Encountered the symbol "}" when expecting one of the following: ( begin case declare else elsif end exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge The symbol "}" was ignored.
    I am getting the compilation errors as above when the trigger is compiled. Can anyone please help me to correct it.
    Thanks and Regards,
    Suhas

    CREATE OR REPLACE TRIGGER "TEST_TRG"
       BEFORE UPDATE OF "STATUS"
       ON "TABLE1"
       FOR EACH ROW
    BEGIN
       IF (:NEW.status = 'HOLD')
       THEN
          INSERT INTO table2
                      (status
               VALUES (:NEW.status
       END IF;
    END;You should learn how to write PL/SQL code.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Report : Bind Variable in "CODE" report

    Hi guys,
    I was wondering if any of you could help me with this report?
    Imagine the following scenario:
    I have this table:
    CREATE TABLE my_report_table
    my_id NUMBER(15),
    my_var VARCHAR2(100),
    my_name VARCHAR2(100),
    my_other_stuff VARCHAR2(100)
    INSERT INTO my_report_table(my_id, my_var, my_name)
    VALUES(1, 'some_parameter', 'my name');And I have this "code" as report
    DECLARE
      my_parameter VARCHAR2(100) := 'some_parameter';
      TYPE T_my_report_table IS TABLE OF my_report_table%ROWTYPE;
      res T_my_report_table := T_my_report_table();
    BEGIN
      SELECT *
        BULK COLLECT INTO res
        FROM my_report_table
       WHERE my_var = my_parameter;
       IF res.COUNT > 0 THEN
         FOR i IN res.FIRST .. res.LAST LOOP
           DBMS_OUTPUT.put_line('Result : ' || res(i).my_id || ', ' || res(i).my_var || ', '  || res(i).my_name);
         END LOOP;
       END IF;
    END;
    /By code report, I mean a report and I select the "Code" style in the combobox (Table, Chart, Gauge...). What I would like to do is that instead of having the variable "my_parameter", I have it as a bind. But when I edit the report and add a Binds like this (and remove the variable definition in the code):
    Name   :  :MY_PARAMETER
    Prompt :  :MY_PARAMETER
    Default :  DEF
    Tooltip: <none>When I open the report, it only shows a gray panel. No exception, noting... Can anyone help me to bind parameters with a CODE report?
    Also, I have another question, is it possible to DUMP the select of a SELECT in a report without having to SELECT it into a CURSOR and parse it myself?
    THanks,

    Hi,
    You cannot have bind variables in additional plsql code.
    Thanks,
    Sharmila

Maybe you are looking for