Reports 6i - REF CURSOR

From: <gvoyles_at_my-deja.com>
Date: Thu, 25 Jan 2001 19:40:23 GMT
Message-ID: <94pvf5$5t$1_at_nnrp1.deja.com>


[Quoted] [Quoted] Can you give me some detail on accessing an Oracle ref cursor from Reports 2.5 to create the report(instead of inline sql)? I can't find any documentation on using ref cursors. We will be upgrading to 6 soon, so any info. you have on 2.5 or 6 will be greatly appreciated.

Thanks,
Gary

In article <FQp86.5236$J%.529374_at_news.flash.net>,   "Eric Givler" <egivler_at_flash.net> wrote:
> two suggestions come to mind:
> 1) accept the parameters and in a before-report
 trigger, pass the parms to a
> stored procedure that builds a ref cursor the
 same as the report. Open the
> cursor and fetch 1 row. If you fetch a row,
 great, return (true). If not,
> return (false) and the report will stop. Prior
 to returning false, use the
> srw.message to display an error dialog "report
 returned no data" or
> something similar.
>
> 2) do the same thing in a driving form and
 display the error prior to
> starting the report, and ask the user to change
 the parameters.
>
> 3) Create a report level "counter" that
 summarizes on the entire report.
> Make it use Count as it's function and count
 the primary key column (or any
> column for that matter). Put a before report
 trigger that references this
> counter, ie.
>
> if :my_report_counter = 0 then
> srw.message('no rows found');
> return (false);
> else
> return (true);
> end if;
>
> -- it will take a little longer to run with
 this as the entire report
> has to be generated because you've based a
 counter on it and are using it in
> the before-report - ie. it has to count all the
 rows, but returning true if
> you found rows is good because now the report
 will display ok. The false
> causes it to stop. You'll get the error about
 the before report trigger
> returning false, but the message will be
 displayed and you exit back to the
> form.
>
> Let me know if any of this made sense or was
 helpful.
> That will be 25 cents please... ;)
>
> <pehaw_at_my-deja.com> wrote in message
 news:93s19o$5ts$1_at_nnrp1.deja.com...
> > Hello,
> >
> > I'm converting lots of Microsoft Access 2.0
> > reports to Oracle Reports 6i on NT.
> >
> > I have a very simple request - how do i detect
> > when a query in Reports selects no rows? I am
> > passing parameters to Reports 6i from Forms 6i
> > and, obviously, this may or may not result in
> > data being selected by the queries in Reports.
> >
> > If no rows are returned, I need to do action
 X,
> > if rows are returned then display the Report
 as
> > normal.
> >
> > Thanks for any help
>
>

Sent via Deja.com
http://www.deja.com/ Received on Thu Jan 25 2001 - 20:40:23 CET

Original text of this message