Re: Report with predetermined number of repeating frames

From: Larry <lculver_at_my-deja.com>
Date: 2000/05/17
Message-ID: <8fuoi9$ni4$1_at_nnrp1.deja.com>#1/1


The following assumes that frame 1 and 2 return data.

In the Group for Frame 2 add a summary column to Count records in Frame/Group 3. Lets call it CS_F3_Count. Have it reset at Group for frame 2.

Now create another query. Lets call it Q_4. Use SQL similar to the following:

Select
  :G_1_to_G_3_Link_Column, -- This could be multiple columns   :G_2_to_G_3_Link_Column, -- This could be multiple columns From <any table that is has at least 5 row> t,

    (Select

       decode(:CS_F3_Count,0,5,
           decode(mod(:CS_F3_Count,5),1,4,2,3,3,2,4,1,0)) Rows_Needed
     From Dual) rn

Where rownum <= rn.Rows_Needed

What this code is doing is calculating the number of rows needed to fill a page then cartesians with any table that has 5 or more rows in order to generate the required number of rows.

The frame for this query (Lets call it frame 4) should the same labels as frame 3 and is positioned to print after frame 3. This frame will fill out the page with the labels.

Larry

In article <55pU4.55508$55.1157487_at_news2.rdc1.on.home.com>,   "Teresa Koren" <teresa.koren_at_home.com> wrote:
> I have to produce a report which has three repeating frames (1,2,3)
 with
> master /slave relationship i.e. frame 1 is master frame for frame
 2 ,3 and
> frame 2 is a master frame for frame 3. Each page of the report has to
 have
> one instance of frame 1 & 2. Frame 3 must have 5 instance per page
 where
> some of the frames might not have data.
>
> If frame type 3 does not have data only the labels for the frame has
 to be
> printed. I have managed to produce the report but I do not know how
 to
> print frame type 3 instances in cases where there is no data
 associated with
> these frames. Can somebody help with this mater?
>
> PS
>
> Can you send me a copy of your response to :
> teresa.koren_at_home.com
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed May 17 2000 - 00:00:00 CEST

Original text of this message