Home » Developer & Programmer » Forms » how to sum rows in forms 6i (Oracle forms 6i)
how to sum rows in forms 6i [message #546980] Sat, 10 March 2012 21:30 Go to next message
qaiserjavid
Messages: 25
Registered: May 2011
Location: Pakistan
Junior Member

Dear All;
i want to sum different rows and want get wum in nest column.
for example
i have fee column and there is some different student fee in specific month for example(jan).i want to sum this fee against the month of Jan.

please help how can i do.

thanks.
Re: how to sum rows in forms 6i [message #546991 is a reply to message #546980] Sun, 11 March 2012 00:45 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Manually, I believe. It would be a lot easier if you wanted to sum ALL rows, but what you described requires a little bit of programming, I'm afraid. Things will be more complex if - out of 12 months - not only one month contains different value. What then?
Re: how to sum rows in forms 6i [message #547033 is a reply to message #546991] Sun, 11 March 2012 21:54 Go to previous messageGo to next message
qaiserjavid
Messages: 25
Registered: May 2011
Location: Pakistan
Junior Member

Dear;
i want to get sum of rows against every month.
for example

sum of rows in January
sum of rows in February

and so on

thanks


Re: how to sum rows in forms 6i [message #547045 is a reply to message #547033] Mon, 12 March 2012 01:01 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Manually, again. (If it was Reports, it would be a lot easier.)
Re: how to sum rows in forms 6i [message #547281 is a reply to message #547045] Tue, 13 March 2012 11:52 Go to previous message
owais_baba
Messages: 289
Registered: March 2008
Location: MUSCAT
Senior Member
yes Littlfoot is right if it is report then i would more easy query would be something like that

-------------Example-------
    SELECT  field1,
            field2,
            date_field,
            SUM(field1),SUM(field2)
          
    FROM table
            WHERE date_field 
            BETWEEN 
            TO_DATE(:sday||'-'||:smon||'='
            ||:syer,'DD-MON-YYYY')
            AND TO_DATE(:eday||'-'||:emon||
            '-'||:eyer,'DD-MON-YYYY')   
    GROUP BY (date_field),
            (field1),(field2)


remember

:sday, :smon, :syer, :eday, emon, :eyer----> are user parameters
in the report

hope u understood






Thanks
Previous Topic: colander code not work
Next Topic: Multi-Language support in Forms
Goto Forum:
  


Current Time: Fri Jul 05 23:01:56 CDT 2024