I have main report & one subreport (I have used sub report in main reports title band), I have set some alignment & fonts for some of the text fields & static text fields. When I run it via Jasper reports Preview mode it works fine, even export is proper if I export it via preview mode.
But when I am running same .jrxml (main & sub report .jrxml) via java code, the content of main report are getting displayed proper as I want, but only the contents of sub report are not proper aligned.
Please let me know the answers, thanks in advance.
Here is the sub report xml code:
<title>
<band height="92" splitType="Stretch">
<subreport>
<reportElement x="0" y="1" width="1980" height="89" isPrintInFirstWholeBand="true" uuid="a3d62877-7e70-4ea0-8d6b-0f658e37a78d"/>
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource ($P{exitMethodReport_SubReportDatasource}.getData())]]></dataSourceExpression>
<subreportExpression><![CDATA["exit_method_subreport.jasper"]]></subreportExpression>
</subreport>
</band>
</title>