Jump to content
Changes to the Jaspersoft community edition download ×

timeseries problem


cavolobull

Recommended Posts

Hi, my problem is with a timeseries chart.

The result is the chart with no data.

In the Expression period I put:

$F{DATA} is a Timestamp.

And in the period I choose DAY.

 

Is it correct to put directly a Timestamp in the expression?

 

Do Anybodoy have an example of timeseries chart?

 

Thanks

 

my xml is

 

<?xml version="1.0" encoding="UTF-8" ?>

<!-- Created with iReport - A designer for JasperReports -->

<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">

<jasperReport

name="Prova_master"

columnCount="1"

printOrder="Vertical"

orientation="Portrait"

pageWidth="842"

pageHeight="595"

columnWidth="782"

columnSpacing="0"

leftMargin="30"

rightMargin="30"

topMargin="20"

bottomMargin="20"

whenNoDataType="NoPages"

isTitleNewPage="false"

isSummaryNewPage="false">

<property name="ireport.scriptlethandling" value="0" />

<property name="ireport.encoding" value="UTF-8" />

<import value="java.util.*" />

<import value="net.sf.jasperreports.engine.*" />

<import value="net.sf.jasperreports.engine.data.*" />

 

<parameter name="SUBREPORT_DIR" isForPrompting="false" class="java.lang.String">

<defaultValueExpression ><![CDATA["C:\decompila\"]]></defaultValueExpression>

</parameter>

<queryString><![CDATA[select NOMINALE_INIZIALE, ESPOSIZIONE_NETTA_CTP, ID_ASSET, NOME, DATA from DATASET where ESPOSIZIONE_NETTA_CTP is not null and NOMINALE_INIZIALE is not null and ID_ASSET is not null]]></queryString>

 

<field name="NOMINALE_INIZIALE" class="java.math.BigDecimal"/>

<field name="ESPOSIZIONE_NETTA_CTP" class="java.math.BigDecimal"/>

<field name="ID_ASSET" class="java.math.BigDecimal"/>

<field name="NOME" class="java.lang.String"/>

<field name="DATA" class="java.sql.Timestamp"/>

 

<background>

<band height="0" isSplitAllowed="true" >

</band>

</background>

<title>

<band height="50" isSplitAllowed="true" >

<staticText>

<reportElement

x="159"

y="5"

width="465"

height="40"

key="staticText"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement>

<font size="30"/>

</textElement>

<text><![CDATA[Classic Report Template (Landscape)]]></text>

</staticText>

<line direction="TopDown">

<reportElement

x="0"

y="48"

width="781"

height="0"

forecolor="#000000"

backcolor="#FFFFFF"

key="line"/>

<graphicElement stretchType="NoStretch"/>

</line>

<line direction="TopDown">

<reportElement

x="0"

y="3"

width="781"

height="0"

forecolor="#000000"

backcolor="#FFFFFF"

key="line"/>

<graphicElement stretchType="NoStretch"/>

</line>

</band>

</title>

<pageHeader>

<band height="400" isSplitAllowed="true" >

<timeSeriesChart>

<chart hyperlinkTarget="Self" >

<reportElement

x="48"

y="2"

width="716"

height="396"

key="element-1"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<chartLegend textColor="#000000" backgroundColor="#FFFFFF" >

</chartLegend>

</chart>

<timeSeriesDataset>

<dataset incrementType="Report" >

</dataset>

<timeSeries>

<seriesExpression><![CDATA[$F{NOME}]]></seriesExpression>

<timePeriodExpression><![CDATA[$F{DATA}]]></timePeriodExpression>

<valueExpression><![CDATA[$F{NOMINALE_INIZIALE}]]></valueExpression>

<itemHyperlink >

</itemHyperlink>

</timeSeries>

</timeSeriesDataset>

<timeSeriesPlot >

<plot />

<timeAxisFormat>

<axisFormat >

</axisFormat>

</timeAxisFormat>

<valueAxisFormat>

<axisFormat >

</axisFormat>

</valueAxisFormat>

</timeSeriesPlot>

</timeSeriesChart>

</band>

</pageHeader>

<columnHeader>

<band height="18" isSplitAllowed="true" >

</band>

</columnHeader>

<detail>

<band height="0" isSplitAllowed="true" >

</band>

</detail>

<columnFooter>

<band height="0" isSplitAllowed="true" >

</band>

</columnFooter>

<pageFooter>

<band height="27" isSplitAllowed="true" >

</band>

</pageFooter>

<summary>

<band height="0" isSplitAllowed="true" >

</band>

</summary>

</jasperReport>

Post edited by: cavolobull, at: 2007/03/14 16:15

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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