I have a main report and a subreport working fine in Jaspersoft. (data from mysql) I'm trying generating a pdf using PHPJasper (geekcom), but I have the following problem:
Error filling reportResource not found at: subreport.jasper
I assume it's just a problem at this line:
<subreportExpression><![CDATA["subreport.jasper"]]></subreportExpression>
Both reports are at same folder
How to set the path?
You could parametrize an absolute path to the subreport:
In the main report, create a new parameter, e.g. subreportsPath
, class java.lang.String
In this parameter subreportsPath properties, search for "Default Value Expression" and write "."
In the main report editor/design view, click the subreport, find its "Expression" property and change it to $P{subreportsPath} +"/mySubreport.jasper"
Now, you can pass an absolute path to your subreportsPath parameter from your library code, e.g.
array('subreportsPath' => 'C:/project/reports/reportX')