Jump to content
We've recently updated our Privacy Statement, available here ×

How do I Remove Lines when blank


kapanu

Recommended Posts

I have null rows pulled for my report which display a blank line. In order to remove the blank line that has null rows I used the property "isRemoveLineWhenBlank" for the report elements in that line. But that does not work.

 

Can someone help me with this please

Link to comment
Share on other sites

  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

Thank you for the response. But I was doing the same thing that you mentioned. I have textboxes to display the data obtained from database. I selected the textboxes and in the Element Properties tab i selected "Remove Line when Blank". But it does not help in anyway. It still does not remove the blank line.
Link to comment
Share on other sites

I am uploading the xml source that I have for my report. I removed the query from this source.

 

If you look in the report I have 3 groups for Partner, State and Detail.

 

I need to remove these groups when the values returned in the textboxes is null or blank

 

Post edited by: kapanu, at: 2007/02/26 13:21

 

I could not upload the file so i am pasting my XML file here

 

****************************************

 

<?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="RPTSBMTLPRTNR"

columnCount="1"

printOrder="Horizontal"

orientation="Portrait"

pageWidth="595"

pageHeight="842"

columnWidth="535"

columnSpacing="0"

leftMargin="30"

rightMargin="30"

topMargin="20"

bottomMargin="20"

whenNoDataType="AllSectionsNoDetail"

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="RqstId" isForPrompting="false" class="java.lang.String"/>

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

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

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

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

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

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

<queryString><![CDATA[!--my Select Query-->]]></queryString>

 

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

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

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

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

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

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

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

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

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

 

 

<group name="Main" >

<groupExpression><![CDATA[null]]></groupExpression>

<groupHeader>

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

<staticText>

<reportElement

x="4"

y="9"

width="91"

height="17"

key="staticText-2"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>

</textElement>

<text><![CDATA[Name]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="4"

y="30"

width="90"

height="17"

key="textField-2"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{TRANS_NAME}]]></textFieldExpression>

</textField>

<staticText>

<reportElement

x="105"

y="10"

width="69"

height="17"

key="staticText-4"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>

</textElement>

<text><![CDATA[CRD]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="105"

y="30"

width="68"

height="17"

key="textField-5"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{TRANS_CRD}]]></textFieldExpression>

</textField>

<staticText>

<reportElement

x="185"

y="10"

width="77"

height="17"

key="staticText-5"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>

</textElement>

<text><![CDATA[sSN/TaxID]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="185"

y="30"

width="76"

height="17"

key="textField-6"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{TRANS_TAXID}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

<groupFooter>

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

<line direction="BottomUp">

<reportElement

x="-1"

y="3"

width="546"

height="1"

key="line-1"/>

<graphicElement stretchType="NoStretch"/>

</line>

</band>

</groupFooter>

</group>

<group name="DetailHeader" >

<groupExpression><![CDATA[null]]></groupExpression>

<groupHeader>

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

<staticText>

<reportElement

x="239"

y="2"

width="59"

height="17"

key="staticText-12"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[status]]></text>

</staticText>

<staticText>

<reportElement

x="335"

y="2"

width="69"

height="17"

key="staticText-14"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[status Date ]]></text>

</staticText>

<staticText>

<reportElement

x="83"

y="2"

width="42"

height="17"

key="staticText-16"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[state]]></text>

</staticText>

<staticText>

<reportElement

x="27"

y="2"

width="46"

height="17"

key="staticText-17"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[Company]]></text>

</staticText>

</band>

</groupHeader>

<groupFooter>

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

</band>

</groupFooter>

</group>

<group name="Partner" >

<groupExpression><![CDATA[$F{Partner}]]></groupExpression>

<groupHeader>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="27"

y="1"

width="136"

height="16"

key="textField-10"

isRemoveLineWhenBlank="true"/>

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

<textElement>

<font pdfFontName="Helvetica-BoldOblique" isBold="true" isItalic="true"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{Partner}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

<groupFooter>

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

</band>

</groupFooter>

</group>

<group name="State" >

<groupExpression><![CDATA[$F{STATE}]]></groupExpression>

<groupHeader>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="79"

y="4"

width="96"

height="18"

key="textField-12"

isRemoveLineWhenBlank="true"/>

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

<textElement>

<font pdfFontName="Helvetica-BoldOblique" size="8" isBold="true" isItalic="true"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{STATE}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

<groupFooter>

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

</band>

</groupFooter>

</group>

<background>

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

</band>

</background>

<title>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="362"

y="19"

width="128"

height="19"

key="textField-1"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>

</textField>

