Jump to content
Changes to the Jaspersoft community edition download ×

Not able to control empty lines in report

Santhosh Kumar Pabba

Recommended Posts

Hi guys,


I am not able to control the extra spaces (empty lines) getting in my report.

As per my report design The values will be printed in details section depending on the condition.(<printWhenExpression>) . I am able to control the values by using this condition. but when the condition is becoming false am getting empty spaces(empty lines).


And also I am selected the property isRemoveLineWhenBlank="true" ;


For your reference am pasting the jrxml piece of code.


I struck here for further development of report,

I appreciate your help in this regard.


Thanks in advance

Santhosh Kumar Pabba


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


<reportElement mode="Opaque" X="0" y="0" width="595"

height="26" forecolor="#333333" backcolor="#E4EFF6"

key="staticText-19" isPrintRepeatedValues="false"

isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true">


<printWhenExpression><![CDATA[new Boolean(($F{searchCount}.intValue() == 1) && $F{searchStatus}.equals("candSearch"))]]></printWhenExpression>



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

<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single">

<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />


<text><![CDATA[Candidate Searches ]]></text>

</staticText> [file name=LoginMasterReport.jrxml size=86437]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/LoginMasterReport.jrxml[/file]

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic



I have tested your report and it works. The space is removed when the elements do not print.

I'm not sure if you are actually talking about the few pixels that cannot be removed because they are in-between your elements.

If so, I suggest you don't use the printWhenExpression at element level and simply use it at band level, so that the whole band gets removed when the condition says so.


I hope this helps.


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