CALLING  EMAIL FROM AN ORACLE FORM

HOW CAN YOU BRING UP EMAIL IN AN ORACLE FORM? I WANT THE USER TO SEE THEIR EMAIL MESSAGE. WHAT TYPE OF CODE DO I NEED TO USE TO DO THIS? CAN THIS CODE BE PUT IN A WHEN BUTTON PRESSED TRIGGER.

Please post your question to the FOrms page - and click on the forums link
otn.oracle.com/products/forms
Regards
Grant Ronald

Similar Messages

  • SENDING MASSIVE EMAILS FROM AN  ORACLE FORM

    Has anybody been able to send large amounts of email from an Oracle form,
    say 9,000 or more eamil addresses?
    I have been able to go in access MICROSOFT OUTLOOK, open up a new email
    message and have the recipient line preformatted with less than two thousand
    email addresses but I get an error when I try to preformat the the recipient line
    with more than four thousand email addresses.
    The error that I get is ORA-06502 AND FRM-40735.
    Does anybody have any ideas?

    Mail transport protocols may well be capable of handling an email message having nine thousand recipients, but your mail client, mail server, or organizational policies will likely introduce limits of their own, never mind the artificial constraints imposed by Oracle datatypes. If your requirements permit the approach of sending multiple messages of, say, one thousand recipients each, I would suggest that. If not, I would suggest re-evaluating your requirements -- refusing to define some reasonable threshold is asking for trouble.

  • Calling Report from Menu (Oracle Forms 11g)

    I'm trying to call a report from a menu item in a menu (that is attached to a form) in Oracle Forms 11g directly and I'm having some difficulty. I know how to call a report from a form and everything works perfectly.
    But since in a menu there is no item called "Report" to attach like there is in Forms, I followed on route which is to attach the "rp2rro" PL/SQL library on the menu file (mmb) and I also even did it on the form itself. Then when you convert a menu using the Forms Migration Assistant, it will comment out statements like "ADD_PARAMETER" and replace with calls to packaged procedures/functions from the package "rp2rro". I set all the parameters
    RP2RRO.SETOTHERS('PARAMFORM=YES');
    RP2RRO.SETDESTYPE('CACHE');
    RP2RRO.SETDESFORMAT('PDF');
    RP2RRO.SETCOMMUNICATIONMODE(SYNCHRONOUS);
    then made the call to the report:
    RP2RRO.RUN_PRODUCT(REPORTS, 'MYREPORT', SYNCHRONOUS, RUNTIME, FILESYSTEM, param_list_id, NULL);
    but all i get is the error "FRM-41219: Cannot find report: invalid ID."
    The Oracle documentation for integration reports in forms is for when you execute the report within a form not a menu item (that is attached to a form). Any clues?
    My environment is:
    Oracle (Database, Fusion Middleware) 11g - Red Hat Enterprise Linux 5
    Web Browser - Internet Explorer 7 on Windows XP Professional
    Thanks,

    Francois Degrelle wrote:
    Hello,
    One option is to use the Web.Show_Document() built-in, with the complete Report Server URL inside. Of course, you can hide some information (connection string for instance) by calling a section of the /reports/conf/cgicmd.dat configuration file.
    FrancoisI tried it using the code below
    DECLARE
    c_relative_path CONSTANT VARCHAR2(50) := '/reports/rwservlet/?server=';
    c_rep_srv_name CONSTANT VARCHAR2(50) := 'rep_wls_reports_calgf3_asinst_1';
    c_rep_name CONSTANT VARCHAR2(30) := 'copy_detail.rdf';
    c_desformat CONSTANT VARCHAR2(10) := 'htmlcss';
    c_destype CONSTANT VARCHAR2(10) := 'cache';
    v_username VARCHAR2(100);
    v_password VARCHAR2(100);
    v_db_instance VARCHAR2(40);
    v_connect_string VARCHAR2(300);
    v_rep_srv_params VARCHAR2(200);
    v_rep_url VARCHAR2(400);
    BEGIN
    v_username := LOWER(get_application_property(username));
    v_password := LOWER(get_application_property(password));
    v_db_instance := LOWER(get_application_property(connect_string));
    v_connect_string := v_username || '/' || v_password || '@' || v_db_instance;
    v_rep_srv_params := '&report=' || c_rep_name ||
    '&desformat=' || c_desformat ||
    '&destype=' || c_destype ||
    '&userid=' || v_connect_string ||
    '&paramform=yes';
    v_rep_url := c_relative_path || c_rep_srv_name || v_rep_srv_params;
    web.show_document(v_rep_url, '_blank');
    END;
    and I get a new tab in the browser opening up (which is good at least) with the Oracle Reports Services page saying:
    Error
    No such Web command ().
    Now I've tried putting a URL of a Oracle's website (http://www.oracle.com) and that works perfectly. Another question is, where would the default directory be if I wanted to say call an HTML file? Would it be in the directory of FORMS_PATH where all my fmb, fmx, rdf, pll, etc...files are stored?
    Thanks,

  • Calling Report from Menu (Oracle Forms 10g)

    We have the applications in Forms6i & Reports 6i (Client Server) and migrating to Forms 10g and Reports 10g. We have the menu, from that menu we are calling all the forms and Reports. For especially Reports earlier we user RUN_PRODUCT but now 10g it is not working. How can call the report using RUN_REPORT_OBJECT
    Important things we have some dynamic parameters (input) to the each report. That means when i called the report from the menu i need to get first parameter form to take the parameters and then can be run the report.

    Here is the code to call report from menu in 10g
    DECLARE
    pl_id ParamList;
    repid REPORT_OBJECT;
    v_rep varchar2(100);
    v_server VARCHAR2(100);
    rep_status varchar2(100);
    v_host VARCHAR2(100);
    BEGIN
         select rep_server into v_server from reports_data;
         select machine into v_host from reports_data;
    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,'P_C_CODE',TEXT_PARAMETER,:GLOBAL.COMPANY);
    Add_Parameter(pl_id,'P_B_CODE',TEXT_PARAMETER,:GLOBAL.BRANCH);
         repid := find_report_object('REPORTOBJ');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,getpath||'E_VOUCHER_ENTRY.RDF');
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'htmlcss');
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_server);
              v_rep := RUN_REPORT_OBJECT(repid, pl_id);
              rep_status := REPORT_OBJECT_STATUS(v_rep);
              WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
                   LOOP
                        rep_status := report_object_status(v_rep);
                             message('Running');
                   END LOOP;
              IF rep_status = 'FINISHED' or rep_status is NULL THEN
                   --Display report in the browser
                   WEB.SHOW_DOCUMENT('http://'||v_host||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_server,'_blank');
              ELSE
                   null;
         END IF;
    END;

  • How to open or call Excel from an Oracle Form in Apps11i

    I have a custom form in Apps 11i from which I need to be able to open an Excel spreadsheet. I'm aware that it is possible to a spreadsheet that is available on the local drive from a form, but can it be done from Applications ?

    If you do by yourself, you may call report in excel format, as of editing and saving back to database, you may need think other ways.
    webutil may be hhepful.

  • Procedure runs in SQL Plus, but not when called from my Oracle Form

    Hi. I have this code to send an email alert as the user updates a record on my base table from my Oracle Form. I use dbms_scheduler so that it's submitted as a background job and so the email processing does not delay my Oracle Form from saving quickly. If I submit this code in SQL Plus it executes and I receive the email as expected.
    begin
    dbms_scheduler.create_job ( 
         job_name            => 'IMMEDIATE_JOB', 
         job_type            => 'PLSQL_BLOCK', 
         job_action          => 'begin TTMS.dropperVacationConflict_Notify (62547, ''01-SEP-11'', ''02-SEP-11''); end;', 
         number_of_arguments => 0, 
         start_date          => sysdate +1/24/59, -- sysdate + 1 minute 
         enabled             => TRUE, 
         auto_drop           => TRUE, 
         comments            => 'Immediate, one-time run');
    end;However if I submit this code from a Post-Update trigger in my form the code runs without error, but my email is never received (the same parameter values would be passed to this trigger):
    begin
    -- Submit the email notification in the background so as to not slow down the screen while saving.   
    dbms_scheduler.create_job ( 
         job_name            => 'IMMEDIATE_JOB', 
         job_type            => 'PLSQL_BLOCK', 
         job_action          => 'begin TTMS.dropperVacationConflict_Notify (:dropper_vacations.dropper_id, :dropper_vacations.begin_dt, :dropper_vacations.end_dt); end;', 
         number_of_arguments => 0, 
         start_date          => sysdate +1/24/59, -- sysdate + 1 minute 
         enabled             => TRUE, 
         auto_drop           => TRUE, 
         comments            => 'Immediate, one-time run');
    end;     Any ideas why this might be happening?

    Wow, so I changed the two procedures so that I'm only passing in one number parameter and one char parameter...
    CREATE OR REPLACE procedure TTMS.job_vacationconflict_notify (p_dropper_id number, p_other char) IS
    CREATE OR REPLACE PROCEDURE TTMS.dropperVacationEmailURL_new (in_dropper_id number, in_other char) ISIf I execute it like this it works and I get the email:
    TTMS.job_vacationconflict_notify(62547, 99999);or like this it works and I get the email:
    TTMS.job_vacationconflict_notify(62547, '99999');But if I execute it like this (I get no errors) the email is not sent:
    TTMS.job_vacationconflict_notify(62547, 'ababa');So this problem really has nothing to do with date formats. It seems to have to do with whether parameter two has characters in it!!! What the heck.
    Any ideas on this?
    Here is the procedure I'm calling:
    CREATE OR REPLACE procedure TTMS.job_vacationconflict_notify (p_dropper_id number, p_other char) IS
    begin
      dbms_scheduler.create_job ( 
         job_name            => 'IMMEDIATE_JOB', 
         job_type            => 'PLSQL_BLOCK', 
         job_action          => 'begin TTMS.dropperVacationemailurl_new ('||p_dropper_id||','||p_other||'); end;', 
         number_of_arguments => 0, 
         start_date          => sysdate +1/24/59, -- sysdate + 1 minute 
         enabled             => TRUE, 
         auto_drop           => TRUE, 
         comments            => 'Immediate, one-time run');
    end;
    /And the above procedure is calling this procedure which should be sending the email alert:
    CREATE OR REPLACE PROCEDURE TTMS.dropperVacationEmailURL_new (in_dropper_id number, in_other char) IS
          myguid varchar2(15):=null;
          pcm_contact varchar2(3):=null;
          guid_contact varchar2(15):=null;
          conflict_cnt number(8):=0;
          -- Various declarations
          PSENDER VARCHAR2(200);            --  From
          PRECIPIENT VARCHAR2(200);         --  To
          P_CC_RECIPIENT VARCHAR2(200);     --  CC
          P_BCC_RECIPIENT VARCHAR2(200);    --  BCC
          PSUBJECT VARCHAR2(200);           --  Subject
          PMESSAGE VARCHAR2(6000);          --  Message Body
          PPARAMETER NUMBER;                --  Parameter Value
          guid_valid varchar2(15);          --  Used to grab the validation value of
          -- Grab name details of e-mail targets
          cursor targets is
          select guid, initcap(first_name) first_name, initcap(first_name)||' '||initcap(last_name) fullname
          from pwc_employee
          where upper(guid) = upper(guid_contact);
    BEGIN
            select count(*)
            into conflict_cnt
            from dropper_bundle_assign
            where
                dropper_sched = in_dropper_id and
                trunc(sched) <> '31-DEC-29' AND        
                trunc(sched) between '01-SEP-11' and '02-SEP-11' and
                trunc(sched) > trunc(sysdate);
            select distinct pcm
            into pcm_contact
            from dropper_bundle_assign
            where
                  dropper_sched = in_dropper_id and
                  trunc(sched) <> '31-DEC-29' AND        
                  trunc(sched) between '01-SEP-11' and '02-SEP-11' and
                  trunc(sched) > trunc(sysdate);
            select guid
            into guid_contact
            from pwc_employee
            where initials = pcm_contact;
        -- Ensure required parameters have been passed
        if guid_contact is not null
           and in_dropper_id is not null then
               Begin
                    select guid
                    into guid_valid
                    from pwc_employee
                    where upper(guid) = upper(guid_contact);
               Exception
                    when no_data_found then
                    raise_application_error(-20000,'Invalid Recipient.  Please check the employee table.  Please try again.');
               End;
               -- In the event there are multiple targets then we will loop thru and send individual emails
               for thisone in targets loop
                    PSENDER := lower(user)||'@us.ibm.com';
                    PRECIPIENT := lower(thisone.guid)||'@us.ibm.com';
                    P_CC_RECIPIENT := lower(thisone.guid)||'@us.ibm.com';
                    P_BCC_RECIPIENT := 'ssbuechl'||'@us.ibm.com';
                    PPARAMETER := TO_NUMBER(lower(in_dropper_id));
                    PSUBJECT := 'TEST: Dropper Vacation '||in_other||' Conflict Notification for dropper '||in_dropper_id||' - Action Required';
                    PMESSAGE := thisone.first_name||'-<br><br>There is an induction conflict due to a new or updated dropper vacation.<br><br>Click here to the dropper''s vacation conflicts: <u><a href="http://9.35.32.205:7777/forms/frmservlet?config=TTMSMENU&form=dropper_vacations&otherparams=p_dropper='||PPARAMETER||'">Dropper Id: '||PPARAMETER||'</a></u> (note: use your Oracle credentials when prompted for log-on information).<br><br>Thanks.';
                    SEND_MAIL ( PSENDER, PRECIPIENT, P_CC_RECIPIENT, P_BCC_RECIPIENT, PSUBJECT, PMESSAGE );  -- Procedure to physically send the e-mail notification
               end loop;
        else
              raise_application_error(-20001,'Recipient and Parameter Value are required. Please try again.');
        end if;
    exception
        when no_data_found then
             raise_application_error(-20002,'Note: Email will not be sent because no PCM was identified as the manager or the PCM does not have a record in the Employee table.  See ITS for assistance.');
         when too_many_rows then
             raise_application_error(-20003,'Note: Email will not be sent because multiple PCMs manage this dropper. Please notify each PCM manually.');
    END dropperVacationEmailURL_new;
    /Edited by: sharpe on Aug 17, 2011 4:38 PM
    Edited by: sharpe on Aug 17, 2011 5:03 PM

  • How to call a COM object from an Oracle Form?

    Hi All,
    Pls advice. How to call a COM object from an Oracle Form?
    Thanks.

    try asking the "Form" forum

  • Error while calling standard OAF page from custom Oracle Form

    Hi,
    I am calling standard OAF page from custom oracle form using the following code.
    FND_FUNCTION.EXECUTE(FUNCTION_NAME=>'FUN_TRX_ENTRY_OUT_VIEW_BATCH',
    OPEN_FLAG =>'Y',
    SESSION_FLAG =>'N' ,
    OTHER_PARAMS =>'&ViewBatchID = "' || NAME_IN('FUN_AGIS_LINE_D.BATCH_ID') ||
                        '&CallingFunction = "' || 'MANEXPINQ' ||'"');
    But I am getting this error.
    oracle.apps.fnd.framework.OAException: This request was not processed as the request URL %2FOA_HTML%2FOA.jsp%3Fpage%3D%2Foracle%2Fapps%2Ffun%2Ftransaction%2Fentry%2Fwebui%2FViewOutBatchPG%26OAPB%3DFUN_PRODUCT_BRAND%26OAHP%3DFUN_SSWA_MENU%26OASF%3DFUN_TRX_ENTRY_OUT_SEARCH%26_ti%3D1217029204%26language_code%3DUS%26%26ViewBatchID%20%3D%20%22203148%26CallingFunction%20%3D%20%22MANEXPINQ%22%26CallFromForm%3D%27Y%27%26oas%3DqZqg3tmdEdUNyw_HtskVow.. contained potentially illegal or un-encoded characters. Please try again by submitting a valid URL or contact your systems administrator for assistance.
    Please let me know any thing I missed out here.
    Any suggestion will highly appreciated.
    Thanks & Regards,
    Sunita

    I am using FND_FUNCTION.EXECUTE to call a OAF page from PLSQL in R12. I am getting following error"Error(9,23): PLS-00302: component 'EXECUTE' must be declared"

  • Calling a Database Procedure from an Oracle Form

    Hi,
    I have a question we will be calling the procedure from an Oracle form and through that can we pass like 1000 input values to this procedure and we need to return certain values back to the Oracle Form also. Here the proceduere take two or more parameters. Please advice.
    To receive the input values we have the input parameter of the procedure as type object, so that we can receive multiple parameter values.
    Thanks and Regards
    Srinivas

    user2626293 wrote:
    Hi Francois,
    Thanks for your response, please suggest me as to how we can acheive passing of parameters which can hold multiple values, while making a call to the database procedure from the Oracle Form
    Hi Srinivas,
    Here is an example of procedure...
    CREATE OR REPLACE PROCEDURE P_GET_SAL (P_EMPID NUMBER, P_SAL OUT NUMBER)
    IS
    BEGIN
         SELECT SALARY
         INTO P_SAL
         FROM EMPLOYEE
         WHERE EMPLOYEE_ID=P_EMPID;
    END;
    SQL> VAR G_SAL NUMBER;
    SQL> EXEC P_GET_SAL(100,:G_SAL);
    PL/SQL procedure successfully completed.
    SQL> PRINT G_SAL;
    G_SAL
          2300Hope this helps
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.*

  • Call an html help (*.chm) from an oracle form

    we used to call a help file (oracle_dba_help.hlp) from an oracle form by using the following code .
    Declare
    Htype PLS_INTEGER;
    Begin
    Htype := WIN_API.HELP_CONTEXT;
    WIN_API_SHELL.WINHELP('C:\oracle_dba_help.hlp','11',Htype);
    End;
    but when we used the html help(oracle_dba_help.chm) instead of help compiler(oracle_dba_help.hlp) it didn't accept
    please give us a way to call html help from a form.

    eeddings wrote:
    Thanks for the idea, but I can't switch the project to WebHelp.  This .chm project consists of a master project with 18 slave projects and a slew of remote jumps.  I'd have to recreate all of the remote jumps if I switch to WebHelp.
    Hopefully Adobe can fix this issue.
    Well, first off, even though it would be WebHelp, it would be inside a CHM container. So for all intents and purposes it would be a CHM file. But having said that, I'm not sure there is a way to merge these hybrid types of CHM files.
    If your statement about Adobe fixing the issue is meaning that they can either remove the Print icon from the CHM Viewer, I wouldn't hold my breath because as I said, that's in Microsoft's lap and they haven't updated the CHM viewer in a long while. Doubtful they ever will.
    The only hope would then be for Adobe to update the code used for the Mini TOC. The only way that will happen is if enough folks submit this as a bug via the following link:
    http://www.adobe.com/go/wish
    Until that would happen, your likely best bet is to simply avoid using the Mini-TOC feature or just insert a warning that if the topic is printed, it will cause issues. Or, you could use bookmarks and links to establish your own verision of a "Mini-TOC"
    Cheers... Rick

  • HOW TO HIDE USERID PARAMETER, WHEN CALL REPORT FROM MENU USING FORM 10G

    good morning colegas
    i'm from panama
    when i call a report from a oracle forms menu, its send a user, pass and bd in the url, i need to hide this parameter userid,
    cuando llamo un reporte desde forms, se envia el usuario, pass y bd en el url nesesito ocultar estos parametros del url, le agradeceria si alguno tiene algun eejmplo q me de, de como ocultar estos parametros
    i'm using oracle forms y report 10g
    this is my msn [email protected]
    slds desde panama

    this document show us, only when i call a report from a forms, but not from a menu!
    but to hide these parameters, i need to create a bean in a block a way and the menus do not allow me to create these objects
    you done this before?
    you have a example?
    slds desde panama

  • How to call java function in Oracle forms?

    Hi I am having Oracle 9i with 10g Developer Suite.
    I am new to Oracle forms..
    I had one function in java getDatas()..
    How can I call this function in Oracle Forms..
    Pls help
    Thanks

    Thanks Francois,
    I want to display values from my java code in the Forms..
    For that purpose only i am installing 10g Developer Suite..
    The below is java code..
    public class DBTest {
              public static String callDB(int id,String name){
              String ss="Hai";
              Connection con=null;
              try{
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   con = DriverManager.getConnection("url","id","pwd");
                   Statement st=con.createStatement();
                   System.out.println("Connected...");
              int r=st.executeUpdate("Insert into FORM_TEST VALUES('"+id+"','"+name+"')");
                   if(r==1){
                        ss="Inserted Sucessfully";
                   else{
                        ss="Insertion Failed";
              }catch(final Exception e){
              System.out.println(e);
              return ss;
         public static void main(String[] args) {
              int empid=102;
              String empname="Gilbert";
              String resultStr=callDB(empid,empname);
              System.out.println(resultStr);
    I want to dispaly Inserted or Insertion Failed in Oracle Forms..
    As per Gerd Volberg suggestion, i had placed DBTest.jar in
    E:\DevSuite\forms\java\DBTest.jar
    and in formsweb.cfg the below jar is added..
    archive_jini=frmall_jinit.jar,DBTest.jar
    But in Fomrs Builder-->Program-->Import Java Classes-->Oracle
    org,ice,com and subnodes are available.
    But my jar is not available..
    Is my way is coorect?
    Pls provide soln..
    Thanks

  • Calling unix script using oracle forms

    we have to call unix script using oracle forms , a trigger in form calls stored procedure on database
    that stored procedure on database calls a oracle shared library
    but since the only listener account for oracle on our unix server is oralist , whenever a call is made to the unix script from the oracle form , the unix script is executed by oralist user
    but issue that we are having now is since oralist is specific for listening connections from orale we dont want to use this user to establish SFTP on it to avoid any issues with oralist
    we want the sftp to be established on soem other useraccount , so is it possible to do something so that the script is executed by an account other that oralist.

    I'm not a Linux/Unix specialist, but I think this may work: let your database call a shell script that does a su command before running the actual script:
    su - other_account
    your_script.sh

  • Send Email from approval task form

    In my reusable workflow, I have added an approval action. Everything works perfectly. What I want is - When approver comes to approval form, he should be able to send notification email to the initiator (From that form) that he has started working on that document.
    What I have tried - I have added a button clicking on which will submit the form to initiator. 
    But it fails. possible reason - when I create a data connection in workflow's infopath form to submit form as email, I am getting following warning
    "Domain trust form templates cannot be sent as email attachments. to fix this problem, modify the form option to change the security level of form template to restricted".
    I also tried to update status field and wait for it to changes in workflow and send an email from sp designer workflow. it didn't work.
    Please help or suggest any other possible way to achieve this functionality (Send Email from approval task form to initiator).

    Hi mry,
    I could reproduce on my SharePoint 2013 on-premise based on your another
    post.
    Based on the the following article, SharePoint workflow cannot use the InfoPath form in restricted mode which doesn't allow the data connection, but as your image warning message shows sending InfoPath form as mail attachments will need restricted level.
    http://msdn.microsoft.com/en-us/library/office/ee526352.aspx
    You can consider to send a mail to initiator in "Whe a Task Completes" step when you click button approved/rejected, and construct the current task form link format as follow,
    http://sp/_layouts/15/WrkTaskIP.aspx?List=WorkflowTasksListGUID&ID=[%Current Task:ID%]
    Thanks
    Daniel Yang
    TechNet Community Support

  • Show the print dialog when running a report from an Oracle form.

    I would like to be able to print an Oracle report from an Oracle form but
    in addition show the print dialog. My PL/SQL code is shown at the bottom of this post.
    I have set the 'printjob' system parameter to 'YES' in the
    report and I can bring up a print dialog using the reports runtime.
    However, as soon as I run it from my form I lose this capability. Setting
    'printjob' to 'YES' in the code has no apparent effect.
    Many thanks,
    Ben
    -- Launch a report
    DECLARE
      v_pl_Id   paramlist; -- parameter list
    BEGIN
      -- add the parameters to the list.
      v_pl_id := CREATE_PARAMETER_LIST ('summary');
      ADD_PARAMETER (v_pl_id, 'destype', text_parameter, 'PRINTER');
      ADD_PARAMETER (v_pl_id, 'printjob', text_parameter, 'YES');
      -- run the report
      RUN_PRODUCT (
        reports
      , 'C:\Test Reports\Test.rep'
      , synchronous
      , runtime
      , filesystem
      , v_pl_id
      , NULL
    END;

    At 10g not 9i using a bean area on my canvas implementing the following class ...
    import java.awt.Frame;
    import java.awt.JobAttributes;
    import java.awt.PrintJob;
    import java.awt.Toolkit;
    import javax.swing.JPanel;
    import java.io.*;
    import oracle.forms.ui.VBean;
    public class Select_Printer extends VBean {
    public Select_Printer()
         super();
    public String getPrinterName()
    String PrinterName=null;
              JobAttributes jobAttributes;
              try{
                   jobAttributes = new JobAttributes();
                   jobAttributes.setDialog(JobAttributes.DialogType.NATIVE);
                   Frame dummyFrame = new Frame();
                   PrintJob pJobDialog = Toolkit.getDefaultToolkit().getPrintJob(
                   dummyFrame, "Printtest", jobAttributes, null);
                   PrinterName = jobAttributes.getPrinter();
              } catch (Exception e) {
                   System.out.println("Printer error!");
              return PrinterName;
    public static void main(String[] args)
    Select_Printer select_Printer = new Select_Printer();
    System.out.println(select_Printer.getPrinterName() );
    }

Maybe you are looking for