Jump to content
Changes to the Jaspersoft community edition download ×

JasperFillManager and nested subreports


Recommended Posts

Hi, Newbie, here. I seem to be having difficulty getting the following to work for the "subSubReport".


I have tried with or without datasource in the subSubReport to no avail; regardless of what I try, I see the report data, subreport data, but no subSuReport data... help?



FillReportForm fillReport = (FillReportForm) form;

String formReportName = fillReport.getFillReportName().toString();
String subReportName = fillReport.getFillSubReportName().toString();
String subSubReportName = fillReport.getFillSubSubReportName().toString();
if (!fillReport.getFillSubReportName().equalsIgnoreCase("null"«»)){
JasperReport subreport = (JasperReport)JRLoader.loadObject(context.getRealPath("/pages/reports/" + subReportName + ".jasper"«»));
parameters.put(subReportName, subreport);
if (!fillReport.getFillSubSubReportName().equalsIgnoreCase("null"«»)){
JasperReport subreport = (JasperReport)JRLoader.loadObject(context.getRealPath("/pages/reports/" + subSubReportName + ".jasper"«»));
parameters.put(subSubReportName, subreport);

String fileName = context.getRealPath("/pages/reports/" + formReportName + ".jasper"«»);
String pdfName = context.getRealPath("/pages/reports/pdf/" + formReportName);
DataSource ds = (javax.sql.DataSource) context.getAttribute("dppDB"«»);
Connection connection = ds.getConnection();
JasperPrint jasperPrint = (JasperPrint) JasperFillManager.fillReport(fileName, parameters, connection);

Post edited by: rcmpjames, at: 2007/02/02 19:54

Link to comment
Share on other sites

  • 1 month later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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...