Jump to content
Changes to the Jaspersoft community edition download ×


  • Posts

  • Joined

  • Last visited

sunflowerrahul's Achievements


Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges



  1. is this feature available with jasper report 5.5 version?
  2. Yeah, i have fixed the issue. I was not apssing the paramter from main report for subreport 2. So we need to pass the paramter from mainreport to subreport then subreport1 . Also in the java also in the main report only we need to set the parameter.
  3. Hi Guys, I have scenario where MainReport has subreport1 and subreport1 has subreport2? Able to display the value till the subreport1 level but not able to print the subreport2 under the subreport1 :( I am struggling from last 4 days. MainReport-->SubReport1--> SubReport2. I have to use XMLDataSource. Issue with subreport1-->subreport2 value coming null. InputSource is = new InputSource();is.setCharacterStream(new StringReader(xmlString));Document document = db.parse(is); reportParams.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT,document);reportParams.put(JRXPathQueryExecuterFactory.XML_DATE_PATTERN, "dd-MMM-yyyy");reportParams.put(JRXPathQueryExecuterFactory.XML_NUMBER_PATTERN, "#,##0.##");reportParams.put(JRXPathQueryExecuterFactory.XML_LOCALE, Locale.ENGLISH);reportParams.put(JRParameter.REPORT_LOCALE, Locale.US);/*subReport1*/ JasperReport subReport1= (JasperReport) JRLoader.loadObjectFromFile(request.getSession().getServletContext().getRealPath("/")+ "Reports/subReport1.jasper"); reportParams.put("SUBREPORT1", subReport1); /* subreport2*/ JasperReport subReport2 = (JasperReport) JRLoader.loadObjectFromFile(request.getSession().getServletContext().getRealPath("/") + "Reports/subreport2.jasper");reportParams.put("SUBREPORT2", tradeDetailsSubReport); /*Main Report*/ JasperPrint jasperPrintReport = JasperFillManager.fillReport(request.getSession().getServletContext().getRealPath("/")+ "Reports/main.jasper", reportParams); In the main.jasper<parameter name="SUBREPORT1" class="net.sf.jasperreports.engine.JasperReport"/> In the subreport1.jasper<parameter name="SUBREPORT2" class="net.sf.jasperreports.engine.JasperReport"/>Passing the same "XML_DATA_DOCUMENT" as parameter in the subQuery. Report is generated using the JasperStudio with the dummy xmlDataSource by passing harcoding the name of the subreport file name. Please let me know , am i doing wrong, seems in Java i have to do change.please suggest
  • Create New...