Re: Reports 6i - query returns no data

From: Matt B. <mcb_at_ds.znet.com>
Date: Sun, 14 Jan 2001 14:21:22 -0800
Message-ID: <t649ejfovt548_at_corp.supernews.com>


<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/

Haven't worked with reports myself, but if you have access to the SQLCODE [Quoted] variable, a SQLCODE of -1403 means no rows retrieved. If the NO_DATA_FOUND [Quoted] pre-defined exception in PL/SQL is also available to you and is also raised [Quoted] (not sure if it is or not, given that a SELECT-INTO might not be used in your [Quoted] case), you can use that too. Anyway, try the SQLCODE = -1403 - that's probably [Quoted] your best bet.

-Matt Received on Sun Jan 14 2001 - 23:21:22 CET

Original text of this message