How to Check the report is Finished while calling a report from Forms 6i

Dear All,
I am Calling a report from oracle forms 6i, after runing report in " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"
I need to copy the pdf to store it in another place once the report is generated.
My Problem is : that i want ot Check first the report has generated after " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);" is executed ? How to check the report is generated ot not?
As i tried to use the below procedure after "Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"" but his does not work... nothing happens
{code}
PROCEDURE FPC_COPY_REPORT (p_report_name varchar2) IS
     repid REPORT_OBJECT;
     v_rep VARCHAR2(100);
     rep_status varchar2(20);
     lv_id varchar2(1000);
BEGIN
repid := find_report_object('AMTP_995.RDF');
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
     if rep_status = 'FINISHED' then
     message('Report Completed'); message('Report Completed');
     else
          message('Error when running report.');           message('Error when running report.');
     end if;
END;
{code}
Any Help

actually My code is this:
declare
     ln_alert          number;
     pl_id               ParamList;
     lv_report_name varchar2(10000);
     lv_path  varchar2 (100) := 'C:\';
     lv_shared_path  varchar2(1000);
     lv_copy_file varchar2(10000);
  cursor cr_dir_path IS
  select v_dir_path
  from md_directory
  where v_dir_code ='SHR';
  lv_file_name varchar2(1000);
BEGIN
  open cr_dir_path;
  fetch cr_dir_path into lv_shared_path;
  close cr_dir_path;
lv_report_name :=  lv_path||:fn_cntl.nb_ref_no||'_M08600000_'||to_char(sysdate,'YYYYMMDD-HHmmss')||'.pdf';
  if ffn_check_fields  THEN
     pl_id := Get_Parameter_List('LAI');
         IF NOT Id_Null(pl_id) THEN
             Destroy_Parameter_List( pl_id );
          END IF;             
          pl_id := Create_Parameter_List('LAI');
       if :fn_cntl.nb_report_name ='MMAT_REPORT'
            then
                 if :fn_cntl.nb_report_desc ='EXPORT'
                      then
                     Add_Parameter(pl_id, 'PARAMFORM',TEXT_PARAMETER, 'NO');
         Add_Parameter(pl_id, 'DESTYPE',  TEXT_PARAMETER,'File');
        Add_Parameter(pl_id, 'DESNAME',  TEXT_PARAMETER, lv_report_name);
        Add_Parameter(pl_id, 'DESFORMAT',TEXT_PARAMETER,'PDF');
        Add_Parameter(pl_id, 'p_mat_no',TEXT_PARAMETER, :fn_cntl.nb_mat_no);   
        Add_Parameter(pl_id, 'p_ref_no',     TEXT_PARAMETER, :fn_cntl.nb_ref_no);
        Add_Parameter(pl_id, 'p_verified_by',TEXT_PARAMETER, user);
                 Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);
      DECLARE     
           repid REPORT_OBJECT;     v_rep VARCHAR2(100);     rep_status varchar2(20);BEGIN
                     /* REP_OBJ= REPORT OBJECT CREATED UNDER REPORT NODE AT FORM */
         repid := find_report_object('MMAT_REPORT');      v_rep := RUN_REPORT_OBJECT(repid);
                    rep_status := REPORT_OBJECT_STATUS(v_rep);          
      if rep_status = 'FINISHED' then
          message('Report Completed');          message('Report Completed');
         --copy_report_object_output(v_rep,'c:\local.pdf');
         -- host('netscape c:\tlocal.pdf');     
     else          message('Error when running report.');
                                      message('Error when running report.');     
     end if;
             END;
     end if;
  end if;
       if :fn_cntl.nb_report_desc ='EXPORT'
            then
              error_handler('This report will be Storde in ' ||lv_report_name||' and '||lv_shared_path|| ' Location',3);
                 lv_copy_file :='copy '||' "'||lv_report_name||'" "'||lv_shared_path||'"';
                 host(lv_copy_file,no_screen);
              error_handler('Report Has been Generated Sucessfully.',3);
       end if;
    end if;
