Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6138733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:54:11+00:00 2026-05-23T17:54:11+00:00

I have generated a report (with JasperReport). My problem that the chart repeats, I

  • 0

I have generated a report (with JasperReport). My problem that the chart repeats, I have one chart and the report contains 22 pages! What is the problem?

This is my report:

<?xml version="1.0" encoding="UTF-8"?>
 <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<subDataset name="New Dataset 1">
    <parameter name="SQL" class="java.lang.String"/>
    <parameter name="Titre" class="java.lang.String">
        <defaultValueExpression><![CDATA[]]></defaultValueExpression>
    </parameter>
    <queryString>
        <![CDATA[$P!{SQL}]]>
    </queryString>
    <field name="nb" class="java.lang.Long"/>
    <field name="champ1" class="java.lang.String"/>
    <field name="champ2" class="java.lang.String"/>
</subDataset>
<parameter name="SQL" class="java.lang.String">
    <defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="Titre" class="java.lang.String"/>
<queryString>
    <![CDATA[select id from jiraissue]]>
</queryString>
<field name="id" class="java.math.BigDecimal"/>
<background>
    <band splitType="Stretch"/>
</background>
<title>
    <band height="46" splitType="Stretch">
        <textField>
            <reportElement x="89" y="15" width="180" height="20"/>
            <textElement/>
            <textFieldExpression class="java.lang.String"><![CDATA[$P{Titre}]]></textFieldExpression>
        </textField>
    </band>
</title>
<pageHeader>
    <band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
    <band height="13" splitType="Stretch"/>
</columnHeader>
<detail>
    <band height="185" splitType="Stretch">
        <stackedBar3DChart>
            <chart>
                <reportElement x="57" y="16" width="420" height="165"/>
                <chartTitle/>
                <chartSubtitle/>
                <chartLegend/>
            </chart>
            <categoryDataset>
                <dataset>
                    <datasetRun subDataset="New Dataset 1">
                        <datasetParameter name="SQL">
                            <datasetParameterExpression><![CDATA[$P{SQL}]]></datasetParameterExpression>
                        </datasetParameter>
                        <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                    </datasetRun>
                </dataset>
                <categorySeries>
                    <seriesExpression><![CDATA[$F{champ2}]]></seriesExpression>
                    <categoryExpression><![CDATA[$F{champ1}]]></categoryExpression>
                    <valueExpression><![CDATA[$F{nb}]]></valueExpression>
                </categorySeries>
            </categoryDataset>
            <bar3DPlot>
                <plot/>
                <itemLabel color="#000000" backgroundColor="#FFFFFF"/>
                <categoryAxisFormat>
                    <axisFormat>
                        <labelFont/>
                        <tickLabelFont/>
                    </axisFormat>
                </categoryAxisFormat>
                <valueAxisFormat>
                    <axisFormat>
                        <labelFont/>
                        <tickLabelFont/>
                    </axisFormat>
                </valueAxisFormat>
            </bar3DPlot>
        </stackedBar3DChart>
    </band>
</detail>
<columnFooter>
    <band height="24" splitType="Stretch"/>
</columnFooter>
<pageFooter>
    <band height="20" splitType="Stretch"/>
</pageFooter>
<summary>
    <band height="22" splitType="Stretch"/>
</summary>

Update
I have solved the problem by moving the chart to the summary part 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:54:12+00:00Added an answer on May 23, 2026 at 5:54 pm

    In Jasper Report, everything you place in the detail band is repeated number of times it appears in the source.

    If you want to show anything (not only chart) just once, avoid the detail band.
    For example, you can place it in the summary section.

    Update: As others pointed, I have extended my answer a little bit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At work, we have a report that is generated with IP's in it. There
I have an application that generates around 10000 printed pages per month. Each report
I have a report that has a snapshot generated weekly based on a default
I have a server with an asp page on it that generates a report
I have a database of meetings. I can generate a report that sorts the
I have a controller (Spring-MVC) that generates a PDF report on a get request.
I have small web app that generate PDF files as a report. I'm trying
iReport Version : 3.7.1 I approached this problem in two ways. My first method
I have an auto-generated file which looks something like this... static void do_SomeFunc1(void* parameter)
I have problem related to file protection when changed the Jasper Report output from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.