deivy.ramirez Posted September 12, 2019 Share Posted September 12, 2019 I have a ,jrxml file. <?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="StatiscalInformationOperationBranchInsurance" language="groovy" pageWidth="70" pageHeight="70" columnWidth="50" leftMargin="0" rightMargin="0"topMargin="0" bottomMargin="0" isIgnorePagination="true"> <property name="ireport.zoom" value="1.5"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <property name="net.sf.jasperreports.export.text.character.width" value="7.238"/> <property name="net.sf.jasperreports.export.text.character.height" value="13.948"/> <field name="branch_code" class="java.lang.String"> <fieldDescription><![CDATA[branch_code]]></fieldDescription> </field> <field name="state_code" class="java.lang.String"> <fieldDescription><![CDATA[state_code]]></fieldDescription> </field> <field name="amount_counted" class="java.lang.String"> <fieldDescription><![CDATA[amount_counted]]></fieldDescription> </field> <detail> <band height="20" splitType="Stretch"> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement positionType="Float" x="0" y="0" width="70" height="20" isRemoveLineWhenBlank="true"> <printWhenExpression><![CDATA[$F{branch_code} != null]]></printWhenExpression> </reportElement> <textFieldExpression><![CDATA[$F{branch_code} + "|" + $F{state_code} + "|" + $F{amount_counted} + "|;" + "n"]]></textFieldExpression> </textField> </band> </detail></jasperReport>[/code]This file generate this output31|2|36|; 31|4|18|; 31|9|2|; 31|99|6|; [/code]I requiire to delete rows in blanks. That to show like thiis.31|2|36|; 31|4|18|; 31|9|2|; 31|99|6|;[/code] Please i wait your help. Thanks you. Link to comment Share on other sites More sharing options...
C-Box Posted September 12, 2019 Share Posted September 12, 2019 Why do you add a linebreak "+n" within your TextFieldExpression?? This is causing an empty line after each filled textfield because it increases the actual textfield height.So just remove this unnecessary break and you will be happy. :-)hth + regards C-Box 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