[reportlab-users] Sum of integer values in a table
Mark Matthews
mem at object-craft.com.au
Wed Jun 29 01:15:51 EDT 2011
On 29/06/2011, at 3:10 PM, Asif Jamadar wrote:
> At the end of table we want to generate the sum of value field (adding all the value field). How it can be achieved? Any solution?
python has a built in sum function
ie:
total = sum([p.value for p in Product.objects.all()])
-------------------------------------------------
Mark Matthews
General Manager
Object Craft Pty Ltd
Phone: +61 3 9654 9099
http://www.object-craft.com.au
More information about the reportlab-users
mailing list