zoukankan      html  css  js  c++  java
  • Calling / Running a report in Oracle forms 10g / 11g

    Calling / Running a report in Oracle forms 10g / 11g

    Below is the procedure to call a report in Oracle Forms 10g/11g  by passing report file name with full path and report format like 'PDF', 'RTF' etc.

    Procedure call_report (preport In Varchar2, pformat In Varchar2)
    Is
          pi_id                paramlist;
          repno                Number;
          al_id                alert;
          al_report            Number;
          User                 Varchar2 (25);
          pass                 Varchar2 (25);
          today                Date;
          store_var            Varchar2 (150);
          --OC
          vc_reportserverjob   Varchar2 (100);
          report_job_id        Varchar2 (100);
          repid                report_object;
          v_rep_status         Varchar2 (100);
       Begin
          pi_id := Get_parameter_list ('rep_param');

          If Not Id_null (pi_id)
          Then
             Destroy_parameter_list (pi_id);
          End If;

          pi_id := Create_parameter_list ('rep_param');

          Add_parameter (pi_id,
                         'PARAMFORM',
                         TEXT_PARAMETER,
                         'no');
          --- report object
          --- the below report object 'cproreport' must be created in Report object navigator.

          repid := Find_report_object ('cproreport');

          Set_report_object_property (repid, report_filename, Rtrim(:parameter.report_path)||preport);
          Set_report_object_property (repid, report_server, :parameter.r_server);
          Set_report_object_property (repid, report_execution_mode, RUNTIME);
          Set_report_object_property (repid, report_comm_mode, SYNCHRONOUS);
          Set_report_object_property (repid, report_destype, cache);
          Set_report_object_property (repid, report_desformat, pformat);

          vc_reportserverjob := Run_report_object (repid, pi_id);
          report_job_id :=
             Substr (vc_reportserverjob,
                     Length (:parameter.r_server) + 2,
                     Length (vc_reportserverjob));
          v_rep_status := Report_object_status (vc_reportserverjob);

          If v_rep_status = 'FINISHED'
          Then
             web.show_document (
                   'http://'
                || :parameter.host
                || ':'
                || :parameter.port
                || '/reports/rwservlet/getjobid'
                || report_job_id
                || '?server='
                || :parameter.r_server,
                '_blank'
             );
          Else
             Message ('error when running report' || v_rep_status);
          End If;
       End;
  • 相关阅读:
    docker 安装mysql
    Java web项目搭建系列之二 Jetty下运行项目
    Java web项目搭建系列之一 Eclipse中新建Maven项目
    Maven 添加其他Maven组件配置问题
    C# 中定义扩展方法
    Oracle 函数
    【Webservice】2 counts of IllegalAnnotationExceptions Two classes have the same XML type name
    Linux精简版系统安装网络配置问题解决
    Rsync 故障排查整理
    Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin.
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220042.html
Copyright © 2011-2022 走看看