Re: Funcky master-detail ?

From: <hatzinger_m_at_bmwf1f.bmwf.gv.at>
Date: 11 Dec 92 11:57:00 GMT
Message-ID: <1992Dec11.090241.61_at_bmwf1f.bmwf.gv.at>


In article <1992Dec10.211552.21031_at_netcom.com>, sjs_at_netcom.com (Stephen Schow) writes:
> I need to implement a form that is a little different and I am wondering
> how to do with SQL*FORMS. It has a master-detail relationship on it, which
> is easy enough, but not the way I need to put the details. In this example
> there will never be more than 2 detail records for a given master. But down the
> page, I need to see part of record 1 then part of record2 then the other
> part of rec and then rec2. like this.....
>
> +--------------------------------+
> | |
> | Master Block |
> | |
> +--------------------------------+
>
>
> +--------------------------------+
> Scrolling | Record 1 Field A |
> | Record 2 Field A |
> +--------------------------------+
>
>
> +--------------------------------+
> Scrolling | Record 1 Field B |
> | Record 2 Field B |
> +--------------------------------+
>
> NOTE - I imagine I could just set up 2 parallel detail blocks which just
> show different views of the same table. The problem is making sure that
> as one detail block updates information in the table, or even just in the
> block, that record needs to be refreshed in the other detail block.
>
> This may be straightforward, but I am fairly new to Oracle, so I am still
> getting used to how to use triggers to accomplish these types of things.
> Any help would be much appreciated.
>
> Thanks in advance
> --

Hello Stephen,

Create 3 Pop Up Pages, one for your Master-Block and two for the details:

+--------------------+
| Master PopUp       |   (Page 1, PopUp, size eg. 80x3, Location 1,1  
+--------------------+          Block: Master)
+--------------------+
| Rec1.Field1        |   (Page 2, PopUp, size eg. 80x4, Location 1,4  
| Rec2.Field1        |          Block: Detail, Initial Location on the Page 1,4)
+--------------------+
+--------------------+
| Rec1.Field2        |   (Page 3, PopUp, size eg. 80x4, Location 1,4  
| Rec2.Field2        |          Block: Detail, Initial Location on the Page 1,8)
+--------------------+


Block Detail, records displ: 2
              records Lines: 1

Now Type in your KEY-STARTUP Trigger:

SHOW_PAGE('1');
SHOW_PAGE('2');
SHOW_PAGE('3');

Finaly you have all three pages on one page looking like on whole page. First the Master, then Field1 of Block Detail with two records, then Field2 of Block Detail. Be shure that Rec1 and Rec2 are on the same Y-Location in SQL*Forms.

kind regards

Mike


                                                                          ^
 Federal Ministry of Science and Research                               B | M
<-------------------------------------------------------------------------+---->
 Computer Center                                                        W | F
                                                                          |
 Klaus-Michael Hatzinger            mail: hatzinger_m_at_bmwf1f.bmwf.gv.at   |
 Bankgasse 1/209                   phone: 0043-222-53120/5188             |
 1014 Vienna, Austria                fax: 0043-222-53120/5155             V
================================================================================
Received on Fri Dec 11 1992 - 12:57:00 CET

Original text of this message