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

hansimeise

Members
  • Posts

    1
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by hansimeise

  1. Hi, experienced a problem quite similar to this one. Found here the most appropriate place to put my question. The current FAQ propose to pass a datasource via parameter map to the subreport. No doubt, this is doing fine. But now I'm facing another challenge. Your help would be appreciated. Want to pass the datasource that is exclusively destined for the level 2 (nested in subreport of level 1) subreport from java code to master report as map from the master report as parameter via level1 SubReport as a subreport (l2) datasource expression to level2SubReport (nested). Trying to do so (in a lot of ways: single sub parameter, sub parameter map, parameterMap.get(...), ${param}, doing a handstand while launching java program etc....) keeps my report a blank page :-( This is not the expected behaviour ;-) The cross-check, that there are data that can be displayed in subreport level 2: When I change the Java Code in order to leave the master report out, the JasperFillManager (and the JasperExportManager) have no problem at all to produce the expected (non-blank) *.pdf file by filling level1 SubReport (and that means filling level 2 subreport, too) :-| I read a lot of explaining how to manage this. I followed every of these instructions and ... lots of blank pages. No subreport level 2 printed. So, my asking is: Please provide a COMPLETE AND RUNNING example how to pass a datasource untouched to a subreport of a subreport. Passing the master datasource through the levels is not what I want. Both, working Java code in company with the working *.jrxml is what I would appreciate (version 3.5.2). Regards, Hansi Code:JasperReport jasperReport = JasperCompileManager.compileReport(tempUserDir + REPORT_NAME_WITHOUT_SUFFIX + ".jrxml");...MyDemoJRDataSource tempSubReportDataSource = new MyDemoJRDataSource(tempStyles); HashMap tempParameters = new HashMap(); tempParameters.put("SubDs", tempSubReportDataSource); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, tempParameters, new JREmptyDataSource()); /* * 3) Output the printable report. */ JasperExportManager.exportReportToPdfFile(jasperPrint, REPORT_NAME_WITHOUT_SUFFIX + ".pdf");
×
×
  • Create New...