Jump to content
Changes to the Jaspersoft community edition download ×

Jaspersoft Studio: Report with charts repeats many times


Recommended Posts

I have generated a report with JasperSoft Studio. Template is quite large and has 2 pages. (detail: band1 & band2) It works wonderfully without chart. Chart should be placed in the middle of the first page (and to the right).

Problem: page repeats with the chart. I have the report contains 6 pages!

Can anyone help me please? Thanks a lot!

Code looks like this:

...<parameter name="par1" class="java.lang.String"/><parameter name="par2" class="java.lang.String"/><parameter name="parN" class="java.lang.String"/><parameter name="cdKey" class="java.lang.String"/><parameter name="cdLabel" class="java.lang.String"/><parameter name="cdValue" class="java.lang.Double"/><field name="cdKey" class="java.lang.String"/><field name="cdLabel" class="java.lang.String"/><field name="cdValue" class="java.lang.Double"/><pageHeader>    <band height="60" splitType="Stretch"/></pageHeader><detail>    <band height="445" splitType="Stretch">        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>        <pie3DChart>            <chart evaluationTime="Report">                <reportElement x="620" y="50" width="150" height="58" uuid="cab3dff1-8036-4b61-a455-64b63b0ff25a"/>                <chartTitle/>                <chartSubtitle/>                <chartLegend/>            </chart>            <pieDataset>                <keyExpression><![CDATA[$F{cdKey}]]></keyExpression>                <valueExpression><![CDATA[$F{cdValue}]]></valueExpression>                <labelExpression><![CDATA[$F{cdLabel}]]></labelExpression>            </pieDataset>            <pie3DPlot>                <plot/>                <itemLabel/>            </pie3DPlot>        </pie3DChart>    </band>    <band height="445" splitType="Stretch">            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>    </band></detail><pageFooter>    <band height="40" splitType="Stretch"/></pageFooter> // Java code:// chartData.add(new ChartData("notebook", "Notebook", 95.0));// chartData.add(new ChartData("keyboard", "Keyboard", 4.0));// chartData.add(new ChartData("mouse", "mouse", 1.0));[/code]


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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