[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Running Totals (SQR 3.0.13.2), Oracle 7



Hi gang,

I have managed to create several reports without asking for help, but it is
time once again to seek your wisdom....

I am writing a report which duplicates a spreadsheet - there are running
totals for both columns and rows. I am having difficulty with the totals for
the columns. The program selects 1st by employee and second by date....

The output looks like the following (the number of check dates may vary):

            1/1/2000           1/15/2000   Total
AAA     $                      $                Total for row
BBB     $                      $                Total for row
Total   total for column total for column

I would like to great variables based on the check date, and then add the
individual amounts to the variables.

The example of what I want to accomplish is below. I do not know how to have
a numeric variable created by the program. I can handle the "contents" of
the variable, but how do I have the variable itself created? This may make
no sense at all - if so, I appologize in advance :-)

Thanks,
Bryan

begin-select
a1.al_amount
a1.check_dt

   let #total-check-&a1.check_dt = #total-check-&a1.check_dt + &a1.check_dt

   From PS_AL_CHK_DED A1
      Where  a1.check_dt between $first_date and $second_date
         and a1.al_dedcd = '64'
         and a1.file_nbr = &a.file_nbr

end-Select



------------------------------------------------------------
Bryan E. Brown
bbrown2@acsalaska.com, 907-564-1303
Systems Analyst, ACS (Alaska Communication Systems)