Problem calling a form from another form in oracle 10g

hi,
i have created A basic STUDENT form with all fields and the STUDENT/COURSES master/detail form .
I am trying to place to button on the STUDENT form that when pressed, will call the STUDENT/COURSES form and automatically query the COURSES for the employee being viewed on the STUDENT form.
here is the code i used
DECLARE
     pl_id ParamList;
BEGIN
     pl_id := Get_Parameter_List('tmpdata');
IF NOT Id_Null(pl_id) then
          Destroy_Parameter_list (pl_id);
     end if;
     pl_id := create_parameter_list ('tmpdata');
     add_parameter (pl_id, 'students_id',text_parameter, :s_id);
     run_product (forms, 'C:resubmission\stucourse.fmb', synchronous, runtime,
     filesystem, pl_id, null);
end;
although it successfully compiled,
when i press the button on the form it is giving me
frm-92101 : there was a failure in the forms sever during start up...
i have tried everything i can think off, am fairly new to this
please any assistance will be appreciated. am using oracle 10g
thanks in advance.

Ammad is right, in order to pass a parameter to another Form, the Form you call must have a corresponding parameter. In other words, if you go to the Parameters node of the Object Navigator you need to add a parameter called "STUDENTID" and set the data type and precision of the parameter to match the data you will pass to this parameter.
Once you have this parameter in your called form, you will have to write code in the called form to use the value of the parameter. This code is typically in the When-New-Form-Instance (WNFI) trigger, but that all depends on your requirements. In your example, this seems the appropriate trigger as your intent is to pass the Student ID and query any Courses the Student is enrolled in. Your WNFI trigger needs to check if there is a value in the Student_ID parameter and then set the default where clause of your COURSES datablock and execute a query on the block. For example:
/* Sample WNFI trigger */
/* This example "ASSUMES" your courses block is called COURSES */
BEGIN
   IF ( :parameter.STUDENT_ID IS NOT NULL ) THEN
      Set_Block_Property('COURSES', OneTime_W.here, 'STUDENT_ID = :Parameter.Student_ID');
      Execute_Query;
   END IF;
END;
Note: I had to put a period into the "OneTimeW.here" statement in order to get the Editor to accept my post.  Please remove the period if you use this sample code.
Hope this helps,
Craig B-)
If a response is helpful or correct, please mark it accordingly.
Edited by: CraigB on May 24, 2010 8:23 AM
Edited by: CraigB on May 24, 2010 8:23 AM
Edited by: CraigB on May 24, 2010 8:26 AM

