mzzl Posted December 11, 2006 Share Posted December 11, 2006 Hi, I need to place a graph to the left of a table. I tried to do this by putting the table in a subreport. It is working, but the first row of the rubreport is always missing. I have verified that all rows do get passed properly to JasperFillManager.fillReport(). All rows are displayed properly when I use only the subreport template instead of the master template with the subreport in it. Is this a bug, or have I made a mistake? I'm using the following libraries: commons-beanutils-1.5.jarcommons-collections-2.1.jarcommons-digester-1.7.jarcommons-logging-1.0.2.jaritext-1.3.1.jarjasperreports-1.2.8.jarpoi-2.0-final-20040126.jarxercesImpl.jar (version uncertain)xml-apis.jar (version uncertain) I'm using something like the following code to fill the report:Code:JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, myHashMapOfParameters, new JRBeanCollectionDataSource(myArrayListOfBeans)); Help is very much appreciated. The relevant section of the master report is as follows: Code:[code] <detail> <band height="360" isSplitAllowed="true" > <subreport isUsingCache="false"> <reportElement mode="Opaque" x="370" y="0" width="400" height="360" key="subreport-1" isPrintWhenDetailOverflows="true"/> <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression> <subreportParameter name="piecharturl"> <subreportParameterExpression><![CDATA[$P{piecharturl}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="date"> <subreportParameterExpression><![CDATA[$P{date}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="currency"> <subreportParameterExpression><![CDATA[$P{currency}]]></subreportParameterExpression> </subreportParameter> <dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression> <subreportExpression class="java.lang.String"><![CDATA["C:\Path\To\jaspertemplates\mysubreport.jasper"]]></subreportExpression> </subreport> <image scaleImage="Clip" vAlign="Top" hAlign="Center" isUsingCache="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="10" y="19" width="200" height="180" forecolor="#000000" backcolor="#FFFFFF" key="image-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="NoStretch" pen="None" fill="Solid" /> <imageExpression class="java.lang.String"><![CDATA[$P{piecharturl}]]></imageExpression> </image> </band> </detail> Link to comment Share on other sites More sharing options...
lucianc Posted December 12, 2006 Share Posted December 12, 2006 Don't do <dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression>. Read this post http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=8&id=556#556. HTH,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now