-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to implementation subreports #159
Comments
There is more than one way to use a subreport. One of them is the way you tried, but instead of passing a *.jasper, you should pass a jrxml. Another way is by assigning only the name and extension of the subreport inside the jrxml, and the folder containing all the files that the report needs to pass as a parameter in resource. Here is a link to an example using the last option. To continue using the current approach, use the jrxml of the subreport instead of the jasper: Example link Example of how to use the second method mentioned <subreport>
<reportElement x="0" y="0" width="555" height="20" uuid="e0dc40ad-4995-4e54-ae42-82a0a9a58126">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).dataSource("/contacts/summary")]]></dataSourceExpression>
<subreportExpression><![CDATA["header.jasper"]]></subreportExpression>
</subreport> Here you can see why we require a jrxml in the way you are currently using. |
@arnaldocorreaxO |
How to implement subreports in pyreportjasper, do I have errors when trying to process the main report?
The text was updated successfully, but these errors were encountered: