Re: Forms 5 Run_Product problem

From: Jim Halverson <jimbo_h_at_pacbell.net>
Date: Wed, 10 Mar 1999 13:15:03 -0800
Message-ID: <36E6E0D6.3341A8C4_at_pacbell.net>


Below are two examples of the newest format of RUN_PRODUCT that execute for me.
Keep in mind that each of the add_parameter()s must match with the parameters in the actual 3.0 Report. Also of great importance is the fact that the parameters must be characters! (See the to_char() conversion in the first example)
Hopefully this will resolve your inquiry, and good karma will roll back to me.

DECLARE

   MYparam      varchar2(15)   := 'bomdata';
   pl_id          paramlist;

   --
begin

   pl_id := get_parameter_list(MYparam);    --
   if not id_null(pl_id) then

      destroy_parameter_list(pl_id);
   end if;
   --
   pl_id := create_parameter_list(MYparam);    --

   add_parameter(pl_id, 'PARAMFORM',TEXT_PARAMETER, 'NO');
   add_parameter(pl_id, 'DESTYPE'  ,TEXT_PARAMETER, 'PREVIEW');
   add_parameter(pl_id, 'REC_TYPE_IN'  ,TEXT_PARAMETER, 'P');
   add_parameter(pl_id, 'COMPR_SEQNO_IN'  ,TEXT_PARAMETER,
TO_CHAR(:CDS_BOM.COMPR_SEQNO));
   --
   Run_Product(REPORTS,
               'BOM',
                SYNCHRONOUS,
                RUNTIME,
                FILESYSTEM,
                pl_id,
                NULL);

  --
  GO_ITEM('EXIT');
end;

DECLARE
   MYparam      varchar2(15)   := 'bomdata';
   pl_id          paramlist;

   --
begin

   pl_id := get_parameter_list(MYparam);    --
   if not id_null(pl_id) then

      destroy_parameter_list(pl_id);
   end if;
   --
   pl_id := create_parameter_list(MYparam);    --

   add_parameter(pl_id, 'PARAMFORM',TEXT_PARAMETER, 'NO');
   add_parameter(pl_id, 'DESTYPE'  ,TEXT_PARAMETER, 'PREVIEW');
   add_parameter(pl_id, 'ORIENTATION'  ,TEXT_PARAMETER, 'LANDSCAPE');
   add_parameter(pl_id, 'ENG'  ,TEXT_PARAMETER, :ENG);
   add_parameter(pl_id, 'SALES'  ,TEXT_PARAMETER, :SALES);
   add_parameter(pl_id, 'DATE_BEGIN'  ,TEXT_PARAMETER, :DATE_BEGIN);
   add_parameter(pl_id, 'DATE_END'  ,TEXT_PARAMETER, :DATE_END);
   --
   Run_Product(REPORTS,
               'CRDLOG',
                SYNCHRONOUS,
                RUNTIME,
                FILESYSTEM,
                pl_id,
                NULL);

   GO_ITEM('exit');
end;

Andrew Adams wrote:

> I am upgrading a Forms 4.5/Reports 2.5 application to Forms
> 5.0/Reports 3.0
> My problem is that Oracle has apparently changed the syntax of the
> Run_Product command. Does anyone have an example of code that will
> run a report under 5.0? All the examples I have found generate a 307
> "Too many declarations of Run Product match this call" error.
>
> The exact syntax of my PL/SQL is
>
> Run_product(REPORTS,'c:\report.rep',ASYNCHRONOUS,RUNTIME,FILESYSTEM,NULL);
>
> Thanks
>
> Andrew Adams
Received on Wed Mar 10 1999 - 22:15:03 CET

Original text of this message