Looks like my misunderstanding. I'm coming from a TurboGears environment and thought it allowed me to do what I was asking. But, seems like I'm mistaken. I just went back to the old environment and ran a report and it doesn't forward to a new page like I thought it did after returning the sheet.
Sorry for the noise. On Wednesday, December 12, 2012 2:11:00 PM UTC-6, Massimo Di Pierro wrote: > > Is it time consuming to generate the spreadsheet? If not just display a > link to the action that returns the spreadsheet. You need two actions. One > displays the link and one compute the spreadsheet. You may need to pass > data (in vars) between the two. > > On Wednesday, 12 December 2012 13:51:21 UTC-6, Jim S wrote: >> >> I'm looking for a way to return an Excel sheet to the user and then >> redirect to a different page all in the same request. >> >> Here is what I'm doing now: >> >> from reports import movementDetail as rpt >> letters_file = StringIO.StringIO() >> returnVal = rpt.process(originationId, fromDate, toDate, letters_file,auth >> .user.id) >> if returnVal: >> excelFile = letters_file.getvalue() >> letters_file.close() >> response.headers['Content-Type']='application/vnd.ms-excel' >> return(excelFile) >> else: >> response.flash = 'No movements for specific origin in date range.' >> return dict(form=form) >> >> When I do the return(excelFile) I somehow would like to pass a URL that >> it would redirect to when the excel sheet is returned. Any ideas? I'm >> guessing there is something simple I'm missing. >> >> -Jim >> > --

