tot() in @wgt

Dan McCabe fp at mccabes.us
Thu Nov 18 19:01:32 PST 2010


Hello,

Please forgive me if this is a stupid question, but I've been away from
programming for a couple of years now, but have been asked to create a new
report for payroll.  The processing takes real fields and does some
formatting and  combines a couple with simple math to.  At the end, in the
grand total section of the output, I am trying to display the total value of
some of the fields.

The report runs on each record and appears to be working as intended.  That
is until I get to the @wgt section.  In the debugger, I find that the only
info in the @wgt is the value in each field of the last record rather than
the combined total of the 100 or so before.   The processing is posted
below.  Am I doing something wrong here?

@wgt   If:
       Then:
 96  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       If:                                         'Payroll hash totals
       Then: tp = tot(43)
 97  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       If:                                         'Regular dollars
       Then: rd = tot(18)
 98  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       If:                                         'Total out of grade pay
       Then: go = tot(og)                 'og combines two real fields in
this file.
 99  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       If:                                         'Total S.A.M.

       Then: sm =
tot(41)
100  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       If:                                         'Total uniform allowance
       Then: ua =
tot(21)
101  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       If:                                         'Total overtime

       Then: od =
tot(26)+tot(28)+tot(30)
102  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       If:
       Then:
end


Thanks,

Dan McCabe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20101118/c2bce0eb/attachment.html 


More information about the Filepro-list mailing list