Subreport isn't showing


Hello, I'm trying to pass a parameter from Java to Jaspersoft including a subreport that I've compiled into a JasperReport and some other values:

def subReport = classPathResourceLoader.getResourceAsStream("classpath:reports/subReport.jrxml");
parameters.put("subReport", JasperCompileManager.compileReport(subReport.get()));

I've also changed the main report's source code to use the parameters passed:

    <subreportParameter name="firstName">

As you can see I've also passed another parameter called firstName and I'm displaying it as well, however the subreport still isn't showing. What am I lacking? I hope you can help, thanks.

blamblam's picture
Joined: Apr 26 2021 - 6:37pm
Last seen: 21 hours 12 min ago


<!-- This is the size of your report -->

<reportElement x="0" y="0" width="200" height="100" uuid="8f4cd4e3-6e61-4116-baa9-7f819d8fc142"/>

<subreportParameter name="param">



<!-- By Default you have to put this  -->   


 <!-- Here is the path of your jasper file -->        


 <!-- you can pass also using parameter -->        



mahadiosb - 2 days 11 hours ago

Thank you, I can't believe I missed that.

blamblam - 23 hours 24 min ago

0 Answers:

No answers yet