Jump to content
We've recently updated our Privacy Statement, available here ×

First table row in subreport missing


mzzl

Recommended Posts

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.jar

commons-collections-2.1.jar

commons-digester-1.7.jar

commons-logging-1.0.2.jar

itext-1.3.1.jar

jasperreports-1.2.8.jar

poi-2.0-final-20040126.jar

xercesImpl.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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...