Problem calling a report from Forms

Hi,
I am currently trying to upgrade our Forms and Reports from 6.0 to 10g. I created a simple form and a simple report and I called the report from the form (passing no parameters) and report was generated fine. Now I'm looking at one of our existing forms and I've complied them in 10g. This time I'm passing a parameter and the report is failing. If I run the report on its own with the same parameter it works fine. I am using the Run_report_object builtin.
The error I get is the 41214:Unable to run report. The weird thing about this is if I pass in a bogus parameter (not valid in the database), the report will execute fine and I will get a page saying that No Data was Found (text displays when nothing was returned from the query). However, whenever I pass in a good parameter (Data should be returned), the report do not execute and I get the error. So, I updated the database to have the bogus parameter and then when I passed in the bogus parameter again, this time it failed. So it looks like that when data is coming back from the query in the report, I get the error. I'm connected to the same database that was used in the simple example stated above that returned data.
Does anyone have any idea what could be causing this? Let me know if more information is needed.
Thanks,
Karen

You can check the reports queue for error messages to see what the error actually is.
http://server:port/reports/rwservlet/showjobs?server=repsever

Similar Messages

  • CALLING A REPORT FROM FORMS (PROBLEM)

    MY PROBLEM IS THE NEXT:
    I CREATED A MASTER-DETAIL REPORT CALLING 'ASUNTOS'WITH THE NEXT QUERY:
    SELECT ABOGADOS.APELLIDO_P,ABOGADOS.APELLIDO_M,ABOGADOS.NOMBRES,
    ASUNTOS.EXP_INT,ASUNTOS.MATERIA,ASUNTOS.GERENCIA,
    ASUNTOS.EMPRESA,ASUNTOS.RECLAMA,ASUNTOS.PESOS,
    ASUNTOS.DOLARES
    FROM ABOGADOS,ASUNTOS
    WHERE ABOGADOS.FICHA = ASUNTOS.F_ABOG
    AND ASUNTOS.F_ABOG = :ABOGADO ;
    -- ABOGADO = PARAMETER.
    THIS REPORT WORKS FINE THE PROBLEM IS WHEN I TRY CALL THIS REPORT FROM FORM I'VE USE A BUTTON(WHEN_BUTTON_PRESSED) WITH THE NEXT CODE:
    DECLARE
    LISTA PARAMLIST := GET_PARAMETER_LIST('ABOG');
    BEGIN
    IF ID_NULL(LISTA) THEN
    LISTA := CREATE_PARAMETER_LIST('ABOG');
    ADD_PARAMETER(LISTA,'DESTYPE',TEXT_PARAMETER,'PRINTER');
    ADD_PARAMETER(LISTA,'DESNAME',TEXT_PARAMETER,'LPT2');
    ADD_PARAMETER(LISTA,'ABOGADO',TEXT_PARAMETER,TO_CHAR(:ASUNTOS.F_ABOG));
    -- ADD_PARAMETER(LISTA,'PARAMFORM',TEXT_PARAMETER,'YES');
    END IF;
    RUN_PRODUCT(REPORTS,'ASUNTOS',SYNCHRONOUS,RUNTIME,FILESYSTEM,LISTA,NULL);
    END;
    BUT THE REPORT NOTHING DISPLAY.
    THERE ARE SOMETHING WRONG WITH THE CODE IN THE BUTTON

    Roberto,
    Does your report work when it is not called from Forms?
    try the following:
    [TOOLS_HOME]\BIN\RWRUN60 module=ASUNTOS destype=screen userid=<username>/<password>@<tns> ABOGADO=<some_valid_code>
    where TOOLS_HOME is the directory where Reports is installed.
    I can see nothing wrong with your code.
    Maybe some error in the query?
    Also, I would check for the existence of multiple ASUNTOS report definitions. Maybe Forms is calling an older one.
    Hope this helps,
    Pedro das Neves
    ([email protected])

  • Calling a report from Form 6i

    Hi,
    I want to call a report from Form 6i at run time. And I write the following code in When Buttton Press trigger . when I press the button it will gives no response.
    declare
         x report_object;
         y varchar2(100);
    begin
         x:=find_report_object('billform');
         y:=run_report_object(x);
    end;
    for more information , path of my report is: C:\REP\billform.rdf
    please send me the solution of this problem
    E_mail: [email protected]
    Shahzad

    hi,
    now i am using the following code in when button press trigger. if u give me ur e_mail address i will send u FMB and RDF files used for Scott/tiger EMP table for the sample.
    declare
    repo_Para     ParamList;
    BEGIN
    repo_Para:=Get_Parameter_List('Report_para');
    IF not Id_null(repo_Para) THEN
         destroy_parameter_list(repo_para);
    end if;
    repo_Para:=Create_Parameter_List('Report_para');
    Add_Parameter(Repo_para,'PARAMFORM',TEXT_PARAMETER,'No');
    Add_Parameter(Repo_para,'MAXIMIZE',TEXT_PARAMETER,'Yes');
         Add_Parameter(Repo_para,'BDATE',TEXT_PARAMETER,:BLOCK3.a_dptno);
         Add_Parameter(Repo_para,'EDATE',TEXT_PARAMETER,:BLOCK3.b_dptno);
         RUN_PRODUCT(REPORTS,'c:\apu\DDATE.rep', SYNCHRONOUS,
              runtime, FILESYSTEM,Repo_para,NULL);
    end;
    BDATE & EDATE are two user parameters created in report.
    when i press the button in form pass parameters the report will be called but no data will be display but when i directly run reprot from report buider and pass same values of BDATE & EDATE it will show data.
    please give me ur e mail address or help me for this problem
    best regards,
    shahzad

  • Calling a report from forms with a paramter form

    Hello,
    How do you call a report from forms and get it to display the parameter form. Where you can then call the report using this parameter form. I have been using paramform=yes. but it simply runs the form.
    I saw on a a thread ages ago that this was a sample of this available for download. Is this true?
    thanks

    Here is my code sorry about posting twice. Please note that the parameter list has been created as described.
    report_id := find_report_object('MENU_REPORT_NODE');
    Tool_Env.Getvar('ReportsServer', reports_server);
    Tool_Env.Getvar('ReportsFolder', reports_folder);
    dest_file := reports_folder || :global.username || '\' || rep_name || '.pdf';
    SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_FILENAME, rep_name);
    SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_SERVER, reports_server);
    SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_COMM_MODE, SYNCHRONOUS); -- wait for the report to finish
    -- SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESNAME, dest_file);
    SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESTYPE, cache);
    SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESFORMAT, 'PDF');
    SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_OTHER, 'paramform=yes' || ' ' || 'mode=bitmap');
    report_job := run_report_object(report_id);

  • Problem in Calling a report from form 6i using parameters

    Hello Oracle experts,
    I am facing a problem while calling a report using form 6i and passing parameters,
    Actually the problem is I want to use the parameters passed to reports in a
    query group in my report. I am not able to use the parameters passed by form to report in one of my query groups in report. Could anybody guide my how to use it.
    Thanks

    Hello Oracle experts,
    The parameters are getting passed successfully in my report.
    But I want to know hous to use it in my query group.
    I just want the syntax.
    Thanks

  • Calling a report from forms

    Hello
    i have a problem with calling a report from a form.
    i use the following statement in the when-button-pressed trigger:
    Run_Product(REPORTS, report.rdf',ASYNCHRONOUS, RUNTIME,FILESYSTEM, '', null);
    in the reports background engine i get the error
    REP-0110: Unable to open file 'report.rdf'.
    REP-1070: Error while opening or saving a document.
    REP-0110: Unable to open file 'report.rdf'.
    End report report [Mon Nov 25 12:30:40 2002].
    the file report.rdf is in the same folder as the form calling it
    where is the problem
    thanks
    Marjan

    Hi Marjan,
    The problem seems to be that the report is not in a directory
    listed in the reports60_path. Add the directory into your reports60_path
    and check if it solves the problem.
    Best Regards
    Chandra Mohan

  • 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...

  • Help me in using RUN_PRODUCT to call a report from form

    Hi GURUs
    I am trying to call a report from a form.
    I enter hiredate as input parameter in the form and click the 'run report' button.
    The hiredate value will be sent to report via pl_id, TEXT_PARAMETER,:CTL.TXT_DT as shown below in when button pressed trigger
    DECLARE
    pl_id ParamList;
    BEGIN
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id,'HRDATE',TEXT_PARAMETER,:CTL.TXT_DT);
    Run_Product(REPORTS, 'C:\empreport.RDF', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END;
    Coming to report side its a simple query select * from emp where trunc(hiredate) > trunc(:hrdate);
    I created 'hrdate' user parameter in the report
    The problem is when I run the form it calls report and shows the report parameter form with the carried value. now I have to run report again.
    How do I supress this paramenter form because when I am sending value from form I dont have to see the parameter form at the report.
    I dont know how to use paramform = no with RUN_PRODUCT
    Please tell me what to do it....
    Thanks

    Looking at the Forms documentation it specifies, "To run a report from within a form, you must use the dedicated report integration built-in RUN_REPORT_OBJECT." The RUN_PRODUCT built-in is used to run the Graphics product. I suggest you give RUN_REPORT_OBJECT a try. This is how we call a report from a form.
    Hope this helps.
    Craig...

  • Simplest Way 2 Call a report from Forms 10g

    Hello,
    i am using Oracle 10g & tools 10g too,
    What i am trying to do is to call a report from a form...
    So one friend told me 2 use a library exists in Folder Forms90 called " rp2rro"on the installed developer10g tools,i am using the following code :
    ============================================
    Begin
    PARAM_ID := GET_PARAMETER_LIST(PARAM_NAME);
    IF NOT ID_NULL(PARAM_ID) THEN
    DESTROY_PARAMETER_LIST('REPORT_PARAMETER');
    END IF;
    PARAM_ID := CREATE_PARAMETER_LIST(PARAM_NAME);
    ADD_PARAMETER(PARAM_ID,'PARAMFORM',TEXT_PARAMETER,'NO');
    ADD_PARAMETER(PARAM_ID,'COPIES',TEXT_PARAMETER,:COPIES);
    ADD_PARAMETER(PARAM_ID,'P_DISPLAY',TEXT_PARAMETER,:DESTYPE);
    ADD_PARAMETER(PARAM_ID,'DESFORMAT',TEXT_PARAMETER,'pdf');
    ADD_PARAMETER(PARAM_ID,'P_DATA_TYPE',TEXT_PARAMETER,:PERIOD_MONTH);
    ADD_PARAMETER(PARAM_ID,'P_MATERIAL_CODE',TEXT_PARAMETER,:MATERIAL_DESC);
         ADD_PARAMETER(PARAM_ID,'P_DATE_FROM',TEXT_PARAMETER,:DATE_FROM);
         ADD_PARAMETER(PARAM_ID,'P_DATE_TO',TEXT_PARAMETER,:DATE_TO);
         ADD_PARAMETER(PARAM_ID,'MONTH_ID',TEXT_PARAMETER,:MONTH_ID);
         ADD_PARAMETER(PARAM_ID,'FIN_YEAR_CODE',TEXT_PARAMETER,:FIN_YEAR_CODE);
    rp2rro.rp2rro_run_product(REPORTS,'Report_name',SYNCHRONOUS, RUNTIME, FILESYSTEM, PARAM_ID, NULL);
    END;
    The problem is that i am receiving many errors as:
    frm-41219:Can't find report invalid id
    frm-47023:No such parameter named rp2rroDesformat exist in form my_form_name
    frm-40105:Unable 2 resolve reference to item parameter.rp2rrodesformat
    can any kind guy help me pls it's urgent i have no time 2 even read a document 4 it pls help me..!!??
    Regards,
    Abdetu..

    Hi Abdetu,
    Here is a procedure and simple call of the procedure witch Iam using successfully now.
    PROCEDURE INVOKE_REPORT
         url_and_server in VARCHAR2,
         file_name in VARCHAR2,
         des_type in NUMBER,
         des_name in VARCHAR2,
         des_format in VARCHAR2,
         param_list in PARAMLIST
    IS
         l_report_id REPORT_OBJECT := FIND_REPORT_OBJECT('QMSREP');
         l_report_job_id VARCHAR2(100);
         l_userid VARCHAR2(200) := GET_APPLICATION_PROPERTY(USERNAME) || '/' ||
         GET_APPLICATION_PROPERTY(PASSWORD) || '@' ||
         GET_APPLICATION_PROPERTY(CONNECT_STRING);
         l_report_url VARCHAR2(200) := substr(url_and_server, 0, instr(url_and_server, ',') - 1);
         l_report_server VARCHAR2(100) := substr(url_and_server, instr(url_and_server, ',') + 1);
         l_vcStatus VARCHAR2(100);
         l_vcJob VARCHAR2(100);
    BEGIN
         SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_COMM_MODE, ASYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_EXECUTION_MODE, RUNTIME);
         SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_SERVER, l_report_server);
         SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_FILENAME, lower(file_name));
    SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_DESTYPE, des_type);
         SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_DESNAME, des_name);
         SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_DESFORMAT, des_format);
         SET_REPORT_OBJECT_PROPERTY(l_report_id, REPORT_OTHER, 'paramform=no userid='||l_userid);
         -- invoke the report (currently we don't use the returned ID)
         l_report_job_id := RUN_REPORT_OBJECT(l_report_id, param_list);
         l_vcstatus := Report_Object_Status(l_report_job_id);
         l_vcJob := substr(l_report_job_id, instr(l_report_job_id ,'_', 1 , 3 ) + 1);
         WHILE l_vcstatus in ('RUNNING','OPENING_REPORT','ENQUEUED')
         LOOP
         l_vcstatus := Report_Object_Status(l_report_job_id);     
         END LOOP ;
         if l_vcStatus = 'FINISHED' then
         Web.Show_Document('http://'||l_report_url||'/reports/rwservlet/getjobid'||l_vcJob||'?server='||l_report_server,'_blank');
         else
              message('Failed - Status was :'||l_vcStatus);
         end if;
    END;
    INVOKE_REPORT ('172.198.1.1:7777,rep_SRV'
                                            ,'MYREP.RDF'
                                            ,cache
                                            ,'htmlcss'
                                            ,l_par_list_id
    hope this helps,
    Alireza

  • Call Oracle Reports from  Forms ver 9i or 10g

    Hi,
    Can somebody guide me, how to call Oracle Reports from the Oracle form 9i,
    Run_product is no more available into 9i & 10g, Run_report_object is not working with out put type "Screen" or "preview".
    What is the best way to call the reports from the form ??? pls help...
    Thanks in avdance.
    Jitesh ([email protected])

    You can use RUN_REPORT_OBJECT with CACHE type, and WEB.SHOW_DOCUMENT to view the document on the screen.
    In the Forms help you should find examples.
    If you have access to Metalink, have a look at Note:207396.1.

  • Calling a Report from Form in 10g

    Hi all,
    I am very new to Oracle Form builder, I wana to call a report from a Form.
    we are using Oracle 10g Developer suit.
    Can any body please help me regarding on this?
    Regards
    Tanmaya Pradhan(Tam)

    ..or
    Take a look at
    Re: Run Report10g  Through form 10g

  • Problem in running report from forms 6i..........!

    hi all,
    I am working in oracle forms 6i and i am trying to run report from
    form while press one of the push-button. works fine upto 2nd line from the
    begin key-word.After that its showing error like " FRM-40738:Argument 1 to builtin
    REPORT_OBJECT_STATUS cannot be null.". Can any-one help me of how to solve this and
    wat would be the problem.........?
    declare
         run_rep varchar2(200);
         rep_obj report_object;
         rep_stat varchar2(20);
    begin
         rep_obj := find_report_object('report46');     
         run_rep := run_report_object(rep_obj);     
         rep_stat := report_object_status(run_rep);
         if rep_stat = 'FINISHED' then
         copy_report_object_output(run_rep, 'C:\Documents and Settings\trainee\Desktop\Icons\test.pdf');
         else
              message('error when running report');
         end if;     
    end;
    Please help asup!
    regards,
    jame

    hi rosario,
    Thanks for ur reply. My requirement is, I want to generate pdf file from the report output. so i wrote the following code which is taken from d2k documentation. Problem area has been highlighted in bold.
    declare
    run_rep varchar2(200);
    rep_obj report_object;
    rep_stat varchar2(20);
    begin
    rep_obj := find_report_object('report46');
    run_rep := run_report_object(rep_obj);
    rep_stat := report_object_status(run_rep);
    if rep_stat = 'FINISHED' then
    copy_report_object_output(run_rep, 'C:\Documents and Settings\trainee\Desktop\Icons\test.pdf');
    else
    message('error when running report');
    end if;
    end;
    Report is running but while coming to report_object_status. complior shows error like "FRM-40738:Argument 1 to builtin REPORT_OBJECT_STATUS cannot be null". Parameter for report_object_status is null, i dont know y it is null because report is running. If report is running means,then there must be some values in run_rep.
    why complior doesnt find the values from run_rep.......???
    regards,
    jame

  • Problem with output from  report to excel, calling the report from form 10g

    Hi everyone, I'm having a problem generating a excel from a report, which is called from a form, I'm using Forms 10g. The problem is this: My report has a variable number of columns. These columns appear according to data obtained from the database, these columns are dates, In vesion 6 excel file generated shows the columns one after another starting in column A1 to column CP. I mean that the dates are correlative. But in version 10g the excel file generated shows the same report starting in column A to column T, only shows the 20 dates correlative corresponding to this columns, the rest of the dates are down the excel sheet in groups of 20 dates, it's something, the file in 6i grows across and in 10g grows down the excel sheet. The report (rdf file) is the same in 6i and 10g, I compiled the 6i version to obtain the 10g version. The excel sheet generated in 10g looks like the report was in pdf format, because PDF format, cuts the report in pages and the file grows down, if I generate the report in PDF format it has the same structure excel file in 10g has. I hope yo can help because I have days trying to solve this but I have no succes. If someone could help I could email the excel files generated in two versions. Here I put the code I use to generate the files in 6i and 10g. I have tried with DESFORMAT=SPREADSHEET in 10g but the result is the same. Thanks for your help. Greetings for all.
    Code for version 6i (Works Very well)
    PROCEDURE GUARDAREXCEL IS
    pl_id ParamList;
    nom_rep varchar2(20);
    cla_rep varchar2(20);
    cod_dis varchar2(4);
    nom_arch varchar2(100);
    fec date;
    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');
    IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
    cod_dis := :BK_PARAMETROS.LI_COD_DIS;
    END IF;
    IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
    ELSE
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
    :BK_PARAMETROS.TI_COD_CLI:='%';
    END IF;
    IF :BK_PARAMETROS.CLAS_REP=1 THEN
    cla_rep := '001';
    ELSE
         IF :BK_PARAMETROS.CLAS_REP=2 THEN
              cla_rep := '002';
         ELSE
              IF :BK_PARAMETROS.CLAS_REP=3 THEN
              cla_rep := '003';
         ELSE
              cla_rep := '004';
         END IF;
         END IF;
    END IF;
    Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
    Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
    Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
    Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );
    select sysdate into fec from dual;
    IF :BK_PARAMETROS.TIPO_REP=1 THEN
         BEGIN
    nom_rep := 'tdvenrli1577.rep';
    nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
    END;
    ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
              BEGIN
              nom_rep := 'tdvenrli1578.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              END;
    ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
         BEGIN
                        Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');           
              nom_rep := 'tdvenrli1576.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';      
              END;
    ELSE
              BEGIN
                        nom_rep := 'TDVENRLI1545.REP';
              nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              END;
    END IF;
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
    Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
    standard.commit;
    Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
    EXCEPTION WHEN Run_Product_Failure THEN
    message('Error');
    END;
    Code for version 10g
    PROCEDURE GUARDAREXCEL IS
    pl_id ParamList;
    nom_rep varchar2(20);
    cla_rep varchar2(20);
    cod_dis varchar2(4);
    nom_arch varchar2(100);
    fec date;
    --byt12122007.sn
    repid REPORT_OBJECT;
         vURL VARCHAR2(500);
         rep_status VARCHAR2(20);
         vJobID VARCHAR2(100);
         v_rep VARCHAR2(100);
    VAR NUMBER;
    w_name_repserv VARCHAR2(30);
    --byt1212007.en
    BEGIN
         --w_name_repserv:=F_OBTIENE_SERVREP;
    w_name_repserv:='repserv';     
    pl_id := Get_Parameter_List('mytmp_params');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('mytmp_params');
    IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
         cod_dis := :BK_PARAMETROS.LI_COD_DIS;
    END IF;
    IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
    ELSE
    Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
    :BK_PARAMETROS.TI_COD_CLI:='%';
    END IF;
    IF :BK_PARAMETROS.CLAS_REP=1 THEN
    cla_rep := '001';
    ELSE
         IF :BK_PARAMETROS.CLAS_REP=2 THEN
              cla_rep := '002';
         ELSE
              IF :BK_PARAMETROS.CLAS_REP=3 THEN
              cla_rep := '003';
         ELSE
              cla_rep := '004';
         END IF;
         END IF;
    END IF;
    Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
    Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
    Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
    Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    /*Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
    Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );*/
    select sysdate into fec from dual;
    IF :BK_PARAMETROS.TIPO_REP=1 THEN
    BEGIN
         repid := find_report_object('tdvenrli1577');
    --nom_rep := 'tdvenrli1577.rep';
    nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1577');
    END;
    ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
    BEGIN
         repid := find_report_object('tdvenrli1578');      
              --nom_rep := 'tdvenrli1578.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1578');
              END;
    ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
    BEGIN
         repid := find_report_object('tdvenrli1576');
                        Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');           
              --nom_rep := 'tdvenrli1576.rep';
              nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1576');     
              END;
    ELSE
    BEGIN
         repid := find_report_object('tdvenrli1545');
                        --nom_rep := 'TDVENRLI1545.REP';
              nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
              SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1545');     
              END;
    END IF;
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
    --Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
    standard.commit;
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESNAME,nom_arch);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, RUNTIME);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, 'File');
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, 'DELIMITED');
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_SERVER, w_name_repserv);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER, 'paramform=no');
         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);
         END LOOP;
         IF rep_status = 'FINISHED' THEN
              vJobID := SUBSTR(v_rep, INSTR(v_rep, '_', -1)+1);
              vURL:='/reports/rwservlet/getjobid'||vJobID||'?'||'server='||w_name_repserv;
         END IF;
         WEB.SHOW_DOCUMENT(vURL, '_blank');
         IF NOT form_success THEN
              MESSAGE('Error: PL/SQL held against Button failed to execute');
              RAISE FORM_TRIGGER_FAILURE;
         END IF;
    /*Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
    EXCEPTION WHEN Run_Product_Failure THEN
    message('Error');*/
    END;

    There are two problems with your VI.  First, the basic logic of writing/appending to a file (Excel, TDMS, anything) should go something like this:  Open the file, position yourself at the end of the file, then, in the loop, acquire data and write it to the file until you are finished with data acquisition.  When you exit the acquire/write to file loop, then close the file.  In particular, the opening and the closing of the file should not be inside the loop.
    As others have pointed out, writing to Excel might not be optimal, particularly if you are acquiring data at a high rate (and would therefore be writing a lot of data). We actually use Excel in our data acquisition routine, mainly reading from a WorkSheet to get the parameters of a particular stimulus, but also writing the outcome of the response to the stimulus.  As it happens, our "acquisition rate" in this example is on the order of several samples per minute, so there's no problem using Excel (we also sample 16 channels of analog data at 1 KHz -- this gets written as a binary file).
    Second, if you really do want to use Excel, use the (existing) Excel file to which you want to append as the "template" argument of the New Report function.  Then use the Excel Get Last Row function to position yourself at "end of file", as noted above.
    Good Luck.
    Bob Schor

  • 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,

  • 10g Migration Problem: error shown when trying to call a report from form

    Dear Friends,
    I am working on migrating developer 2000 forms to 10g forms. I am using migration tool for this. Everything is going fine except calling report from a form.
    Say, in the original form I had the following:
    RUN_PRODUCT(REPORTS,’ C:\test1.rdf’,SYNCHRONOUS,RUNTIME,FILESYSTEM,pi_id,NULL);
    After migration its has become:
    rp2rro.rp2rro_run_product(REPORTS, ’ C:\test1.rdf’,SYNCHRONOUS,RUNTIME,FILESYSTEM,pi_id,NULL);
    Then, I have kept the report ‘test1.rdf’ in the ‘OraHomeAS\reports\samples\demo\’ location and changed the above code into:
    rp2rro.rp2rro_run_product(REPORTS,'test1.rdf',SYNCHRONOUS,RUNTIME,FILESYSTEM,pi_id,NULL);
    Now the form runs fine on application server but it can’t call the report. While attempting to call the report, it shows the following error:
    ORA-06508
    FRM-40735
    Please note that the report ‘test1.rdf’ individually runs fine on the application server and at the time of migration I provided all the information (e.g. report server name) correctly. If I am missing any package, please tell which package I am missing and where should I paste it.
    Please help me because I am very close to the deadline!
    Rgds,
    Luther

    Hi,
    The conversion to use the rp2rrp call needs a library to resolve the call which I think is called rp2rro.pll.
    It seems that this library is not being found at run time, which is what the ora-06508 error often means.
    I guess that you have compiled the form and must therefore have the pll to compile, so it is the forms_path setting in the app server run time that might not be set.
    Look at the environment file (default.env is the original name for this, if you haven't created a custom one) for the entry FORMS_PATH. Is the location of your library specified in the path ?? If not put the directory in, then stop and restart the app server.
    rgds
    Tony

Maybe you are looking for

  • Authorization for values attribute (characterstic)

    Hello ladies and gentlemenu2019s. The end users using attribute ZSALEORG (S.O.) in DP planning as a navigation characteristic. We need to restrict selection of the value of this attribute for different users. Can we manage with this by the authorizat

  • SETTING UP EMAIL IN INCREDIMAI​L

    I had FIOS, moved, cannot get FIOS. Since my move I was not able to use my email address and lost all of my mail from the time it was disconnected. I use Incredimail for all of my emails and was frustrated when I could not sign in and get any of my m

  • Spawning a template works in Acrobat, not in Reader

    Hi - I have created a form that has a template.  Originally I wanted to have a new page spawned when the enter key was pressed in one of the text fields at the bottom of the page.  But I wasn't having any luck getting that to work, so I ended up addi

  • Application manager won't allow sign in

    After my computer reboots I am not able to sign into Adobe Creative Clound manager. I input my email and password and it spins and then signs me out. Any suggestions?

  • Parameter List Problems

    Post Author: Mbonz CA Forum: .NET Hi all, I have a VB.Net application that programatically passes pick list values to BO report parameters from an Access recordset (BO Enterprise XI R1 SP3). When the user selects "..." (i.e. all records) from the dro