Re: Oracle reports with queries

From: G&K F <zotje_at_my-deja.com>
Date: Fri, 08 Sep 2000 21:06:01 GMT
Message-ID: <8pbkbb$lhs$1_at_nnrp1.deja.com>


It would help me out a lot if you would let me know which version of Oracle reports you are running, reports 2.5 is much different from 3.0 for example. In 3.0, you can just create a parameter form right in reports, there is even a wizard and you can get a drop down list by selecting your field and designating to get values from a list of values (select case_no, case_stat from casedtl for example).

In reports 2.5 It works basically the same way except that there is no wizard to help you out and you basically have to create the fields yourself. I haven't done one in 2.5 in a while, but I could look it up, I still have at least 30 examples of those on our DB.

Executing a report from a form is pretty simple. You just create a button that executes the report....I got some sample code here that I have used in the past. Try it and let me know how it works.

declare

   the_param      varchar2(15)   := 'tmpdata';
   pl_id          paramlist;

begin

   pl_id := get_parameter_list(the_param);

   if not id_null(pl_id) then

      destroy_parameter_list(pl_id);
   end if;

   pl_id := create_parameter_list(the_param);

   add_parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
   add_parameter(pl_id, 'DESTYPE',   TEXT_PARAMETER, 'PREVIEW');
   add_parameter(pl_id, 'P_cust_number', TEXT_PARAMETER,
:customer_blk.customer_id);

   run_product(REPORTS,

               'G:\PROJECTS\INVENTORY4899\OEXR089',
               SYNCHRONOUS,
               RUNTIME,
               FILESYSTEM,
               pl_id);

end;

In article <8p5bfa$7gu$1_at_nnrp1.deja.com>,   green_leaf_2_at_my-deja.com wrote:
> I wanted to know what is the method for generating reports in Oracle,
> when you want to provide some values for certain fields, based on
 which
> the report is generated. For example, I may want the user to specify
 a
> range of dates, such as >7/12/00 and <12/12/00 or something, so as to
> generate a report giving the information for all records with dates
> lying in between those two dates...similarly, there could be some
 other
> fields for which also values could be specified as a range or a
 specific
> value.
>
> Can this be done by adding user parameter to the parameter form in
> Oracle reports? Otherwise, is there any way to connect an Oracle form
> to reports, which would allow the user to specify these criteria in
 the
> Oracle form, and then based on the criteria a report would be
 generated?
> If that is possible, I suppose, it would also be possible to provide
 a
> drop down list if necessary, from which the values for the
> fields/criteria could be selected. I don't suppose such a thing could
> be done by just adding user parameter to the parameter form...
>
> I would appreciate your response to this.
>
> Thanks.
>
> Suchitra
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Sep 08 2000 - 23:06:01 CEST

Original text of this message