Re: Program units

From: Shujda <shujda_at_prodigy.net>
Date: 1998/12/28
Message-ID: <36872FD2.D007B37A_at_prodigy.net>#1/1


You are right about function writen localy in report module, you can't reference it in select statement of the query. I even tried with function in pll library, the same thing.
I am positive that you can reference stored function/package in the query. I also agree with you about workaround:
Create a formula column (group level) and call your compute_tax function from the function associated with that formula. Like this:
function cf_formula return number is
  return_value number;
begin
  return_value := compute_tax(:taxable_amount);   return return_value;
end;
:taxable_amount and :cf must have compatible frequency.

Interesting problem, but Oracle Reports is full of things like this. No wonder why Oracle developers hate this tool. Regards.

James A. Johnson wrote:

> As far as I know, you can only call them from the report they are written
> in. To make then accessible by all the tools, make it a stored procedure.
>
> Scot Balfour wrote:
>
> > If I write a program unit: function compute_tax (return number) using
> > Oracle Reports, can I reference compute_tax in the query SELECT
> > statement in the data model--or can program units only be called from
> > formula columns, format triggers, etc.
> >
> > What guidelines should I follow about where to store functions that are
> > used only by a single report. Do I make a client-side library? Thanks.
Received on Mon Dec 28 1998 - 00:00:00 CET

Original text of this message