Problem creating report with different sections using single XML data source

0

I'm new to JasperReports and am trying to get a working report that contains three different unrelated sections using an XML file as the data source. It seems the correct approach is to use subreports. Thus, I have been able to create the subreports successfully, but no subreport data appears in the master report when they are included. The culprit appears to be an incorrect data source specification for each subreport when it's added to the master report. Is what I'm trying to do feasible?  Any advice would be appreciated.

The XML data for the report is below. I've created subreports for TotalDocument, MetadataStatusTallies and ReportDates.

<TallyReport>
  <row>
    <TotalDocuments>
      <row total_documents="893" total_number_of_pages="40537" />
    </TotalDocuments>
    <MetadataStatusTallies>
      <row metadata_status="Approved" total_documents_by_status="551" total_number_of_pages_by_status="23059" />
      <row metadata_status="Draft" total_documents_by_status="261" total_number_of_pages_by_status="13327" />
      <row metadata_status="In Progress" total_documents_by_status="81" total_number_of_pages_by_status="4151" />
    </MetadataStatusTallies>
    <ReportDates>
      <row tally_name="Report Date" date_range="a. 2014-present" number_docs_in_range="0" />
      <row tally_name="Report Date" date_range="b. 2012-2013" number_docs_in_range="2" />
      <row tally_name="Report Date" date_range="c. 2010-2011" number_docs_in_range="76" />
      <row tally_name="Report Date" date_range="d. 2008-2009" number_docs_in_range="124" />
      <row tally_name="Report Date" date_range="e. 2006-2007" number_docs_in_range="195" />
      <row tally_name="Report Date" date_range="f. 2004-2005" number_docs_in_range="196" />
      <row tally_name="Report Date" date_range="g. 2000-2003" number_docs_in_range="134" />
      <row tally_name="Report Date" date_range="h. 1990-1999" number_docs_in_range="105" />
      <row tally_name="Report Date" date_range="i. Prior to 1990" number_docs_in_range="32" />
    </ReportDates>
  </row>
</TallyReport>

djohnson_2's picture
Joined: Jul 23 2015 - 9:14am
Last seen: 4 years 1 month ago

0 Answers:

No answers yet
Feedback