2002 JI Open Discussion Posted August 18, 2006 Share Posted August 18, 2006 By: mike w - mwans Group Spacing 2003-04-29 13:38 Hello, I recently upgraded from 0.4.5 to 0.4.6 and have encountered a problem. I have a report that utilizes multiple subreports. One of the Subreports is a grouping. I use lines on the "sides" of the grouping in order to display my data in seperated columns. With version 0.4.5, the lines connected between the different rows of the groups. But, with 0.4.6, there is a tiny space between the rows, which causes the vertical lines to have small breaks in them. Here is the code of the Subreport: <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="TBL_02_EVENT_GROUP_SUB" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="270" pageHeight="450" columnWidth="270" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <parameter name="TOTAL" class="java.lang.Float" isForPrompting="false" /> <queryString><![CDATA[sELECT CODES.SHORT_DESCRIPTION, CODES.PARAMETER1, COUNT(VW_TBL_02_EVENTS.YEAR) AS COUNT FROM VW_TBL_02_EVENTS, CODES WHERE VW_TBL_02_EVENTS.SHORT_DESCRIPTION(+) = CODES.SHORT_DESCRIPTION AND CODES.CODE_TYPE_ID = 14 AND (VW_TBL_02_EVENTS.YEAR = 2003 OR VW_TBL_02_EVENTS.YEAR IS NULL) GROUP BY CODES.SHORT_DESCRIPTION, CODES.PARAMETER1 ORDER BY CODES.PARAMETER1]]></queryString> <field name="SHORT_DESCRIPTION" class="java.lang.String"/> <field name="COUNT" class="java.lang.Float"/> <group name="LocationGroup"> <groupExpression>$F{SHORT_DESCRIPTION}</groupExpression> <groupHeader> <band height="30"> <textField> <reportElement positionType="Float" x="3" y="0" width="172" height="30"/> <textElement textAlignment="Left"> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{SHORT_DESCRIPTION}]]></textFieldExpression> </textField> <textField> <reportElement positionType="Float" x="183" y="0" width="42" height="30"/> <textElement textAlignment="Left"> </textElement> <textFieldExpression class="java.lang.Long"><![CDATA[$F{COUNT}==null?new java.lang.Long(0):new Long($F{COUNT}.longValue())]]></textFieldExpression> </textField> <textField pattern="#.##"> <reportElement positionType="Float" x="225" y="0" width="42" height="30"/> <textElement textAlignment="Right"> </textElement> <textFieldExpression class="java.lang.Float"><![CDATA[$F{COUNT}==null || $P{TOTAL}==null?new java.lang.Float(0):new Float(($F{COUNT}.floatValue()/$P{TOTAL}.floatValue()) * 100 )]]></textFieldExpression> </textField> <line direction="TopDown"> <reportElement x="0" y="0" width="0" height="30" forecolor="#000000" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" /> <graphicElement stretchType="NoStretch" fill="Solid" /> </line> <line direction="TopDown"> <reportElement x="175" y="0" width="0" height="30" forecolor="#000000" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" /> <graphicElement stretchType="NoStretch" fill="Solid" /> </line> <line direction="TopDown"> <reportElement x="180" y="0" width="0" height="30" forecolor="#000000" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" /> <graphicElement stretchType="NoStretch" fill="Solid" /> </line> <line direction="TopDown"> <reportElement x="270" y="0" width="0" height="30" forecolor="#000000" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" /> <graphicElement stretchType="NoStretch" fill="Solid" /> </line> </band> </groupHeader> </group> <title> <band height="0"> </band> </title> <pageHeader> <band height="0"> </band> </pageHeader> <columnHeader> <band height="0"> </band> </columnHeader> <detail> <band height="0"> </band> </detail> <columnFooter> <band height="0"> </band> </columnFooter> <pageFooter> <band height="0"> </band> </pageFooter> <summary> <band height="0"> <line direction="TopDown"> <reportElement x="0" y="0" width="270" height="0" forecolor="#000000" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" /> <graphicElement stretchType="NoStretch" fill="Solid" /> </line> </band> </summary> </jasperReport> I need to remove the spaces between the group rows. Thank you for the help. Mike By: Teodor Danciu - teodord RE: Group Spacing 2003-05-11 14:11 Hi, There is a solution for this problem here: https://sourceforge.net/forum/forum.php?thread_id=856536&forum_id=113530 Thank you, Teodor 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