Stop Jasper report download.

Hello,

This question is related to Jasper plugin.

I want to generate reports in PDF and EXCEL format for which I am using the below code.

/**@type {Array<byte>}*/
dapReportByFormat.pdf = plugins.jasperPluginRMI.runReport(dapFs,'dap.jasper',null,
      plugins.jasperPluginRMI.OUTPUT_FORMAT.PDF,null);

But I don’t want to download this report onto the local client machine, instead, I want the byte code only and handle my requirement. Is there any way to stop the auto download of the report.

Thanks in advance.

PS: Catching the bytes works; however I don’t want the report downloaded onto local machine.

Sovan

Hello,

Got it solved.

Providing a file absolute path in the “argument” param of Jasper plugins run report method solves the download issue. I was passing null instead.

dapReportByFormat.pdf = plugins.jasperPluginRMI.runReport(dapFs,'dap.jasper',pdTempfFile.getAbsolutePath(),
						plugins.jasperPluginRMI.OUTPUT_FORMAT.PDF,null);

Sovan