Similar Messages

  • Calling one Report from another Report in oracle 10g(Urgent)

    Hi All,
    Can anyone let me know how to make hyperlink to call another report.
    I am trying
    SRW.SET_HYPERLINK('/reports/rwservlet?&report=rep059_v31.rdf&il&destype=cache&desformat=pdf');
    But i am getting message 'make sure the path or internet address is correct' .
    Please let me know what are the attributes used to create hyperlink.
    Thanks
    Nikhil
    Edited by: user9527411 on 29-Apr-2009 05:53
    Edited by: user9527411 on 30-Apr-2009 00:24

    Hello,
    The syntax is correct (except the & after the ?)
    You are using a "relative URL" . It means the browser will use the protocol , server and port from the current page in order to build a full URL
    (full URL = <protocol>://<server>:<port>/reports/rwservlet?report=test&destype=cache&desformat=html)
    Regard

  • HOW TO CALL A FORM FROM ANOTHER FORM

    HOW TO CALL A FORM FROM ANOTHER FORM [local machine]

    Balraj wrote:
    HOW TO CALL A FORM FROM ANOTHER FORM [local machine]The way you asked question is this bit of request or order?
    Secondly, you used capital latters which are being treated as Shouting Language. So, always try to switch off the Capslock of your keyboard.
    Thirdly, you are very lazy to serach on forum or google for your problem instead of waiting someone to anwer your question.
    Your should seriously have a look at FAQ.
    http://wikis.sun.com/display/Forums/Forums+FAQ
    Also here.
    http://www.catb.org/~esr/faqs/smart-questions.html
    Please read documentation for the initial questions.
    -Ammad

  • What are the 3 ways to call a form from another form?

    What are the 3 ways to call a form from another form?
    What is the command to call a report from within a form?
    How do you attach a menu to a form?

    Hi,
    1. Should be new_form, call_form and open_form
    2. The command is run_product
    3. There is a property 'Menu Module' in form, just change it to your menu file name
    Regards,
    George
    Can anyone help me with the following questions...
    What are the 3 ways to call a form from another form?
    What is the command to call a report from within a form?
    How do you attach a menu to a form?
    Thanks for your time..
    Madhu

  • Open the form from another form...

    How can I open the form from another form with the PL/SQL code???
    The my form are create from OracleDesigner and developed with OracleBuilder.
    Regards
    Basilisco Giorgio

    You can read "About calling reports, displays, and other forms from generated forms" topic in the Designer on-line help. By the way in Forms there are CALL_FORM,OPEN_FORM and NEW_FORM built-ins.
    Helena

  • Query a second form from another form by passing value

    Hi,
    I have two forms. I am trying to query a second form from another form. I have managed to display the query results in the second form by passing value from the first form. I did it according to the details in the Oracle 9ias Portal Technical FAQ html file.
    It works fine when there is already a row in the first form. When I insert a new row in the first form and query the second form which has key from the first form, there is no matching rows displayed which is correct but detail action mode is 'NONE' for all detail rows.
    According to the FAQ, it says the following:-
    "When the called form is started, it executes a query with the supplied condition (in this case, "where deptno=10"). If the query is successful, the matching rows are displayed in Update mode. If no matching rows are found, the form starts in Insert mode."
    It does not happen for me. I get NONE mode for no matching rows. Is this a BUG ? I am working on Portal version 3.0.9.8.0.
    Is there something wrong in the code I wrote ? I would like to have all the detail mode as Insert.
    Here is the following code I wrote on SUCCESSFUL SUBMISSION OF THE FORM.
    declare
    my_url varchar2(1000);
    v_deptno number;
    begin
    v_deptno := p_session.get_value_as_NUMBER(p_block_name => 'DEFAULT', p_attribute_name => 'A_DEPTNO');
    my_url := 'PORTAL30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1268491962&p_arg_names=_show_header&p_arg_values=YES&p_arg_names=deptno&p_arg_values='||LTRIM(TO_CHAR(v_deptno))||'&p_arg_names=_deptno_cond&p_arg_values=%3D';
    go(my_url);
    end;

    Hi,
    The behaviour is OK as in the MD form there are two states "Save" and "Query and Save" and when the form is in "Query and Save" mode that means you can use it for both Query aswell as Save which is decided by your "Master action" if that is None it is used for Query , for Insert you will have to select Insert ,this is the Insert Mode behavior.
    If you open a new MD form that is also in the "Query and Save" the same behaviour will be there.
    Hope this answers your query.
    rahul

  • Frm-92101 happens when I open a form from another form and close it.

    Frm-92101 happens when I open a form from another form, check something, show a message to the user and exit the form to the previous form.
    Forms version: 10.1.2.0.2. Java: 1.6.0_23. Browser: IE6
    When I put before the "EXIT_FORM" two messages, everything is fine and the second form is closed and I repeat to the first form just as I wanted.
    In forms 9.0 it didn't happen.
    Does it have a connection with the fact I use JRE instead of JInitiator?
    Thank you.

    >
    There are numerous causes of the FRM-92101 error. I recommend you start your investigation by tracing your Forms session so you can see what your form is doing when the error occurs. Check out My Oracle Support document How to Use Forms Trace with Forms [ID 209372.1] for information on how to enable the trace. Also, take a look at My Oracle Support document Known Causes of FRM-92101 Error In Forms [ID 604633.1].
    Hope this helps,
    Craig
    >
    I have just found that there is a "Synchronize" command in one of the main attached libraries, and when I comment that command the application works well. But I don't want to comment it because it's a great library and I assume it has a part in the system.
    I have discovered that in the new Forms' help, the fact that the System.Current_Item mustn't be null so the command "Synchronize" will work, is mentioned. In the old Forms' help, that fact is not mentioned.
    So I tried to put it inside a condition that checks if the current item is not null, but the compiler doesn't recognize the "current_item". I don't know why. Because it's a library? So how can I check this? I can sent it as a parameter, but I don't want. Do you know something about it? Thank you.

  • How to refer the trigger written in one form from another form ?

    How to refer the trigger written in one form from another form ?
    Thanks,
    Ravi Shankar

    Try to convert the PL/SQL code from Forms trigger into a PL/SQL library(.PLL),
    and then attach that PLL in your forms.
    Note that all Forms objects should be referenced indirectly, for example,
    you have to rewrite
    :B1.DEPT_CODE := :B2.DEPT_CODE;
    :B3.TOTAL_AMOUNT := 100;
    ==>
    copy('B2.DEPT_NO','B1.DEPT_NO');
    copy('100','B3.TOTAL_AMOUNT');
    This is the best way to share PL/SQL code among Oracle Forms.

  • Error while calling a form from another form's menu item

    I created a main form and menu module for this form.
    I am calling another form from main form menu item.
    i moved both the forms and menu and compiled them.
    But, when i run this form i am getting an error saying
    FRM 92100: Your connection to the server was interrupted
    This may be the result of a network error, or a failure on the server.
    You will need to establish your session.
    I set the seperateframe = true
    networkentries = 30
    But still getting the same error.
    Is there any parameter that i am missing.
    I will greatly appreciate if anybody can direct me to the solution.
    Thank you.
    Navya.

    Hi guest,
    the data definition is:
    DATA: XVBKD LIKE VBKDVB OCCURS 0 WITH HEADER LINE.
    the assignment:
    XVBKD-PRSDT = likp-erdat.
    Thanks,
    Hagit

  • Calling Custom Form from Another Form

    Hi All,
    I have created a Custom form using TEMPLATE.fmb and created functions in Apps and assigned to Responsibility etc and it all works OK.
    Now, I need to call this Custom form from another seeded(PO form) Via Tools -> Menu.
    using Forms personalization I can get the Menu Entry and Actions to execute the Form successfully from the PO Form.
    BUT, I need it to automatically query records in my CUSTOM form based on my current PO_HEADER_ID value on my PO Form.
    How can I do it ?
    Do I need to modify my Block and add some parameters and then pass a value via Personalization ?
    Please help !
    Thanks
    Shankar

    Hi ,
    I found similiar solution on another forum as below.
    http://it.toolbox.com/blogs/apps-traction-blog/how-to-create-a-zoom-using-oracle-form-personalization-12081
    This works fine for the Purchasing form and allows me to zoom to the Supplier form.
    But in my case, I want to zoom from the Supplier Form to my CUSTOM form. I replicated the exact steps as per the link.
    However, it does NOT work as expected. It gets up to the ENTER QUERY mode in my CUSTOM form and remains in Enter Query mode. If I manually then Press key F11 to execute the query it brings back all records.
    Do I need to do anything special in my CUSTOM form to make it behave in a similiar way to the Supplier Form ?
    Thanks
    Shanky

  • Control access of a form from another form.

    hi all,
    Please help me .
    This is a system which contains a lot of forms (more than 100) . The system administrator can specify whether a user can insert, update,delete or query for each form (this varies for each user). So, when a user logs in and calls a form i have to enable / disable the insert, update,delete or query according to the user who has logged in and the privileges the system administrator has given for that form.
    i used the call_form method with query_only mode and no_query_only(normal mode) option . The normal mode allows insert,update,delete and query together but i want the user to insert into database without querying any of the records.
    So, in short , i would like to know if i can enable/disable insert,update,delete & query of a called form(Form B) from calling form (Form A) without having to modify (Form B) and without issuing any grant statements in the database side ? Is there any option like the one in the call form method?
    Thanking you in advance.

    Thank you very much for the response.
    yes, set form property and set block property can be used when i want to enable / disable insert in the current form. But, what if i want to control enable/disable insert from another form (the main form) ????
    Can i pass parameters ? without making any change in the current form.

  • Urgent:Error While calling one form from another form

    Hi,
    i am using a form in which zoom functionality is enabled.From this form if i am clicking view->zoom it should open another form which should accept two parameters from the first form.But whenever i am clicking on zoom its giving the following error.
    FRM-47023:No such parameter named G_QUERY_FIND exists in form
    XX_EMPLOYEE_CONVERSION(Name of the form which i am calling from first form)
    When i am clicking 'ok' then it shows the error
    FRM-40105:Unable to resolve reference to item PARAMETER.G_QUERY_FIND
    Eventhough i have developed my form using template.fmb which uses the parameter G_QUERY_FIND why this error is coming?
    Can anyone suggest a solution for this.
    Thanks in advance

    PARAMETER.G_QUERY_FIND is one of he objects in the APPSTAND.fmb. You will need to Subclass all of the objects in APPSTAND.fmb in your custom form. If you do not have a copy of this file in your FORMS60_PATH, I suggest you put a copy there. If you don't have a FORMS60_PATH specified then I would highly suggest adding this entry to your Forms Home in the Registry. Also, you will want all of the libraries in the AU_TOP/Resources folder as well.
    I also suggest looking at the Oracle Applications Developer's Guide (http://download.oracle.com/docs/cd/B25284_01/current/acrobat/115devg.pdf) as it outlines all of the required objects you must have in your form and reports.
    Hope this helps.
    Craig...

  • Calling a form from another form?

    Hello,
    User searches for data by clicking search button. This brings up my canvas C_view related to block B_view.
    I put a 'when-mouse-double-click' trigger on my view block B_view.
    In that trigger I have a call to a program unit P_CALL_FORM.
    My idea is to call a form and pass the values from the record on which the user double clicks.
    For now I have the following code in my P_CALL_FORM:
    PROCEDURE P_CALL_FORM IS
       L_pl_id   ParamList;
       x         number;
    BEGIN
       Open_Form ('lcimpedt',
                  ACTIVATE,
                  SESSION);
    EXCEPTION
       when FORM_TRIGGER_FAILURE then
          raise;
       when OTHERS then
          emessage(SQLERRM);
          raise FORM_TRIGGER_FAILURE;
    END;When I double click on any record in the C_view, the called form 'lcimpedt' does not come up. Any suggestions
    why the form is not showing up?(that form 'lcimpedt' is in the same directory of the application as my calling form. both of them are 10g forms.)
    Thanks,

    Andreas,
    Thank you for your valuable suggestions.
    "If you have a hundred users with each opening two connections you have 200 connections instead of 100. Also, having two connections means that you have two transactions, so one user could lock himself in one forms-application by trying to change the same record in two db-sessions. And, commiting only affects the "active" session. So if the user changes in two sessions he will have to commit two times (Of course, this could also be a positive argument)."
    I totally agree with the above.
    There are very few users(infact may not be more than 3) to the form that I am working on...so opening multiple connections should not be a problem.
    Currently there are some forms in the application with the similar functionality(although in that case....when they try to edit, they are editing completely different information than what is in the calling form). I am trying to mimic the same thing (not that it is the right way of doing things) ...just so that the users get what they are used to. So, switching between windows is something that they are used to...and I think its a non-issue.
    The only other thing that I think will be a problem is users potentially locking themselves up. Do you know if using pl/sql tables/collections for this would be a good idea to solve this? Can pl/sql tables/collections be used with forms?
    Thanks,
    Chiru

  • Call a portal form from another form

    I have a portal form which needs to call another form using a link and passing parameters ..
    both of forms are built on tables with a forigen key..
    How can i pass parameters from form1 to form2 ?
    Best Regards

    Hi,
    Here is a sample which calls another form with the values of flightno and ticket no.
    declare
    flightno number;
    ticketno varchar2(30);
    tdate date;
    persons number;
    blk varchar2(10) := 'DEFAULT';
    begin
    flightno := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_FLIGHT_NO');
    ticketno := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_TICKET_NO');
    tdate := p_session.get_value_as_date(
    p_block_name => blk,
    p_attribute_name => 'A_TRAVEL_DATE');
    persons := p_session.get_value_as_number(
    p_block_name => blk,
    p_attribute_name => 'A_NOF_PERSONS');
    call('SJDEMO30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1384225689&p_arg_names=_sessionid &p_arg_values=&p_arg_names=flightno&p_arg_values='||flightno||'&p_arg_names=ticketno&p_arg_values='||ticketno);
    end;
    Hope this helps.
    Thanks,
    Sharmila

  • Problem calling a report from a form

    Hello,
    i thought about 5 hours what causes this. but i didn't found a solution..
    [http://img188.imageshack.us/i/67205607.jpg/]
    in when-button-pressed i have:
    DECLARE
    report_id REPORT_OBJECT;
    report_job_id VARCHAR2(200);
    rep_status VARCHAR2(200);
    JOB_NUMBER number;
    server_name VARCHAR2(200) := 'roger';
    BEGIN
    /* Check to see if forms application is WEB deployed */
    IF get_application_property(user_interface) = 'WEB' THEN
         report_id:= FIND_REPORT_OBJECT('report104');
         /* Set Report parameters given WEB deployment */
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER , server_name);
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,CACHE);
         /* DESFORMAT could be HTML, HTMLCSS or PDF here*/
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,'PDF');
         /* Run the report */
         report_job_id := RUN_REPORT_OBJECT(report_id);
         /* Check the report status */
         rep_status:=REPORT_OBJECT_STATUS(report_job_id);
         WHILE rep_status IN ('RUNNING','OPENING_REPORT','ENQUEUED')
         LOOP
         rep_status := report_object_status(report_job_id);
         END LOOP;
         IF rep_status='FINISHED' THEN
         message('REPORT WAS CORRECTLY RUN');
         /* Display the report output in the client browser */
         JOB_NUMBER := length(server_name) + 2;
         WEB.SHOW_DOCUMENT ('/reports/rwservlet/getjobid'||substr(report_job_id,JOB_NUMBER)||'?server=' || server_name ||'&param_cls='||to_number(:control.lst_clase));
         /* If report has failed display message to user */
         ELSE
              message('REPORT FAILED WITH STATUS: '||rep_status, no_acknowledge);
         END IF;
    ELSE
         /* Else if forms application is Client-Server deployed */
         /* Set Report parameters given Client-Server deployment */
         report_id:= FIND_REPORT_OBJECT('report104');
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER ,'');
         /* Report to be executed via Reports Background Engine, not the 'new' Reports Multi-Tier Server */
         /* Destype SCREEN or PREVIEW can be used here */
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,SCREEN);
         /* Run the report */
         report_job_id := RUN_REPORT_OBJECT(report_id);
    END IF;
    END;report104 is the name of the repord added in the Reports node (in Forms).
    in the left window from the image, i checked for the value of parameter param_cls, and it's ok (16).
    when i run the report from the Reports, i see all the repors (that table), but when i run from forms, i got just the headers of the table, the rest is invisible. i don't know why happens this..
    :control.lst_clase returns a char, so i convert that char to a number, and that's the parameter passed from Forms.
    Please help me..
    edit: i saw in Reports that there are two buttons: Run Web Layout and Run Paper Layout. from the Forms, i wanna run the web layout
    Thanks
    Edited by: Roger22 on 22.06.2009 18:24

    finally solved. there was a problem at passing parameters
    this is the code
    DECLARE
    report_id REPORT_OBJECT;
    report_job_id VARCHAR2(200);
    rep_status VARCHAR2(200);
    JOB_NUMBER number;
    server_name VARCHAR2(200) := 'roger';
    rep_url varchar2(500);
    BEGIN
    /* Check to see if forms application is WEB deployed */
    IF get_application_property(user_interface) = 'WEB' THEN
         report_id:= FIND_REPORT_OBJECT('report107');
         /* Set Report parameters given WEB deployment */
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER , server_name);
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,CACHE);
         /* DESFORMAT could be HTML, HTMLCSS or PDF here*/
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,'HTML');
         /* Run the report */
         report_job_id := RUN_REPORT_OBJECT(report_id);
         /* Check the report status */
         rep_status:=REPORT_OBJECT_STATUS(report_job_id);
         WHILE rep_status IN ('RUNNING','OPENING_REPORT','ENQUEUED')
         LOOP
         rep_status := report_object_status(report_job_id);
         END LOOP;
         IF rep_status='FINISHED' THEN
         message('REPORT WAS CORRECTLY RUN');
         /* Display the report output in the client browser */
         JOB_NUMBER := length(server_name) + 2;
         rep_url:='/reports/rwservlet?report=D:\Oracle\product\10.2.0\DevSuiteHome_1\reports\ORAR.jsp'
         ||'&userid='||get_application_property(username)||'/'||get_application_property(password)||'@'||get_application_property(connect_string)
         ||'&desformat=htmlcss'
         ||'&destype=cache'
         ||'&paramform=yes'
         ||'&getjobid'||substr(report_job_id,JOB_NUMBER)
         ||'&param_cls='||to_char(:control.lst_clase)
         ||'&param_ansc='||to_char(:control.lst_an)
         ||'&param_sem='||to_char(:control.text_item26);
         WEB.SHOW_DOCUMENT (rep_url,'_blank');
         /* If report has failed display message to user */
         ELSE
              message('REPORT FAILED WITH STATUS: '||rep_status, no_acknowledge);
         END IF;
    ELSE
         /* Else if forms application is Client-Server deployed */
         /* Set Report parameters given Client-Server deployment */
         report_id:= FIND_REPORT_OBJECT('report107');
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER ,'');
         /* Report to be executed via Reports Background Engine, not the 'new' Reports Multi-Tier Server */
         /* Destype SCREEN or PREVIEW can be used here */
         SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,SCREEN);
         /* Run the report */
         report_job_id := RUN_REPORT_OBJECT(report_id);
    END IF;
    END;but the report is running in Paper Layout. i wanna run in Web Layout (in Reports Builder there are two buttons, Paper Layout and Web Layout). from forms how can i run the report in Web Layout?
    Regards,

Maybe you are looking for