Subreport location is not identifying


Hello team,

My main report and subreports are in the same location. which is WEB-INF/reports/

I'm setting this location in java class like below 

path2reports = context.getRealPath("WEB-INF/reports");


The subreport integration in main report looks like below:

<parameter name="path2reports" class="java.lang.String" isForPrompting="false">

+ "subreport.jasper"]]></subreportExpression>

subreport compiles fine individually but when I compile main report I get the below error.

Error filling print... Resource not found at : null\subreport.jasper
net.sf.jasperreports.engine.JRException: Resource not found at : null\subreport.jasper 
    at net.sf.jasperreports.repo.RepositoryUtil.getResourceFromLocation( 

It means it is taking path2reports as null

Am I missing something here.

Any help is appreciated. 


deepa.23.nagaraj's picture
Joined: Mar 14 2021 - 11:08pm
Last seen: 1 day 2 hours ago

0 Answers:

No answers yet