Hi everybody, I've a problem and need your help.
I have a view which contains many things including an SQLFORM.factory used 
to set the query for a report generation.
The first time I submit the form the report is correctly opened, the second 
time the page is just reloaded...how can I fix the problem?
Here is my code snippet...

def index():   
    form = SQLFORM.factory(...)
    if form.accepts(request.vars, session): 
        #report generation...
        response.headers['Content-Type']='application/vnd.ms-excel'
        response.headers['Content-Disposition']='attachment; 
filename=%s.xls'%filename
        response.headers['Content-Title']='%s.xls'%filename     
        return data #otherwise the file isn't opened   
    return locals()

Many thanks!

-- 

--- 
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/groups/opt_out.


Reply via email to