Re: How get summary from Tabular Forms??

From: Nenad Noveljic <noveljic_at_usa.net>
Date: Mon, 9 Nov 1998 10:25:28 -0000
Message-ID: <726chn$4r5$1_at_as102.tel.hr>


There are two ways of doing this:
1) Do the commit_form and then again do the select that populates. 2) After the change of Qty item the following code will compute the sum:

    declare sum number;
    begin

        first_item;
        sum:=0;
        loop
            sum:=sum+:qty;
            next_item;
            exit when :system.last_record='TRUE';
        end loop;

    end;

Donald Yeh wrote in message <36466C20.CE9570A1_at_ms17.hinet.net>...
>Hi,
>
>I create one 'tabular' layout style block and set 'Record Display'
>property to 10. All those items based on one table of database. I want
>to summary all 'Qty' on Forms Runtime. If I use SQL command 'SELECT Qty
>INTO summary FROM my_table', the value of summary is 300, not 340.
>
>How could I get the summary of Qty ??
>
><my_table>
>Item_No Qty
>======= ====
>1 100 --+
>2 50 |
>3 50 |- Data already stored in database
>4 40 |
>5 60 --|
>6 10 ---> Insert New data from Forms
>7 30 ---> Insert new data from Forms
>
>
Received on Mon Nov 09 1998 - 11:25:28 CET

Original text of this message