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

sct999.1

Members
  • Posts

    2
  • Joined

  • Last visited

sct999.1's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I already implemented the chart customizer suggested in this question: http://community.jaspersoft.com/questions/539659/how-show-percentage-decimal-value-pie-chart I adapted it to use a normal pie chart: import net.sf.jasperreports.engine.JRChart;import net.sf.jasperreports.engine.JRChartCustomizer;import org.jfree.chart.JFreeChart;import org.jfree.chart.labels.StandardPieSectionLabelGenerator;import org.jfree.chart.plot.PiePlot;public class PiePercentageCustomizer implements JRChartCustomizer{ @Override public void customize(JFreeChart jFreeChart, JRChart jrChart) { PiePlot piePlot = (PiePlot) jFreeChart.getPlot(); ((StandardPieSectionLabelGenerator)piePlot.getLabelGenerator()).getPercentFormat().setMaximumFractionDigits(2); } }[/code]I generate a jar file and added it to my application classpath. The problem is when I render my report I get the following exception: Classjava.lang.ClassCastExceptionMessagenet.sf.jasperreports.charts.util.PieLabelGenerator cannot be cast to org.jfree.chart.labels.StandardPieSectionLabelGenerator My application is a grails 2.3.11 project using the jasper plugin 1.11.0 Any help will be appreciated
  2. sct999.1

    Error

    Facing the same error too. The error is raised only when I deploy the report into a grails application running on tomcat server, in development environment works fine.
×
×
  • Create New...