Closed hahnz closed 12 years ago
There is no response in composer,but you can use 'redirect' method redirect to the report controller. You can write your report code in the grails controller.
You can do something link this:
def reportDef = new JasperReportDef(name:'newReport1.jasper', fileFormat:JasperExportFormat.PDF_FORMAT, parameters:[campus_id:user.campus.id+""])
Filedownload.save(jasperService.generateReport(reportDef).toByteArray(),"application/pdf", "Necessidades")
Filedownload belongs to ZK api
I've done the xiaochong way, and its worked fine.. I may be will try aaloise way too... thx for the alternative.. =D
Hi Xiao Chong, I've tried to make report in zkui using jasper report plugin. but I cant use response to download the report..
here the sample code
def reportDef = new JasperReportDef(name:'reportUnavailableDoc.jrxml', fileFormat:JasperExportFormat.PDF_FORMAT ) response.setContentType("application/pdf") response.outputStream << jasperService.generateReport(reportDef).toByteArray()
the zkui doesnt recognize response, actually I`ve import javax.servlet.http.HttpServletResponse and already define it.
but it cannot worked too.. it say output doesnt recognize on null object. what should I do?