On Thursday, January 19, 2017 at 8:02:23 AM UTC-5, James Booth wrote:
>
> Hm, so there's no real way to do this at the minute? 
>

> The problem is, if I do it via executesql or virtual fields, I can't 
> export it as CSV which is my primary goal.
>

You could (a) create a view in the database to represent the data and then 
define a DAL model based on that view, (b) dynamically load the data into a 
SQLite memory database and use that with the grid, (c) don't use the grid 
(i.e., generate the query you need and use the resulting Rows object to 
generate your own tabular display and CSV export -- the Rows object has an 
.export_to_csv_file method to facilitate this).

It's rare that there is "no real way" to do something -- it just might be a 
little more complicated than you'd like. :-)

Anthony

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to