Hello,
I have a grid that is worked as I expected. now I want to sum all the 
values that have in "number_of_bags" Field.
So that I have used grid.rows (*sum([int(grid.rows[i].number_of_bags) for i 
in range(len(grid.rows))])*) but this gives me sum of first 10 records but 
i want sum of  all the values which is in my grid.
How can I do that in an efficient way?


*#Model db.py*

db.define_table('whr',
                Field('id_inword'),
                Field('whr_number'),
                
Field("customer_name",requires=IS_NOT_EMPTY(),label="Account Holder's 
Name"),
                Field("whr_holder_name",label="WHR Holder's Name"),
                Field("father_name", label="Father Name"),
                Field("phone_number",label="Phone Number"),
                Field("number_of_bags",label="Number of bags"),
                auth.signature)

Best

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to