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

Time series problem


joksy82

Recommended Posts

Dear All,

I'm new to jasper and it own related technologies.

 

I loose a day to try to build a time series which match some requirement but without luck!!

The goal is to build a  report sales chart depending of the payementtype Es VISA MasterCard and so on.

I group all the payement type for having a chart for each one, but i have no idea how to specified different series for different chart.

 

I post the code and the pdf produced.

and i hope which someone are able to help me!!

 

Many many thanks

 

Kindly regards!

Joksy

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="sales" language="java" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" 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"/>	<queryString>		<![CDATA[sELECT o.creationdate, count(mo.quantita) as quantita ,sum(o.totalepagamento) as soldi,met.nome as pagamento  FROM modello_ordine mo  inner join ordine o on o.idordine=mo.idordine inner join payementtype met on o.idmetodopagamento=met.payementtype  group by  o.creationdate order by pagamento]]>	</queryString>	<field name="creationdate" class="java.sql.Timestamp"/>	<field name="quantita" class="java.lang.Long"/>	<field name="soldi" class="java.lang.Double"/>	<field name="pagamento" class="java.lang.String"/>	<group name="pagamenti">		<groupExpression><![CDATA[$F{pagamento}]]></groupExpression>		<groupHeader>			<band height="521">				<textField>					<reportElement x="0" y="0" width="100" height="20"/>					<textElement/>					<textFieldExpression class="java.lang.String"><![CDATA[$F{pagamento}]]></textFieldExpression>				</textField>				<timeSeriesChart>					<chart>						<reportElement x="0" y="20" width="802" height="487"/>						<chartTitle/>						<chartSubtitle/>						<chartLegend/>					</chart>					<timeSeriesDataset>						<timeSeries>							<seriesExpression><![CDATA[$F{pagamento}]]></seriesExpression>							<timePeriodExpression><![CDATA[$F{creationdate}]]></timePeriodExpression>							<valueExpression><![CDATA[$F{quantita}]]></valueExpression>						</timeSeries>					</timeSeriesDataset>					<timeSeriesPlot isShowLines="true" isShowShapes="false">						<plot/>						<timeAxisFormat>							<axisFormat verticalTickLabels="true">								<labelFont/>								<tickLabelFont/>							</axisFormat>						</timeAxisFormat>						<valueAxisFormat>							<axisFormat verticalTickLabels="false">								<labelFont/>								<tickLabelFont/>							</axisFormat>						</valueAxisFormat>					</timeSeriesPlot>				</timeSeriesChart>			</band>		</groupHeader>	</group>	<background>		<band splitType="Stretch"/>	</background>	<title>		<band height="14" splitType="Stretch"/>	</title>	<summary>		<band height="162" splitType="Stretch"/>	</summary></jasperReport>
Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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