PDA

View Full Version : sum on foxpro9 report


Werner700
09-26-07, 17:36
I'm fairly new to foxpro reporting and I'm having some trouble. Here's what i'm trying to do:

Joe $54 38%
Jim $21 15%
Nancy $67 47%
Total owed: $142


I've calculated the total for column2 correctly but i'm having trouble using the SUM command to calculate the total in column3 so that I can use it as the divisor. My formula for the percentages is currently just (lineitem/Sum(lineitem))*100 and I keep getting an error for the sum. Can the SUM command even be used on a foxpro report outside of the calculate tab for the field? Not sure what I'm doing wrong so any help would be greatly appreciated. :eek:

Werner700
10-01-07, 13:58
I did manage to get this squared away using some temp tables to store the calculated sum value in. Still not sure if there's any way to perform this calculation on the report itself, there doesn't appear to be. :(

georgev
10-03-07, 12:09
How did you calculate the total for column2?

byrman
10-16-07, 00:10
you can use variables in the report. This variables can sum the fields and in the foot of the group, you can used.