Re: Oracle Reports * Repeating frame problem

From: Andrei Plet <a.plet_at_proplant.de>
Date: Mon, 13 Jul 1998 10:35:02 +0100
Message-ID: <35A9D4C6.BE979C62_at_proplant.de>


Pedro MARTEL wrote:

> Hi. I've got a problem that I would like to solve.
> I've gone through all Reports tutorial and examples, and I can't find an
> answer to it.
>
> Imagine you want to select a column from a table, with values between 2
> parameters BUT you want each line to be fetched (or if not fetched, at
> least printed) a :n number of times...
>
> Select part_code from parts where part_code between :part_from and
> :part_to;
>
> I need my report to print each fetched record a :n number of times...
>
> I've tried with dynamic PL/SQL to create a new table and insert on it :n
> number of times the select statement, BUT there is a problem. When this
> report is called from another app it won't run as the main query is on a
> table that does not exist when the report is launched...
>
> Any ideas? Maybe this is a Columbus egg, but I don't know how to "tell"
> Oracle Reports to repeat a frame a :n number of times...
>
> Any help would be appreciated
> Thanks
> Pedro
> --
> Vous voulez globaliser ? Commencez par les Droits de l'Homme !
>
> Pedro Martel | Tel: +41-22-7674372
> CERN - EST | Fax: +41-22-7678890
> | Pedro.Martel_at_cern.ch

Hi Pedro

I think you can solve the problem with lexical references.

Create user parameter q_union.
In the date model add to the query for the repeating frame

    Select part_code from parts where part_code between :part_from and     :part_to &q_union
In the After Parameter Form trigger:
  i integer;
 begin
  for i in 1..n loop
    :q_union := :q_union || ' union all Select part_code from parts where part_code between ' || :part_from || ' and ' || :part_to;   end loop;

I didn't test it but I think it will be run.

Andrei

--
Andrei Plet
a.plet_at_proplant.de
pro_Plant
Gesellschaft für Agrar- und Umweltinformatik mbH
http://www.proplant.de
Nevinghoff 40,  48147 Münster,  Germany
Tel.: ++49 251 98797-64, FAX : 98797-99
Received on Mon Jul 13 1998 - 11:35:02 CEST

Original text of this message