如何在Oracle 12c中将报表保存在本地系统中

问题描述 投票:0回答:1

如何在 Oracle Forms 12c 中将报表保存在本地系统中。就像在 Forms 6i 中一样,我们使用 run_product() 过程将报告保存在本地系统中

pl_id := create_parameter_list('us00300p');
    add_parameter(pl_id,'paramform',text_parameter,'no');
    add_parameter(pl_id,'xiposl',text_parameter,sl_no); 
    and so on       

run_product(报告,文件路径和文件名,同步,运行时,文件系统,pl_id,null);

如何在 Forms 12c 中替换此过程,而不是使用在本地系统中保存文件。这是 Forms 6i 代码如何在 Forms 12c 中这样编写

从 single_row 中选择 ora_12c,report_server,rep_str 到 m_12c,vc_reportserver,mrep_str; 如果 m_12c = 1 那么

    v_report_id := find_report_object('rat');
    
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
 
    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_SERVER,vc_reportserver);

    SET_REPORT_OBJECT_PROPERTY(report_id,report_filename,Filepath&FileName);
    
    v_ReportServerJob := run_report_object(report_id,pl_id);

    vjob_id := substr(ReportServerJob,instr(ReportServerJob,'_',-1)+1);

    vc_rep_status := REPORT_OBJECT_STATUS(ReportServerJob);
    
    IF  vc_rep_status = 'FINISHED' THEN
    
      --WEB.SHOW_DOCUMENT (serverURL,Servername,Jobid,'_blank');
           How to replace this save a report in the local system without opening browser
oracleforms oraclereports
1个回答
0
投票

这里,答案就在那里,请查看。

从表名中选择 ora_12c,report_server,rep_str 到 m_12c,vc_reportserver,mrep_str;
如果 m_12c = 1 那么 v_report_id := find_report_object('rat');

     SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
     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_SERVER,vc_reportserver);
     SET_REPORT_OBJECT_PROPERTY(report_id,report_filename,Filepath&FileName);
     v_ReportServerJob := run_report_object(report_id,pl_id);
     vjob_id := substr(ReportServerJob,instr(ReportServerJob,'_',-1)+1);
     vc_rep_status := REPORT_OBJECT_STATUS(ReportServerJob);
       
IF  vc_rep_status = 'FINISHED' THEN
      --> Save a report in the local system without opening the browser <--
      COPY_REPORT_OBJECT_OUTPUT(v_ReportServerJob,'c:\mylocaldir\file.pdf');
    --&* This is the answer to my question. Hope, it would be helpful for someone *&--
end if;
© www.soinside.com 2019 - 2024. All rights reserved.