Jump to content
JasperReports Library 7.0 is now available ×

What's wrong with my crosstab xml file?


Recommended Posts

By: gouwa - gouwa

What's wrong with my crosstab xml file?

2006-01-02 20:02

I can compile the xml file into .jasper without exception, but when show it in a html page, this shows blank page. Following is my raw jrxml file, PLZ show me what's wrong with it.

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

<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN"

"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">

 

<jasperReport name="ProductsReport" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="812" leftMargin="15" rightMargin="15" topMargin="10" bottomMargin="10">

<style name="Arial_Normal" isDefault="true" fontName="Arial" fontSize="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

<style name="Arial_Bold" isDefault="false" fontName="Arial" fontSize="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

 

<subDataset name="data">

<queryString><![CDATA[

SELECT txCatalog,devCatalogNo,monthDebitCount FROM month group by txCatalog,devCatalogNo

]]></queryString>

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

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

<field name="monthDebitCount" class="java.lang.Integer"/>

 

</subDataset>

 

 

 

<detail>

<band height="100">

<crosstab name="Test1" isRepeatColumnHeaders="false">

<reportElement x="0" y="20" width="812" height="60" mode="Opaque"/>

 

<crosstabDataset isDataPreSorted="true">

<dataset incrementType="Report">

<datasetRun subDataset="data">

</datasetRun>

</dataset>

</crosstabDataset>

 

 

<rowGroup name="txCata" width="70" totalPosition="End">

<bucket>

<bucketExpression class="java.lang.String">$F{txCatalog}</bucketExpression>

</bucket>

<crosstabRowHeader>

<cellContents>

<box leftBorder="2Point" bottomBorder="2Point" rightBorder="2Point"/>

<textField>

<reportElement x="5" y="5" width="60" height="15"/>

<textFieldExpression>$V{txCata}</textFieldExpression>

</textField>

</cellContents>

</crosstabRowHeader>

<crosstabTotalRowHeader>

<cellContents backcolor="#E0FFFF">

<box leftBorder="2Point" bottomBorder="2Point" rightBorder="2Point"/>

<staticText>

<reportElement x="5" y="5" width="60" height="15"/>

<text>Total</text>

</staticText>

</cellContents>

</crosstabTotalRowHeader>

</rowGroup>

 

 

<columnGroup name="devCata" height="30" totalPosition="End" headerPosition="Stretch">

<bucket>

<bucketExpression class="java.lang.String">$F{devCatalogNo}</bucketExpression>

</bucket>

<crosstabColumnHeader>

<cellContents>

<box topBorder="2Point" bottomBorder="2Point" rightBorder="2Point"/>

<textField>

<reportElement x="5" y="5" width="20" height="20"/>

<textElement textAlignment="Center" verticalAlignment="Middle"/>

<textFieldExpression class="java.lang.String">$V{devCata}</textFieldExpression>

</textField>

</cellContents>

</crosstabColumnHeader>

<crosstabTotalColumnHeader>

<cellContents backcolor="#FFFF60">

<box topBorder="2Point" bottomBorder="2Point" rightBorder="2Point"/>

<staticText>

<reportElement x="5" y="5" width="20" height="15"/>

<text>Total</text>

</staticText>

</cellContents>

</crosstabTotalColumnHeader>

</columnGroup>

 

<measure name="monthDebit" class="java.lang.Integer">

<measureExpression>$F{monthDebitCount}</measureExpression>

</measure>

 

<crosstabCell width="30" height="25">

<cellContents backcolor="#FFFFFF">

<box bottomBorder="1Point" rightBorder="1Point"/>

<textField>

<reportElement x="0" y="0" width="25" height="25"/>

<textElement textAlignment="Right" verticalAlignment="Middle"/>

<textFieldExpression class="java.lang.Integer">$V{monthDebit}</textFieldExpression>

</textField>

</cellContents>

</crosstabCell>

 

<whenNoDataCell>

<cellContents>

<staticText>

<reportElement x="0" y="0" width="250" height="25"/>

<text>No data</text>

</staticText>

</cellContents>

</whenNoDataCell>

 

</crosstab>

</band>

</detail>

 

</jasperReport>

 

 

Thinks!

 

 

 

 

 

By: gouwa - gouwa

RE: What's wrong with my crosstab xml file?

2006-01-02 20:36

hi,everyone,I resolve the problem.

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