[web2py] Re: rendering rows as a generator and displaying via SQLTABLE

2020-12-24 Thread Alex Beskopilny
Hi! You can create a table in memory and use grid working example: def pro_report1(): # https://web2py.wordpress.com/category/web2py-and-databases/ # https://stackoverflow.com/questions/33674532/web2py-sqlform-grid-with-executesql tbl = 'proverka' #f_short_proverka = [ 'f' +

[web2py] Re: Using min(), max(), count() with groupby in SQLFORM.grid

2020-12-24 Thread cdbaron
It's a bit of an ugly trick, but I've ever done something like this before. created_on_min = db.my_table.created_on.min().with_alias(created_on_min) created_on_max = db.my_table.created_on.max().with_alias(created_on_max) created_on_min.tablename = 'my_table' created_on_max.tablename =