2004 IR Help Posted August 26, 2006 Share Posted August 26, 2006 By: Mike - mikefarah crosstab Error incrementing crosstab dataset 2006-01-31 19:03 I am trying to create a crosstab report, and keep encountering this error message: NESTED BY : net.sf.jasperreports.engine.JRRuntimeException: Error incrementing crosstab dataset ... Caused by: net.sf.jasperreports.engine.JRException: Crosstab data has already been processed. I am using a java table to fill in the report (which works fine for non-crosstab reports..) The jasper report xml file is: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="Big_one" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30"> <field name="COLUMN_0" class="java.lang.Integer"/><!-- month --> <field name="COLUMN_1" class="java.lang.String"/><!-- product name --> <field name="COLUMN_2" class="java.lang.Double"/><!-- product cost --> <detail> <band height="100"> <crosstab> <reportElement x="0" y="20" width="812" height="60" mode="Opaque"/> <rowGroup name="Months" width="50" totalPosition="None"> <bucket> <bucketExpression class="java.lang.Integer">$F{COLUMN_0}</bucketExpression> </bucket> <crosstabRowHeader> <cellContents> <box leftBorder="2Point" bottomBorder="2Point" rightBorder="2Point"/> <textField> <reportElement x="5" y="5" width="40" height="20"/> <textFieldExpression class="java.lang.Integer">$V{Months}</textFieldExpression> </textField> </cellContents> </crosstabRowHeader> </rowGroup> <columnGroup name="ProductName" height="50" totalPosition="None"> <bucket> <bucketExpression class="java.lang.String">$F{COLUMN_1}</bucketExpression> </bucket> <crosstabColumnHeader> <cellContents> <box topBorder="2Point" bottomBorder="2Point" rightBorder="2Point"/> <textField> <reportElement x="5" y="5" width="25" height="40"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression class="java.lang.String">$V{ProductName}</textFieldExpression> </textField> </cellContents> </crosstabColumnHeader> </columnGroup> <measure name="productCost" class="java.lang.Integer" calculation="Nothing"> <measureExpression>$F{COLUMN_0}</measureExpression> </measure> <crosstabCell width="30" height="25"> <cellContents> <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{productCost}</textFieldExpression> </textField> </cellContents> </crosstabCell> </crosstab> </band> </detail> <pageFooter> <band height="15"> <staticText> <reportElement positionType="Float" x="0" y="0" width="40" height="15"/> <textElement/> <text>Page:</text> </staticText> <textField> <reportElement positionType="Float" x="40" y="0" width="100" height="15"/> <textElement/> <textFieldExpression class="java.lang.Integer">$V{PAGE_NUMBER}</textFieldExpression> </textField> </band> </pageFooter> <summary> <band> </band> </summary> </jasperReport> By: Mike - mikefarah RE: crosstab Error incrementing crosstab data 2006-01-31 20:13 ah fixed it, the problem was I had it in the detail band and not in the summary band...whoopsPost edited by: tcloonan, at: 2006/08/26 09:20 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