Jump to content

iReport theme to jasperreports environment


mkeym

Recommended Posts

Hello,

ich try for a long time to generate a TimeSeriesChart in JasperReports. In iReport it works fine.

But when i use the jrxml from iReport in JasperReports Environment i get tis error:

java.lang.NoSuchMethodError: org.jfree.chart.ChartFactory.setChartTheme

 

I found out on this page (http://blog.altosresearch.com/howto-integrate-jasperreports-chart-themes/) how to integrate the chart engine from iReport to JasperReports.

 

But i have some problems do understand the invisible steps.

Can somebody help me how to integrate chart theme to jasperreports.

 

I have created a report file (*.jrxml) but how can i add the chart theme (*.jrctx) to the report file.

Is this jrctx correct?

 

Greats

Code:
My report file *.jrxml<?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="mycustomtheme" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">	<background>		<band splitType="Stretch"/>	</background>	<title>		<band height="79" splitType="Stretch"/>	</title>	<summary>		<band height="305" splitType="Stretch">			<timeSeriesChart>				<chart>					<reportElement x="187" y="44" width="200" height="180"/>					<chartTitle/>					<chartSubtitle/>					<chartLegend/>				</chart>				<timeSeriesDataset/>				<timeSeriesPlot>					<plot/>					<timeAxisFormat>						<axisFormat>							<labelFont/>							<tickLabelFont/>						</axisFormat>					</timeAxisFormat>					<valueAxisFormat>						<axisFormat>							<labelFont/>							<tickLabelFont/>						</axisFormat>					</valueAxisFormat>				</timeSeriesPlot>			</timeSeriesChart>		</band>	</summary></jasperReport>My *.jrctx:<?xml version="1.0" encoding="UTF-8"?><chart-theme/>
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

mkeym
Wrote:

I have created a report file (*.jrxml) but how can i add the chart theme (*.jrctx) to the report file.

In iReport, select the theme in the Template Inspector pane and do Export as jar.  Then add the jar to the iReport classpath, open the report and chose the theme for the chart.

HTH,

Lucian

Link to comment
Share on other sites

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