Jump to content
We've recently updated our Privacy Statement, available here ×

How to stop sub reports spliting into multiple tabs when downloading An EXCEL sheet from jasper server using REST client API.


Recommended Posts

Hi all,

I have a main report which has 3 sub reports.I uploaded it to the jasper server and downloaded the excel sheet.I'm getting the data 3 tabs only which is the expected output.But when I download the excel sheet from my rest client api the data is splitting into multiple tabs.How controll the tabs by using java ? I'm using follwoing code to download it from jasperserver.

@Test
public void testGetBigReportAsExcelFile() {
LOGGER.debug("testGetBigReportAsExcelFile");
try {
Report report = new Report();
report.setFormat(Report.FORMAT_EXCEL);
report.setUrl("/reports/10");
report.setOutputFolder(outPutDir.getAbsolutePath());
LOGGER.info(report.toString());
JasperserverRestClient client = JasperserverRestClient.getInstance(serverUrl, serverUser, serverPassword);
File reportFile = client.getReportAsFile(report);
assertNotNull(reportFile);
LOGGER.debug("reportFile:"+reportFile.getAbsolutePath());
} catch (Exception e) {
//fail(e.getMessage(), e);
e.printStackTrace();
}
Thanks,
Naveen.
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...