</band>

</title>

<pageHeader>

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

<staticText>

<reportElement

x="24"

y="9"

width="89"

height="16"

key="staticText-3"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[Customer Name]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="136"

y="9"

width="186"

height="14"

key="textField-3"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{DispCustName}]]></textFieldExpression>

</textField>

<staticText>

<reportElement

x="24"

y="29"

width="89"

height="16"

key="staticText-18"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[Location Type]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="134"

y="29"

width="122"

height="14"

key="textField-16"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{DispLocType}]]></textFieldExpression>

</textField>

<staticText>

<reportElement

x="24"

y="49"

width="89"

height="16"

key="staticText-19"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[Location Code]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="134"

y="49"

width="122"

height="14"

key="textField-17"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{DispLocCd}]]></textFieldExpression>

</textField>

</band>

</pageHeader>

<columnHeader>

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

</band>

</columnHeader>

<detail>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="341"

y="1"

width="56"

height="17"

key="textField-13"

isRemoveLineWhenBlank="true"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{LINERESPONSEDATE}]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="239"

y="1"

width="65"

height="17"

key="textField-15"

isRemoveLineWhenBlank="true"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{STATUS}]]></textFieldExpression>

</textField>

</band>

</detail>

<columnFooter>

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

</band>

</columnFooter>

<pageFooter>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="256"

y="17"

width="100"

height="18"

key="textField"/>

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

<textElement textAlignment="Right">

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="356"

y="17"

width="100"

height="18"

key="textField"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER} + ""]]></textFieldExpression>

</textField>

</band>

</pageFooter>

<lastPageFooter>

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

</band>

</lastPageFooter>

<summary>

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

</band>

</summary>

</jasperReport>

 

***************************************************

Post edited by: kapanu, at: 2007/02/26 13:23

Link to comment
Share on other sites

First, please ignore my previous posts about ELEMENT groups as you were trying to explain that they were DATA groups.

 

The code that you posted works fine in iReport 1.2.7

 

The STATUS and LINERESPONSEDATE text fields shrink to zero height if both are null. All that remains of the detail row once they are removed is the small space (a couple of pixels) that you have left above and below the text fields. This is normal practice as it provides buffering between rows, but if you have a lot of null rows then you will end up with a lot of blank space.

 

To fix this problem you would need to make sure that there is no space above or below your text field elements in the detail band. In order to restore the whitespace buffering you would need to increase the vertical size of the text fields and add the desired amount of padding (see Element Properties - Border - Padding).

Link to comment
Share on other sites

Thank you for the response. I tried the solution by removing all the spaces above and below the textfields.

But still the blank lines do not go away. I uploaded the output I am getting. You will get an idea when u see the "XYZ Insurance Company". It has a lot of blank lines since there are no results for this company.

 

The xml that i have currently :

 

<?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="RPTSBMTLPRTNR"

columnCount="1"

printOrder="Horizontal"

orientation="Portrait"

pageWidth="595"

pageHeight="842"

columnWidth="535"

columnSpacing="0"

leftMargin="30"

rightMargin="30"

topMargin="20"

bottomMargin="20"

whenNoDataType="AllSectionsNoDetail"

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="RqstId" isForPrompting="false" class="java.lang.String"/>

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

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

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

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

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

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

<queryString><![CDATA[]]></queryString>

 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

 

 

<group name="Main" >

<groupExpression><![CDATA[null]]></groupExpression>

<groupHeader>

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

<staticText>

<reportElement

x="4"

y="9"

width="91"

height="17"

key="staticText-2"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>

</textElement>

<text><![CDATA[Name]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="4"

y="30"

width="90"

height="17"

key="textField-2"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{TRANS_NAME}]]></textFieldExpression>

</textField>

<staticText>

<reportElement

x="105"

y="10"

width="69"

height="17"

key="staticText-4"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>

</textElement>

<text><![CDATA[CRD]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="105"

y="30"

width="68"

height="17"

key="textField-5"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{TRANS_CRD}]]></textFieldExpression>

</textField>

<staticText>

<reportElement

x="185"

y="10"

width="77"

height="17"

key="staticText-5"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>

</textElement>

<text><![CDATA[sSN/TaxID]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="185"

y="30"

width="76"

height="17"

key="textField-6"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{TRANS_TAXID}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

<groupFooter>

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

<line direction="BottomUp">

<reportElement

x="-1"

y="3"

width="546"

height="1"

key="line-1"/>

<graphicElement stretchType="NoStretch"/>

</line>

</band>

</groupFooter>

</group>

<group name="DetailHeader" >

<groupExpression><![CDATA[null]]></groupExpression>

<groupHeader>

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

<staticText>

<reportElement

x="239"

y="2"

width="59"

height="17"

key="staticText-12"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[status]]></text>

