I have used visualize.js to export jasper report to PDF, XLSX and CSV. Everything works fine except I get export error for XLSX and/or CSV from time to time. When I got export failed, the response from jasper server is status = cancelled. The strange thing is same report can be downloaded successfully sometimes and sometimes it fails with the status cancelled.
If the report is exported to XLSX or CSV from jaspersoft interface, there is no issue.
I have tried everything that looks like possible solution but none of them helped. Can someone guide me how could I fix this issue?
Finally I found the solution of the above problem and I am posting it here so that it might save someones time.
To fix above issue we have to put export code to the changeTotalPages event callback because it makes sure that the export process start to run after the report is loaded.
Hope it helps!