Page 1 of 1

Stop Jasper report download.

PostPosted: Wed May 18, 2016 12:13 pm
by sovanm
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.

Code: Select all
/**@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

Re: Stop Jasper report download.

PostPosted: Thu May 19, 2016 9:36 am
by sovanm
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.

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


Sovan