Re: can i run a stored procedure from Reports?

From: BM Lam <1116-530_at_online.de>
Date: Wed, 11 Aug 1999 22:11:21 +0200
Message-ID: <37B1D8E9.4759D069_at_online.de>


Thanks for the advice. However, on our version of Reports (6.0.5 ?) I got an error message complaining about "internal error" after I added a line

  FILL_REP_TABLES('parameters..');

in the After Parameter Form Trigger Function to run the stored procedure FILL_REP_TABLES. I am at home now and cant look up what exactly was the error message. Would be great if someone has an idea.

Simon Hedges schrieb:
>
> bmlam wrote:
>
> > Since the figures I have to calculate require pretty complex
> > calculation, I wrote a stored procedure in PL/SQL to compute the figures
> > and store them in a table . Then I create a query with Reports to get
> > the data in the report sheet . Now the point is we want to run the
> > calculating procedure (1) immediately before the report is run (2).
> >
> > I know I can do it with a script to synchronize the 2 tasks. But a
> > better way would be to imbed step 2 in the report itself, sort of in one
> > of the report trigger. The trouble is you can not issue "execute
> > calcuation_procedure;" in the trigger.
> >
> > So is there a solution to this?
>
> Yes. I'm afraid I'm at home at the moment, so don't have access to
> the code we used, but we did exactly this kind of thing with several
> reports we have (it can simplify and speed up reports enormously).
>
> We call the procedure from, I think, the after parameter form trigger,
> so just running the report does everying.
>
> The DB procedure (we use packages with procedures contained
> with them) is called directly, so if the procedure is named
> 'pr_fred', we just use the code
>
> pr_fred
>
> adding, of course any parameters. I don't believe you need
> to include the word 'execute'.
>
> You need to make sure that appropriate grants are given to the
> procedure/package and that a public synonym is created
> for it (or the schema named prefixed to it).
>
> I hope this helps. My main point is that it CAN be done.

-- 
P.S: I am moving the e-mail account. Please use my new e-mail address as
of now:

bmlam_at_online.de

May I also suggest that you update your address book accordingly if you
are using one at all.
Received on Wed Aug 11 1999 - 22:11:21 CEST

Original text of this message