Jasper Reports PDF download folder

With NG Client when i run a Jasper report and pass null as the third parameter (output options) and set the outputType to plugins.jasperPluginRMI.OUTPUT_FORMAT.VIEW the pdf has always downloaded into the users download folder. Have a new system where the file is downloaded onto a folder on the server. How can i change this so that the file downloads locally?

Thanks

Hi Richard,

try to pass Boolean true as 3rd parameter.
This should make plugins.jasperPluginRMI.runReport return a byteArray

Then write the file as below, this should put in your download folder

plugins.file.writeFile('myReport.pdf', Array<byte>, 'application/pdf')

Hope this helps

Hi Marc,

Thanks, looks this this should solve he problem.