hesus Posted December 22, 2009 Share Posted December 22, 2009 Hi there!I'm trying to create a simple report with some charts, to visualise some data. currently i'm having following problem: while generating preview in iReport as a result i get as many pie-charts, as there are items in database:1st- with first item2nd - with first and second items3rd - with first, second and third itemand so on. i would like to get just one (final) chart with all items in it.i'm using sample database from xml file (attached). so if anyone could grant me with some kind of solution i would be very gratefulCode:<countries> <c> <name>Spain</name> <points>15</points> </c> <c> <name>France</name> <points>24</points> </c> <c> <name>Ireland</name> <points>75</points> </c> <c> <name>UK</name> <points>10</points> </c> <c> <name>Croatia</name> <points>5</points> </c> <c> <name>Austria</name> <points>86</points> </c> <c> <name>Poland</name> <points>50</points> </c> <c> <name>Germany</name> <points>66</points> </c></countries> Link to comment Share on other sites More sharing options...
hesus Posted December 23, 2009 Author Share Posted December 23, 2009 me again :)i just noticed that i get the same results when generating reports via JasperReports 3.7.0 in my webApp. data comes from oracle-database i include my jrxml file code, and resulting pdf file. if anyone could help it would be wonderful.Code:<?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="pieRep" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <queryString> <![CDATA[sELECT LCT_USERS."USR_ID" AS LCT_USERS_USR_ID, LCT_USERS."USR_AUDIT_CU" AS LCT_USERS_USR_AUDIT_CUFROM "CLMFFP_35_EV"."LCT_USERS" LCT_USERSWHERE USR_AUDIT_CU > 50]]> </queryString> <field name="LCT_USERS_USR_ID" class="java.math.BigDecimal"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="LCT_USERS_USR_AUDIT_CU" class="java.math.BigDecimal"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <title> <band splitType="Stretch"/> </title> <pageHeader> <band splitType="Stretch"/> </pageHeader> <columnHeader> <band splitType="Stretch"/> </columnHeader> <detail> <band height="230" splitType="Stretch"> <pie3DChart> <chart> <reportElement x="0" y="0" width="555" height="230"/> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <pieDataset> <dataset incrementType="Report"/> <keyExpression><![CDATA[$F{LCT_USERS_USR_ID}]]></keyExpression> <valueExpression><![CDATA[$F{LCT_USERS_USR_AUDIT_CU}]]></valueExpression> </pieDataset> <pie3DPlot> <plot/> <itemLabel color="#000000" backgroundColor="#FFFFFF"/> </pie3DPlot> </pie3DChart> </band> </detail> <columnFooter> <band splitType="Stretch"/> </columnFooter> <pageFooter> <band splitType="Stretch"/> </pageFooter> <summary> <band splitType="Stretch"/> </summary></jasperReport> Link to comment Share on other sites More sharing options...
hesus Posted December 23, 2009 Author Share Posted December 23, 2009 ok, got it:) charts cannot go into details section :) you can delete this thread. 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