home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / 9383 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.4 KB

  1. Path: sparky!uunet!gatech!news.ans.net!cmcl2!adm!smoke!brl.mil!fsbrn
  2. From: fsbrn@brl.mil (Ferd S. Brundick)
  3. Newsgroups: comp.databases
  4. Subject: SUM in Pdox4.0 report
  5. Message-ID: <19597@smoke.brl.mil>
  6. Date: 25 Jan 93 14:36:03 GMT
  7. Sender: news@smoke.brl.mil
  8. Reply-To: fsbrn@brl.mil
  9. Organization: Army Research Laboratory
  10. Lines: 21
  11.  
  12. I have a simple report in Paradox 4.0 (running in compatible mode)
  13. that is a group summary table.  I used summary fields to calculate 
  14. the sum of each field I am interested in on a per-group basis in the
  15. group band and overall in the report footer.  (The table band is
  16. empty.)  My group subtotals and overall totals are correct.
  17.  
  18. My question involves percentages.  I need to calculate
  19. Sum(group)/Sum(overall) for each group.  I tried Field/Place/Expression
  20. with SUM([Rev],GROUP)/SUM([Rev]) but SUM([Rev]) is the sum *so far*,
  21. not the total for all the groups.  The first group line is always
  22. 100%, the last one is always correct, and the ones in between are
  23. wrong.
  24.  
  25. I realize I can run a query to calculate the totals, and replace my
  26. expression with SUM([Rev],GROUP)/[Answer->SumRev].  Does anyone know
  27. an easier (more efficient, whatever) way to do this?  Thanks.
  28.  
  29.                                         dsw, fferd
  30.                                         Fred S. Brundick
  31.                                         USARL, APG, MD.
  32.                                         <fsbrn@brl.mil>
  33.