Hello,<br><br>Please forgive me if this is a stupid question, but I&#39;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.  <br>

<br>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?<br>

<br>@wgt   If:<br>       Then: <br> 96  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>       If:                                         &#39;Payroll hash totals<br>       Then: tp = tot(43)<br>

 97  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>       If:                                         &#39;Regular dollars<br>       Then: rd = tot(18)<br> 98  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>

       If:                                         &#39;Total out of grade pay<br>       Then: go = tot(og)                 &#39;og combines two real fields in this file.<br> 99  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>

       If:                                         &#39;Total S.A.M.             <br>       Then: sm = tot(41)                                                      <br>100  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>

       If:                                         &#39;Total uniform allowance <br>       Then: ua = tot(21)                                                      <br>101  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>

       If:                                         &#39;Total overtime           <br>       Then: od = tot(26)+tot(28)+tot(30)                                      <br>102  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -<br>

       If:                                                                  <br>       Then: end                                                              <br><br><br>Thanks,<br><br>Dan McCabe<br>