Generate a doodle report in a message

Recently, I have been using doodle reporting to generate excel and pdf reports. I did this with a button because the report is not dynamic.

But now I have a requirement when the parameters are dynamic, where I have the parameters form, and users fill out this form and click submit. The form will present another action and this action should prepare a report in pdf format.

When I tried this code:

return new ReportResult(report, new PdfReportWriter()); 

It just creates a report on the page and I cannot load it. Any idea how?

I have already included all the necessary DLLs and I can generate it when I use actionLink.

+4
source share
1 answer

To solve the problem, specify the content type and file name:

 return new ReportResult(report, new ExcelReportWriter(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileName = "Report.xls" }; 
+3
source

Source: https://habr.com/ru/post/1394992/


All Articles