Re: Report 3.0: Info if query returns no rows

From: Hakan <nvcinc_at_ibm.net>
Date: Sat, 06 Feb 1999 01:20:02 -0500
Message-ID: <36BBDF12.C8C74B27_at_ibm.net>


Steps to do that:

  1. Create a Summary Column on a column in your query. If your query does not return any row it will be null.
  2. Create a frame on layout. Create text, object whatever you like under/in this frame.
  3. Write a format trigger for this frame. ie.: function M_nodataFormatTrigger return boolean is begin if :no_data is null then /* Check if summary column on a query column is NULL */ /* Be sure if it returns a row it will be not NULL */ return (true); /* print frame and contents */ else return (false); /* don't print frame and contents */ end if; end;

Regards

Hakan
NVC Inc.

John Remus wrote:

> How can I get info if a query in Report writer 3.0 returns rows or
> not.
> What I like to do is to display frames in dependence of this
> information.
> for example:
> If query returns rows, display the layout frame + hide a frame
> containing only a text field 'no data found' , otherwise reverse.
>
> Till now I colore the top frame white and place the 'no data found'
> text field below the frame (but not contained by it).
> But I dont like this way of NDF handling much.
>
> Thanx for any help.
Received on Sat Feb 06 1999 - 07:20:02 CET

Original text of this message