Stop Jasper report download.

Questions and answers on developing, deploying and using plugins and JavaBeans

Stop Jasper report download.

Postby sovanm » Wed May 18, 2016 12:13 pm

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
sovanm
 
Posts: 99
Joined: Fri Oct 28, 2011 1:55 pm
Location: Bhubaneswar, India

Re: Stop Jasper report download.

Postby sovanm » Thu May 19, 2016 9:36 am

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
sovanm
 
Posts: 99
Joined: Fri Oct 28, 2011 1:55 pm
Location: Bhubaneswar, India


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 4 guests