Calling a form based on a procedure from a report

I have a report and want the user to link to a form based on a stored procedure passing params from the report record. That I can do using the link option. But to complicate matters I have more than one form based on a procedure and depending on values in the reports data depends on which form will be called (passing values to the form (all based on stored procedures).
How can I do this ?
Any advice would be really appreciated.

If you want to display other HTML page after successful submission, you need to use
either go or call method.
I created a form on SCOTT.EMP and a report on SCOTT.EMP and the report accept a parameter for
the deptno. Here is my on successfull submission code:
declare
l_dept number;
l_url varchar2(2000);
begin
l_dept := p_session.get_value_as_number('DEFAULT', 'A_DEPTNO', 1);
l_url := 'scott.rpt_mask_1.show?p_arg_names=emp.deptno&p_arg_values='| |l_dept;
go(l_url);
end;
null

Similar Messages

  • How to display errror message in a form based on a procedure

    I created a single-level form based on a procedure. In this form, I would like to generate an error message inside of a custom button, so I used the following inside of that button:
    p_session.set_value (p_block_name => 'DEFAULT',
    p_attribute_name => '_STATUS',
    p_value => 'Please choose a valid chair from the popup icon.');
    Unfortunately, it returned a WWV-0000 error code without any error messages. I use that code in another single-level form based on a table/view, and it works fine, but I need a single-level form based on a procedure. Therefore, I want to know if that code snippet can be used in a form based on a procedure or not? Do we have any other ways to display error messages in pl/sql besides p_session.set_value(...);
    Thanks in advance.

    Somebody please response.

  • Return values for a Form based on a procedure

    Hi,
    I am fairly new to Portal Applications.
    I have a form based on a procedure.
    The procedure has an IN OUT parameter and what happens at the moment is that once the submit button is pressed the IN OUT parameter is displayed on a new page.
    My question is...
    How do I display the returned value in a field on the form?
    Please help
    Thanks

    Hi,
    This is how it works right now. It is not possible to show it in the same form.
    Thanks,
    Sharmila

  • Help: FORMS based on stored procedures

    I am working on a FORM based on stored procedures. This particular FORM performs a query and generates say,
    customer_name, item1_sale, item2_sale and sum of the item1_sale and item2_sale.
    I'd like to know if there are ways that the query procedure returns to reference cursors that one with multiple records and one with the sums? The FORM will then be able to show rows of sales and the bottom row with show the sale totals.
    Thank you in advance.
    Jimmy

    Francois,
    I just tried another way of getting the totals. I manually created a data block and add two items tot_1 and tot_2. I the item properties: I set calculation:
    calculation Mode: Summary
    Summary Function: Sum
    Sumary Block: BLOCK_A
    Summary Item: item1_sale etc.,
    I got a compile error:
    FRM-30377: Summary item must reside in single-record block or in same block as summarized item.
    Where do I catch this error?
    Thanks.
    Jimmy

  • Would like to create a file upload facility in a form based on stored procedure

    Hello,
    I would like to create a 'File Upload' in a 'form based on stored procedure'. The version of portal that I am running is 3.0.7.6.2. In this version, only 'form based on table' has the ability to upload files. Or is it that I am missing something?
    Please let me know if this is possible in higher versions of portal.
    Thank you for your help.
    Jayasree

    I have kin od fdone this by using the additem fucntion, if you look at the HTML of the add file page, you can see the parameter that are required for the form.

  • Help: FRM-40505 for a FORM based on stored procedures

    Hi,
    I am working on a FORM based on stored procedures. When it performs a query, it actually returns record, but still comes with the message FRM-40505: ORACLE error: unable to perform query. Any recommendations on the possible coding area to check?
    Thank you in advance.
    Jimmy

    Jimmy,
    To base a block on a stored procedure is not a simple task because it depends on the .....
    .... stored procedure !
    If you do not provide much information (like the famous stored procedure), we could not do anything for you.
    As much information you provide, as much chance we have to understand the problem.
    Francois

  • RAISING EXCEPTION AND SHOWING TO USERS IN FORM BASED ON STORED PROCEDURE

    I have a form based on stored procedure.
    I want to handle exceptions in the stored procedure and show it to users.
    Here is what i want to do.
    I have a sku# field in the form and i want to validate it(against the database
    table) in the procedure before inserting into the database.
    I want to give a message to users when the validation fails.
    How is this possible with the forms based on stored procedure?
    Can i use javascript to do the same?
    Thanks in Advance

    I have a form based on stored procedure.
    I want to handle exceptions in the stored procedure and show it to users.
    Here is what i want to do.
    I have a sku# field in the form and i want to validate it(against the database
    table) in the procedure before inserting into the database.
    I want to give a message to users when the validation fails.
    How is this possible with the forms based on stored procedure?
    Can i use javascript to do the same?
    Thanks in Advance

  • New Window for Form called from a form based on a procedure

    Hi
    I have a form that is based on a procedure that asks for an employee number. The number is then passed to the procedure. The procedure then calls the next form passing in the employee number.
    This works however I would like the form called from the procedure to open in a new window while still being able to pass in the employee number as a parameter.
    Is there a way to do this? I have tried looking at wwa_app_module.new_instance & wwv_media.show_newwindow but I these only take the moduleid, I can't see how to pass in the employee number at the same time.
    Any help would be appreciated.
    Thanks
    Belinda

    Hi,
    You can pass parameters like this
    wwv_redirect.url('SJAYARAM_9042F.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1060253649&p_arg_names=deptno&p_arg_values=10&p_arg_names=_deptno_cond&p_arg_values=%3d');
    In this example the parameter deptno is passed with a value 10 and conditional operator '='
    Hope that helps.
    Thanks,
    Sharmila

  • How to autopopulate fields in a portal form based on database procedure?

    Dear gurus, I am a newbie to the portal world and i have a rather unique problem. I have searched online but still cant find a solution to my problem. I have a portal form (AS version 10.1.4) based on a db procedure that accepts only one parameter. The form has about 12 fields, two of which are combo boxes. Because of the relationship b/n combo box 1 and combo box 2 and the rest of the form fields, the user has to start out by selecting a value in combo box 1. This auto populates combo box 2 (based on the previous selection). However, when the user selects a value from the populated combo box 2, this is supposed to trigger an action to query the database and retrieve values for the remainder of the form fields and populate them accordingly.
    I tried to use p_session.get and set values but discovered that one cannot do this with form fields that are based on a procedure. I could write javascript to call a database procedure but i am not sure how to pass the return values from the database back to the javascript routine and then populate the remaining fields accordingly.
    HELP ME PLEASE!!!
    Thanks

    Hi Venkat, create a section (section control) for each set of columns you want to hide/reveal. Put your columns in that section. Then set a rule on the dropdown so that if dropdown = "this" then show "this" section.
    cameron rautmann

  • Problem passing OUT parameters form based on stored procedure to another form?

    Hello,
    I am unable to pass parameters of type OUT from a form based on a stored procedure to another form.
    However, I am able to pass parameters of the type IN to the other form.
    This is the code that I have under the heading
    On successful submission of a form, execute this PL/SQL block or PL/SQL procedure:
    declare
    v_partno varchar2(100);
    v_partdesc varchar2(200);
    blk varchar2(10):='DEFAULT';
    v_names varchar2(1000);
    v_values varchar2(1000);
    begin
    v_partno:=p_session.get_value_as_varchar2
    (p_block_name=>blk,p_attribute_name=>'A_PART_NO');
    v_partdesc:=p_session.get_value_as_varchar2
    (p_block_name=>blk,p_attribute_name=>'A_PART_DESC');
    v_names := '_moduleid:_show_header:pnumber:pdescription';
    v_values := '1325575336:YES:' || LTRIM(TO_CHAR(v_partno)) || ':' || LTRIM(TO_CHAR(v_partdesc)) ;
    PORTAL.wwa_app_module.link (
    p_arg_names => PORTAL.wwv_standard_util.string_to_table2(v_names),
    p_arg_values => PORTAL.wwv_standard_util.string_to_table2(v_values));
    end
    Info:
    1. Passing PART_NO (IN parameter) and PART_DESC (OUT paramter) to another form.
    2. After hitting the submit button, the second form comes up, but with only the PART_NO(type IN) field completed. The PART_DESC(type OUT) field did not get passed to the second form.
    3. The corresponding fields in the second form are pnumber & pdescription.
    4. FYI - I can see all the OUT parameters correctly, if I don't try to pass control to the second form.
    5. Portal 9.0.2 ( the version that ships with IAS 9.0.2)
    Any help would be greatly appreciated. I have been stuck here for a while now!
    Dev

    Re: Error
    Passing OUT parameter to another form.
    You cannot retrieve the value of the OUT parameter from the session object because after executing your procedure,
    the value passed out using the OUT parameter is not loaded in the session object.
    But you can still achieve what you are trying in the following way.
    Let's assume that your procedure has the following str :-
    procedure proc1 (p_in in varchar2,
    p_out out varchar2)
    is
    begin
    /* your processing statements
    end;
    Say, the name of the field, in the 2nd form, where you need to pass the out parameter value is VALUE_FROM_OUT.
    1> Edit the form on procedure proc1
    2> Select the submit button in the left frame and for the PL/SQL button handler choose Submit action.
    3> In the adjacent textarea, comment out the doSubmit statement and use code given below :-
    declare
    l_p_in varchar2(32767);
    l_p_out varchar2(32767);
    l_url varchar2(2000);
    begin
    l_p_in := p_session.get_value_as_varchar2(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_P_IN');
    execute immediate
    'begin <schema>.proc1(:b_in,:b_out); end;'
    using in l_p_in, out l_p_out;
    l_url := 'http://<host>:<port>/pls/<dad>/<portal-schema>.wwa_app_module.link?p_arg_name=_moduleid&p_arg_values=<module_id>&p_arg_names=VALUE_FROM_OUT&p_arg_values='||
    <portal-schema>.wwv_standard_util.url_encode(l_p_out);
    <portal-schema>.wwa_app_module.set_target(l_url,'CALL');
    end;
    NOTE :
    ======
    In the code given above, replace
    <schema> with the schema name that owns the procedure proc1
    <host> with webserver host
    <port> with the port of your webserver
    <dad> with the portal dad
    <portal-schema> with the name of the portal-schema
    <module_id> with the module of the 2nd form i.e. where you need to pass the value of the out variable.
    You will have to grant execute privilege on procedure proc1 to your application schema,
    if the procedure proc1 lies in a schema other than the application schema.
    4> Finish editing the form.

  • Form based on a procedure - question out parameter

    hello,
    I have created a form based on procedure:
    PROCEDURE "PRC_REQ_CREATE" (
    vuser_id in number,
    vapp_study_id in number,
    vinformation in varchar2,
    vstate_id in number,
    vaction_id in number,
    vaccount out varchar2
    the new form see all the parameters.
    When I execute the form, the value for the out parameter is displayed on a separated window.
    How can I display it in the vaccount field of the form ?
    What can I do if I want to use this value in another form or report as a parameter?
    Thanks for your help
    Didier

    I do know how you can use the out in a redirect.
    Basics are:
    Comment out the doSubmit in the pl/sql submit buffer,
    declare your variables,
    get your in variables that are being passed,
    call the procedure directly from your code, storing the new variable.
    do your navigation.
    Or for an example, something like:
    --- Type your PL/SQL code here...
    doSubmit;- This is the default handler
    --- ...and here, thanks...
    declare
    v_appt_in number;
    v_appt_out number;
    l_target varchar2(300);
    blk varchar2(10):='DEFAULT';
    begin
    v_appt_in:=p_session.get_value_as_number
    (p_block_name=>blk,p_attribute_name=>'A_V_APPT_ID');
    appt.arrive_no_show(v_appt_in,v_appt_out);
    l_target :=
    'portal.wwa_app_module.linkp_arg_names=_moduleid&p_arg_values=1147314217';
    l_target := l_target || '&p_arg_names=APPT_ID&p_arg_values=' || v_appt_out;
    l_target := l_target || '&p_arg_names=_APPT_ID_COND&p_arg_values==';
    PORTAL.wwa_app_module.set_target(l_target);
    return;
    end;
    To display it in the field, I'ld suggest using set_value...

  • Call a pl/sql stored procedure from a report link

    Hello everyone:
    I have a report with a link in a column, which takes you to another page and passes values to that page, but also need the link, run a stored procedure before going to the other page.
    In the Forum I found cases similar to this, but none of the examples is clear to me how I do this. It seems that the target of the link should be URL, and also I have to call the stored procedure with a javascript function.
    My questions are:
    - Is this the best method to make what I need?
    - How should be the syntax of the link that takes me to another page and run the "stored procedure"
    - How and where I put the function "javascript" to run the "stored procedure"
    BDD: Oracle 11 g
    Apex version 4.1
    Best regards
    Gerard

    Hi,
    Change the link to call an apex.submit process. (javascript).
    Edit:
    I've set up a basic example.
    Region 1 (just so you can see the value getting set):
    select :P27_HIDDEN item_Value
    from dual
    Region 2:
    select rownum id, dbms_random.string('U', 12) sss
    from dual
    connect by level <= 20
    item attributes for ID:
    Target: URL
    URL: javascript:apex.submit({request:'NAVIGATE', set:{'P27_HIDDEN':#ID#}});
    (P27_HIDDEN is just a hidden item i created)
    http://apex.oracle.com/pls/apex/f?p=54920:27
    Edit2:
    In your case, then you can just have a page process based on conditions request = expression1, expression1: NAVIGATE..... then a page branch to go to the desired page, also with the same conditions
    Edit3:
    Im not sure what examples you are referring to , as you didn't supply any links; but you mention calling the stored procedure from javascript, so would likely involve some AJAX, but imo not necessary.

  • Default value type - validation option form based on stored procedure

    Please could somebody explain and provide an example of what the option :-
    default value type - in the validation options for a field in the editor for a form based on a stored procedure ?
    Thanks in anticipation.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dmitry Nonkin([email protected]):
    Absolutely, you can use SQL query to return the value like in the example above:
    Default Value = select 5 from dual
    Default Value Type = 'SQL query returns number'
    or
    Thanks,
    Dmitry<HR></BLOCKQUOTE>
    Hi,
    and what about:
    Default Value = select max(salary) from emp_salaries
    Default Value Type = 'SQL query returns number'
    Will it work? We go some troubles with this.
    Thanx
    Marcin

  • Does portal handle arrays in the same way as sql+ (in a form based on a procedure)..

    I've got a package which has compiled without errors in Toad/Formatter Plus. When I try and create a from based on a procedure in PortalI get the error;
    Line/Column Error
    88/24 PLS-00201: identifier 'ARRAY' must be declared
    88/24 PL/SQL: Item ignored
    92/9 PLS-00320: the declaration of the type of this expression is incomplete or malformed
    92/9 PL/SQL: Statement ignored
    96/97 PLS-00320: the declaration of the type of this expression is incomplete or malformed
    96/9 PL/SQL: Statement ignored
    any ideas?

    Please refer the following reply for your requirement.
    Re: Setting a width for CoreSelectOneChoice
    Hope this will help.
    rahul

  • Adding fields to a form based on stored procedure

    I have a store procedure and a form based on it. I'd added a new parameter to the store procedure. How can I do to add a field in the form which takes the new parameter. I'd tried adding a new field with the same name of the parameter but it didn't work.
    Thanx

    Hi,
    It should work fine. What is the problem you are facing? Are you getting any error?
    Thanks,
    Sharmila

Maybe you are looking for

  • RAID - 1 and repair question

    Hi all, I have an AMD 770-C45 motherboard. After setup a raid-1 with 2 500GB disks, 1 of the disk becomes unusable at the RAID set. The raid set is still visible within Windows XP as RAID disk. Within the Raid config at BIOS, the 2nd disk has been de

  • HT4759 How do I connect my IPhone to my Mac?

    I want to connect my iPhone to my Mac so i can text on my computer. How do I do this?

  • Dummy PC in new GL

    Hi Friends, We have document splitting on Profit center level,still somehow,the dummy PC had been configured and consequently,a few entries had been posted to dummy PC ,since the Cost center master did not have a PC. How to remove the dummy PC settin

  • Servlet Error An unexpected servlet error was encountered

    I am getting the following error when I go to Oracle Application Server Welcome page and when I try to click on Logon to Oracle Application Server Portal I get the following error it was just working fine couple minutes ago... what may be the reason?

  • Dynamic password in FTP task in SSIS ?

    I can set almost all properties of FTP task and FTP connection manager using expressions option. In that option, I don't see that I can set FTP PASSWORD using a variable. How do I set the password dynamically ? Thanks.