</staticText>

<staticText>

<reportElement

x="335"

y="2"

width="69"

height="17"

key="staticText-14"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[status Date ]]></text>

</staticText>

<staticText>

<reportElement

x="83"

y="2"

width="42"

height="17"

key="staticText-16"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[state]]></text>

</staticText>

<staticText>

<reportElement

x="27"

y="2"

width="46"

height="17"

key="staticText-17"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[Company]]></text>

</staticText>

</band>

</groupHeader>

<groupFooter>

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

</band>

</groupFooter>

</group>

<group name="Partner" >

<groupExpression><![CDATA[$F{Partner}]]></groupExpression>

<groupHeader>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="27"

y="0"

width="136"

height="16"

key="textField-10"

isRemoveLineWhenBlank="true"/>

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

<textElement>

<font pdfFontName="Helvetica-BoldOblique" isBold="true" isItalic="true"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{Partner}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

<groupFooter>

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

</band>

</groupFooter>

</group>

<group name="State" >

<groupExpression><![CDATA[$F{STATE}]]></groupExpression>

<groupHeader>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="79"

y="0"

width="96"

height="18"

key="textField-12"

isRemoveLineWhenBlank="true"/>

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

<textElement>

<font pdfFontName="Helvetica-BoldOblique" size="8" isBold="true" isItalic="true"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{STATE}]]></textFieldExpression>

</textField>

</band>

</groupHeader>

<groupFooter>

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

</band>

</groupFooter>

</group>

<background>

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

</band>

</background>

<title>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="362"

y="19"

width="128"

height="19"

key="textField-1"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>

</textField>

</band>

</title>

<pageHeader>

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

<staticText>

<reportElement

x="24"

y="9"

width="89"

height="16"

key="staticText-3"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[Customer Name]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="136"

y="9"

width="186"

height="14"

key="textField-3"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{DispCustName}]]></textFieldExpression>

</textField>

<staticText>

<reportElement

x="24"

y="29"

width="89"

height="16"

key="staticText-18"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[Location Type]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="134"

y="29"

width="122"

height="14"

key="textField-16"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{DispLocType}]]></textFieldExpression>

</textField>

<staticText>

<reportElement

x="24"

y="49"

width="89"

height="16"

key="staticText-19"/>

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

<textElement>

<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>

</textElement>

<text><![CDATA[Location Code]]></text>

</staticText>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="134"

y="49"

width="122"

height="14"

key="textField-17"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{DispLocCd}]]></textFieldExpression>

</textField>

</band>

</pageHeader>

<columnHeader>

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

</band>

</columnHeader>

<detail>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="341"

y="0"

width="143"

height="17"

key="textField-13"

isRemoveLineWhenBlank="true"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{LINERESPONSEDATE}]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="239"

y="0"

width="65"

height="17"

key="textField-15"

isRemoveLineWhenBlank="true"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{STATUS}]]></textFieldExpression>

</textField>

</band>

</detail>

<columnFooter>

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

</band>

</columnFooter>

<pageFooter>

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

<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="256"

y="17"

width="100"

height="18"

key="textField"/>

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

<textElement textAlignment="Right">

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="356"

y="17"

width="100"

height="18"

key="textField"/>

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

<textElement>

<font/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER} + ""]]></textFieldExpression>

</textField>

</band>

</pageFooter>

<lastPageFooter>

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

</band>

</lastPageFooter>

<summary>

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

</band>

</summary>

</jasperReport> [file name=report_output.doc size=99328]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/report_output.doc[/file]

Post edited by: kapanu, at: 2007/03/01 20:14

Link to comment
Share on other sites

They aren't blank lines - it's just reflecting that there's partially filled data. The report is outputting exactly what you asked it to.

 

 

You need to suppress records in your data source where LINERESPONSEDATE is null and STATUS is null.

Link to comment
Share on other sites

  • 2 years later...

One other thing that you must take care of is that no other objects can be touching any object inside the line.

In iReport 3.5.2 you can check that when you select your object. If the selection is blue, than it's ok,

but if it is green, the option "Remove Line When Blank" will not work. 

You must do that for all objects inside the line, when all are blue, the option will work.

 

 


Tags: iReport, Jasper, Remove Line When Blank, How to, How do I, not working, line.



Post Edited by ietsira at 07/24/2009 03:18
Link to comment
Share on other sites

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