Jump to content
  • Pass JSON from main report and create dataset in subreport


    sthomas_3
    • Version: v6.4 Product: JasperReports Server JSON Data Source

    Issue:

    Pass json data from Main report to sub report and then to Table dataset.


    Solution:

    For passing the data from main report to subreport it could be done as below:

    [toc]
    <dataSourceExpression>
        <![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("data")]]>
    </dataSourceExpression>
    

    And for passing from Subreport to table dataset it can be done via same expression given as below:

    <dataSourceExpression>
        <![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("tableData")]]>
    </dataSourceExpression>
    

    json.jpg.48959d47bd50dd0be314447642351580.jpg


    User Feedback

    Recommended Comments



    Guest
    This is now closed for further comments

×
×
  • Create New...