END;I will try first the another solution you have replied perviously... and will let you no the results... thanks a lot...

Similar Messages

  • How to get the own schema data while calling the other schema's Procedure

    Hello Experts,
    I'm Sanjit, new to OTN forum.
    I'm using Oracle 10g 10.1.0.2.0 database. Another user Sush has created one procedure proc_1 like
    create or replace procedure proc_1
    as
    v_total number;
    begin
    select sum(amt) into v_total from trans_master where dot
    between add_months(sysdate,-3) and sysdate;
    dbms_output.put_line('last three months total transactions is: '||v_total);
    end proc_1;
    He has the Trans_master table and having 280 records and I have the same Trans_master table with 430 records
    inserted in last 3 months. He has granted execute privileges on the procedure Proc_1 to me. When I call the procedure
    I cannot call it directly like my own schema procedures: Exec Proc1;
    I am calling like : Exec Sush.Proc1 to get the result. My issue is: when the procedure is called,
    it is accessing the data from the Sush schema Trans_master table with 280 records total, but I want
    the procedure to get the total amount of transaction of 430 records from my own Trans_master table.
    Please resolve my issue which would be a great help. And is there any way to call the procedure of other schema
    by not attaching the owner name of the object with it?
    Thanks
    Sanjit

    Pleast take a look at "Definer's rights and invoker's rights" in the following article:
    http://docs.oracle.com/cd/E11882_01/timesten.112/e21639/accesscntl.htm#BABDDCHC
    I guess you need to define a stored procedure with "invoker's rights".
    If this is what you are looking for will have to define it in the stored procedure that you are going to call.
    The syntax is as follows:
    create or replace procedure <yourprocedure> authid current_user ...
    ...or (the following is the default, you don't have to use the "authid definer" keywords):
    create or replace procedure <yourprocedure> authid definer ...
    ...hm

  • How to check the maximum Value and Last value in Reports CP column

    Hi all
    First of all i am sory that iam posting this question in forms instead of Reports....i had posted it in reports but no one reply and i need uirgent solution so I post here....
    My problem is that in Report I have calculated some values in CP column......Like
    :CP_Total := :Frieght * Rate ...etc
    Know i want to ask that how can I get the last value that will be return the by this column????and also the maximum value that it will return
    Thanks in advance
    Shayan
    [email protected]

    You mast build Summary column out of the query and select maximum to your maximum value of CP in Report level (or last for last value).

  • Error while calling web service from Forms 10g

    Hi,
    I have defined a web service and deployed at OracleAS 10g 10.1.2.0.2. Web services is working fine as per standalone invocation URL and also using a Web Service source in Portal (OmniPortlet).
    I have created a web service proxy and imported the JAR file into Forms module via Java Importer. Created a button to invoke a web service and show results on message bar.
    Code for WHEN-BUTTON-PRESSED:
    declare
         v_javaObject ora_java.jobject;
         xo ora_java.jobject;
         v_name varchar2(30);
         javaException ORA_JAVA.JOBJECT;
         v_BigDecimalObject ORA_JAVA.JOBJECT;
    begin
         v_javaObject := EmpServicePortClient.new;
         v_BigDecimalObject := BigDecimal.new(101);
         v_name := EmpServicePortClient.getName(v_javaObject,v_BigDecimalObject);
         message(v_name);
    exception
         WHEN ORA_JAVA.JAVA_ERROR THEN
    -- In this case, the error would be
    -- Argument 1 can not be null
    message(ORA_JAVA.LAST_ERROR,acknowledge);
    --Clean up
    ORA_JAVA.CLEAR_ERROR;
    WHEN ORA_JAVA.EXCEPTION_THROWN THEN
    javaException := ORA_JAVA.LAST_EXCEPTION;
    -- Print out the Exception by using the toString()
    -- Method of the exception Object
    message(Exception_.toString(javaException),acknowledge);
    -- and clean up
    ORA_JAVA.CLEAR_EXCEPTION;
    END;
    Forms got compiled successfully.
    However, while invoking a service by pressing a button, getting following error at message bar:
    java.rmi.RemoteException:; nested exception is: HTTP transport error: javaxml.soap.SOAPException: java.security.PrivilegedAction
    Is there anything that I have missed in the configuration? or what else is causing it?
    Regards,
    Preet

    Hi,
    I have defined a web service and deployed at OracleAS 10g 10.1.2.0.2. Web services is working fine as per standalone invocation URL and also using a Web Service source in Portal (OmniPortlet).
    I have created a web service proxy and imported the JAR file into Forms module via Java Importer. Created a button to invoke a web service and show results on message bar.
    Code for WHEN-BUTTON-PRESSED:
    declare
         v_javaObject ora_java.jobject;
         xo ora_java.jobject;
         v_name varchar2(30);
         javaException ORA_JAVA.JOBJECT;
         v_BigDecimalObject ORA_JAVA.JOBJECT;
    begin
         v_javaObject := EmpServicePortClient.new;
         v_BigDecimalObject := BigDecimal.new(101);
         v_name := EmpServicePortClient.getName(v_javaObject,v_BigDecimalObject);
         message(v_name);
    exception
         WHEN ORA_JAVA.JAVA_ERROR THEN
    -- In this case, the error would be
    -- Argument 1 can not be null
    message(ORA_JAVA.LAST_ERROR,acknowledge);
    --Clean up
    ORA_JAVA.CLEAR_ERROR;
    WHEN ORA_JAVA.EXCEPTION_THROWN THEN
    javaException := ORA_JAVA.LAST_EXCEPTION;
    -- Print out the Exception by using the toString()
    -- Method of the exception Object
    message(Exception_.toString(javaException),acknowledge);
    -- and clean up
    ORA_JAVA.CLEAR_EXCEPTION;
    END;
    Forms got compiled successfully.
    However, while invoking a service by pressing a button, getting following error at message bar:
    java.rmi.RemoteException:; nested exception is: HTTP transport error: javaxml.soap.SOAPException: java.security.PrivilegedAction
    Is there anything that I have missed in the configuration? or what else is causing it?
    Regards,
    Preet

  • Error while calling BI Publisher from Forms 10g using Webservice - Urgent !

    Hi,
    I am calling a BI Publisher(10.1.3.4.1) webservice from the Forms 10g (10.1.2.0.2). I developed a jar file which works fine when I run from the Jdeveloper. I have successfully attached jar file to the Forms 10g but when I am calling from the when-button-pressed trigger I am getting beow error
    Exception: java.lang.Exception: java.lang.NoSuchMethodError: oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.setPreemptiveBasicAuth(Z)V
    Thanks in advance

    What steps did you follow to successfully attached jar file to the Forms 10g? To me, it sounds like you don't have your .jar file configured with Forms Builder and/or your App Server. Your .jar file needs to be added to the FORMS_CLASS_PATH in the default.env and the FORMS_CLASS_PATH registry entry. You will likely need to modify the formsweb.cfg also to include your .jar in the archive= or archive_jini= variables (depending on your JRE [Jinitiator or Sun JRE respectively]).
    It could also be a dependency on an additional Java library. Is "setPreemptiveBasicAuth" a method that you created or it is a dependent method from an additional library?
    Let us know this; as well as which Java version you're using.
    By the way, with respects to your "Urgent!" request. You have to understand that forum contributers are purely voluntary - this is not our full-time job. If your issue is truely urgent, it is always best to open a Service Request (SR) with Oracle Support than to rely on the forum for an urgent reply! ;-)
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Sep 20, 2010 2:48 PM

  • How to check the last time a package has been compiled?

    How to check the last time a package has been compiled from sqlplus?

    LAST_DDL_TIME column in DBA_OBJECTS.

  • How to check the report builder version from the rdf file

    Hi,
    I have a rdf file but I don't the developer using which version of report builder to develop the rdf file. So, does anyone knows how to check the rdf file is developed by which version of report builder?
    When I try to use the notepad to open the rdf file, it shows the string "ROS.60050". So, does it means that the rdf file is developed by Oracle report 6i?
    Besides, do anyone knows if Oracle report 6i are still offer from Oralce (as I know, the latest verison of oracle report is 11g). So, in case Oralce not offer oracle 6i and I need to buy oracle report 11g, do u know it is compatiable or I need to do the migration from 6i to 11g?
    Thanks!

    Hi,
    The ROS version you are seeing in the RDF file does not mean the version where that RDF was developed. I am not aware of a way to check this but something that may help is that when you try to open a RDF developed in a higher version
    of Reports with a lower version of Reports builder the following warning will be displayed
    Warning. Opening a report saved with a newer version of Reports Builder.
    Functionality may be lost. Continue?
    "You tried to open a report with a version of Reports Builder older than the version used to
    create the report. If the report uses functionality unavailable in the older version, that
    functionality will be eliminated from the report.
    Regarding Oracle Developer 6i. This version is not supported any more. Regarding how to upgrade Reports 6i to 11g and what to have in mind during the upgrade please review the following documentation.
    References
    http://docs.oracle.com/cd/E24269_01/doc.11120/e24478/toc.htm
    How To Migrate Forms and Reports From 6i and/or 9i To 11g? (Doc ID 1275515.1)
    Hope it helps.
    Regards, RZ

  • How to check the Conditional transition while submit the jsp as screenflo

    Hi All,
    I want to know that how to check the conditional transition, which result is used to decide the next Activity while submit the JSP as Screen Flows
    Edited by bpmvasu at 03/27/2007 11:14 PM

    Hi,
    Unlike BPM Object Presentations where the 'selectedButton' is automatically assigned to the predefined screenflow 'result' variable, when using JSP Persentations you need to do the mapping yourself (I don't think there is a way around this).
    Assuming you're using a JSP Presentation with a Fuego Object Interactive Call, click the 'Advanced' button at the bottom of the Main Task dialog.
    Select the 'showOut' argument set, add a new argument mapping. Select 'result' from the Screenflow's instance variables and map it to 'parameters["paramName"]'. Where paramName is the name of the HTML submit input element in your JSP.
    Hope this helps,
    Tim

  • How to fix the first field or column in classical report while scrolling

    i want to know, how to fix the first field or column in classical report while scrolling
    horizontally. the first  should be constant when i scroll the report horizontally .
    please help me.
    it's urgent.

    Hi,
    Suppose your first field is itab-matnr.
    WRITE :/ itab-matnr.
    SET LEFT SCROLL-BOUNDARY.
    WRITE :/......."Remianing fields

  • How to check the code of spawned report

    Hi All,
    I've to modify a standard report from PA module.The report name is "PRC: Distribute Usage and Miscellaneous Costs"
    The executable method is SPAWNED.The executable name is PASDUC.
    Please let me know how to check the code of this report and in which path can I locate the report.
    Regards,
    Mahi.

    Does this mean can I tell to my client that "This is being a spawned program, any customizations to this report needs full report development efforts"?I believe yes.
    Before I state this to my client I want to verify with this forum. Please suggest me in either case.Would your client trust my reply on here :) ?
    I would suggest you log a SR and confirm this with Oracle support, that would be a better proof.
    Thanks,
    Hussein

  • ALV .  How to remove the sort buttons on toolbar in ALV report?

    Hi,experts
      As you know, in default case , the alv report will display two sort buttons(ascending ,descending) on its toolbar , So How to remove the sort buttons on toolbar in ALV report?
      Thanks for your help .

    Hi guixin,
    1. Before calling REUSE_ALV_LIST_DISPLAY
    2. Write this code :
    data : excl type SLIS_T_EXTAB.
    data : exclwa type SLIS_EXTAB.
    exclwa = '&OUP'.
    append exclwa to excl.
    exclwa = '&ODN'.
    append exclwa to excl.
    3. Then while calling the FM,
       pass this parameter also .
    IT_EXCLUDING     = excl
    It will work fantastic.
    regards,
    amit m.

  • How to check the form name in S_P00_07000134

    hi all,
    could you please tell me how to check the form name when get the print preview using T-code S_P00_07000134. i tried to active SE71, but when executing S_P00_07000134, click on print preview, it doesn't go to debugging.
    please help me with the issue, thanks a lot.
    regards,
    eric

    Have you looked in the IMG menu path: Financial Accounting > Financial Accounting Global Settings > Withholding Tax > (either Withholding Tax or Extended Withholding Tax) > Generic Withholding Tax Reporting > Define Output Groups.
    View the output group used in the S_P00_07000134 selection screen.  In the Printouts section, Printout 1 and Printout 2 have smart forms identified, either Smart Form or PDF form types.

  • How to check the user hits to the sites (most often,frequently used sites) in sharepoint 2010?

    HI,
    How to check the user hits to the sites (most often,frequently used sites) in sharepoint 2010?
    could you please help on the above?

    Hello Sudhir muvva,
    Just to be sure, the default Web Analytics reports don't meet your requirements?
    http://blogs.msdn.com/b/ecm/archive/2010/03/21/introducing-web-analytics-in-sharepoint-2010.aspx
    Does reports have subjects like top pages and number of page views.
    - Dennis | Netherlands | Blog |
    Twitter

  • How to check the material consumption using tables

    Hi,
    I would like to know how to generate or view the material consumption at table level. Can anyone please specify the transactions codes and tables names how to check the consumption of material. I also like to know how to analysis the consumption of material between components and finished material. Please provide me the step by step wise how to do.Thanking you
    Regards,
    Sivaji Kumar Madhu Kiran

    You can calculate material consumption in table MSEG. you will need to segregate the material documents based on movement types and then add or reduce the quantities of each material document. for example a material document with movement 101, add the quantity for the material, and when there is a issue material document like 201 or 221 reduce the quantity from the material stock.

  • How to highlight the repeated records in a BO crystal report?

    Hi ,
    How to highlight the repeated records in a BO crystal report?
    we want to highlight the rows for which account number is same.
    thanks
    sriram

    You don't even need to create a group.  Just sort the records on the fields that define "duplicate".  Then you can just use
    if {field} = PreviousValue({field}) then crYellow else crNoColor
    in the format's Background Color formula.  This will cause the background to be yellow on duplicates.  (If you need to check more than one field in order to determine duplicates, just insert
    and {field2} = PreviousValue({field2}
    and so on for each field that needs to be checked.
    HTH,
    Carl

Maybe you are looking for

  • How to make jar files availabe for deployed EJBs

    Hi, I'm interested on how to make jar files availabe for deployed EJBs. My EJB is packed in an ear. It uses a util jar. I now just add the jar to the classpath, but I think that shouldn't be the way. Is there somthing in the admin console to make jar

  • Home Hub 5

    My first post so please forgive any etiquette faux-pas. I have the above and have 2.4Ghz and 5Ghz as separate SSID. Connectivty to internet is flaky; so a device can see the SSID and connect but provides no internet access yet switching to the other

  • Possible for deducting TDS for a item ?

    hi all, Whether it is possible to deduct TDS for a item in ap invoice ? If yes, How to do it ? Jeyakanthan

  • Report to report  by RSBBS

    Hi  experts, I created Sender/Receiver assignment from query'A'  to query'B'  using RSBBS. I found that I even can't find  item 「jump」  at rightclick menu  in report 1 generated by 'A', but in report 2 generated by 'B', I  jumped  to report 1 with it

  • Adding a collection to a VO

    Using JDeveloper 11g PS2 I have a VO called Dossiers which has some attributes from the dossiers table... I also have a content repository with documents. Each dossier has multiple documents attached to it. I can use a java api to access the content