joksy82 Posted August 30, 2010 Share Posted August 30, 2010 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!JoksyCode:<?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 More sharing options...
joksy82 Posted September 14, 2010 Author Share Posted September 14, 2010 Is nice to know that none are able to help me. So exist a payement forum?? 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