jamesdxb Posted November 19, 2017 Share Posted November 19, 2017 I have some textfields that can be null or empty and these, so when the fields are null or empty, I dont want a blanc block.I want the other field(s) to move UP.Please find attached jrxml :----------------------------------- <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0 --><!-- 2017-11-19T13:49:01 --><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="Certificate" pageWidth="612" pageHeight="792" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isTitleNewPage="true" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnorePagination="true" uuid="2819d29e-b7a5-4b8b-a3cc-9421a4f4f414"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="288"/> <queryString language="xPath"> <![CDATA[]]> </queryString> <field name="referenceNo" class="java.lang.String"/> <field name="secretCode" class="java.lang.String"/> <field name="receiptNo" class="java.lang.String"/> <field name="certificateDate" class="java.lang.String"/> <field name="nationality" class="java.lang.String"/> <field name="name" class="java.lang.String"/> <field name="idNumber" class="java.lang.String"/> <field name="passportNumber" class="java.lang.String"/> <field name="issuedTo" class="java.lang.String"/> <field name="headerImagePath" class="java.lang.String"/> <field name="footerImagePath" class="java.lang.String"/> <field name="backgroundImagePath" class="java.lang.String"/> <field name="personSignature" class="java.io.InputStream"/> <field name="personImage" class="java.io.InputStream"/> <field name="sigturePersonName" class="java.lang.String"/> <field name="signPersonOccupation" class="java.lang.String"/> <field name="issueToLable" class="java.lang.String"/> <field name="issuedToValue" class="java.lang.String"/> <background> <band height="752"> <image hAlign="Center" vAlign="Middle"> <reportElement x="0" y="100" width="569" height="652" uuid="a923ca12-a73e-4c67-a869-a5bdb786609b"/> <imageExpression><![CDATA[$F{backgroundImagePath}]]></imageExpression> </image> </band> </background> <title> <band height="77" splitType="Stretch"> <image> <reportElement x="2" y="2" width="567" height="73" uuid="a9c7b065-bbfc-463a-9235-34a52266e31a"/> <imageExpression><![CDATA[$F{headerImagePath}]]></imageExpression> </image> </band> </title> <columnHeader> <band height="383" splitType="Stretch"> <image hAlign="Center"> <reportElement x="18" y="150" width="113" height="101" uuid="a8c94883-c07c-4804-899c-b2f96301243f"> <printWhenExpression><![CDATA[$F{personImage}!=null]]></printWhenExpression> </reportElement> <imageExpression><![CDATA[$F{personImage}]]></imageExpression> </image> <staticText> <reportElement positionType="Float" x="1" y="339" width="567" height="20" forecolor="#363636" uuid="2916947f-e01c-4f1e-818b-768b4dee78bd"/> <textElement textAlignment="Right"> <font fontName="Denar" size="15" isBold="false"/> </textElement> <text><![CDATA[تجاه حقوق الغير.]]></text> </staticText> <staticText> <reportElement positionType="Float" x="1" y="292" width="567" height="20" forecolor="#363636" uuid="c2b5913e-6687-4ac3-9375-779cef5f99b4"/> <textElement textAlignment="Right"> <font fontName="Denar" size="15" isBold="false"/> </textElement> <text><![CDATA[تشهد الإدارة العامة للتحريات والمباحث الجنائية بأن المذكور أعلاه حسن السيرة والسلوك حتى]]></text> </staticText> <staticText> <reportElement positionType="Float" x="1" y="316" width="567" height="20" forecolor="#363636" uuid="81ebcd01-65ef-4fc1-96d4-272c71269330"/> <textElement textAlignment="Right"> <font fontName="Denar" size="15" isBold="false"/> </textElement> <text><![CDATA[تاريخ صدور هذه الشهادة وقد أعطيت له بناءا على طلبه دون تحمل الإدارة أدنى مسؤولية]]></text> </staticText> <staticText> <reportElement x="85" y="99" width="396" height="30" forecolor="#CC0000" uuid="f168451c-b791-4a02-8b4f-c0501f6c1265"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Center"> <font fontName="Denar" size="19" isBold="true" isUnderline="false"/> </textElement> <text><![CDATA[شهادة بحث الحالة الجنائية]]></text> </staticText> <staticText> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="474" y="221" width="93" height="20" isRemoveLineWhenBlank="true" forecolor="#CC0000" uuid="1b2e345c-7f53-4cc3-95ff-536d82486abf"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <printWhenExpression><![CDATA[$F{passportNumber}!=null]]></printWhenExpression> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14" isBold="false" isUnderline="false"/> </textElement> <text><![CDATA[رقم جواز السفر:]]></text> </staticText> <textField> <reportElement x="113" y="0" width="379" height="20" forecolor="#363636" uuid="fffa5bc2-aaec-478e-84b8-a670848a24d5"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cocon" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{referenceNo}]]></textFieldExpression> </textField> <staticText> <reportElement x="492" y="2" width="75" height="20" forecolor="#CC0000" uuid="5d1cf97e-ef8d-4068-9304-197585d039ac"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14" isBold="false" isUnderline="false"/> </textElement> <text><![CDATA[رقم المرجع:]]></text> </staticText> <staticText> <reportElement x="492" y="22" width="75" height="20" forecolor="#CC0000" uuid="5398df00-2108-4788-8db9-f56a257cafc2"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14" isBold="false" isUnderline="false"/> </textElement> <text><![CDATA[الرمز السري:]]></text> </staticText> <staticText> <reportElement x="492" y="45" width="75" height="20" forecolor="#CC0000" uuid="f40a487a-50c5-4e6a-94cf-329372de92fd"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14" isBold="false" isUnderline="false"/> </textElement> <text><![CDATA[رقم الايصال:]]></text> </staticText> <textField> <reportElement x="113" y="21" width="379" height="20" forecolor="#363636" uuid="015abf18-5cf4-4fcf-951a-0dd6dabca5d2"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cocon" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{secretCode}]]></textFieldExpression> </textField> <textField> <reportElement x="113" y="44" width="379" height="20" forecolor="#363636" uuid="64f4757c-971d-4579-aaca-c4106e7c86c1"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cocon" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{receiptNo}]]></textFieldExpression> </textField> <textField> <reportElement x="113" y="66" width="379" height="20" forecolor="#363636" uuid="daccd0f8-f5bc-4c93-bee3-15d09bd330c8"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cocon" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{certificateDate}]]></textFieldExpression> </textField> <staticText> <reportElement x="492" y="66" width="75" height="20" forecolor="#CC0000" uuid="724602cc-0c2a-42fa-a28e-bef28f70678d"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14" isBold="false" isUnderline="false"/> </textElement> <text><![CDATA[الــتــاريــــــــخ:]]></text> </staticText> <staticText> <reportElement x="489" y="160" width="78" height="20" forecolor="#CC0000" uuid="bae820ff-0859-414c-a702-0ca4aa45dc00"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14" isBold="false" isUnderline="false"/> </textElement> <text><![CDATA[الإســـــــــــــم:]]></text> </staticText> <staticText> <reportElement x="489" y="180" width="78" height="20" forecolor="#CC0000" uuid="7644b9e3-9352-46af-aeee-0a4f8727b608"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14" isBold="false" isUnderline="false"/> </textElement> <text><![CDATA[الجــنــســـية:]]></text> </staticText> <staticText> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="489" y="242" width="78" height="20" forecolor="#CC0000" uuid="21c4f2fd-abff-4e26-bcfb-bbc2ea17c3bb"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14" isBold="false" isUnderline="false"/> </textElement> <text><![CDATA[صـــادرة إلـــى:]]></text> </staticText> <textField> <reportElement x="140" y="161" width="336" height="20" forecolor="#363636" uuid="f1d720c4-7b9d-4b1a-ac3e-4116a9aa9363"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression> </textField> <textField> <reportElement x="175" y="181" width="301" height="20" forecolor="#363636" uuid="36b3a789-9c76-4a40-9e08-5e14289ce345"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Denar" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{nationality}]]></textFieldExpression> </textField> <textField isBlankWhenNull="false"> <reportElement isPrintRepeatedValues="false" x="175" y="198" width="301" height="20" isRemoveLineWhenBlank="true" forecolor="#363636" uuid="83dbcbb9-b169-48d9-a28f-790fef77ba41"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cocon" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{idNumber}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement stretchType="RelativeToTallestObject" x="166" y="219" width="310" height="20" isRemoveLineWhenBlank="true" forecolor="#363636" uuid="e9aeb987-40ad-46d4-872f-74c49edf14f2"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <printWhenExpression><![CDATA[$F{passportNumber}!=null]]></printWhenExpression> </reportElement> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cocon" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{passportNumber}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="140" y="243" width="336" height="40" forecolor="#363636" uuid="063816db-db47-4558-ad58-ee95ae30598d"/> <textElement textAlignment="Right" verticalAlignment="Top"> <font fontName="Cocon" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{issuedTo}]]></textFieldExpression> </textField> </band> </columnHeader> <detail> <band height="147" splitType="Stretch"> <image hAlign="Center"> <reportElement x="5" y="2" width="315" height="76" uuid="3cdb1f87-3041-45ba-80a2-3fdd51aa4dd8"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <imageExpression><![CDATA[$F{personSignature}]]></imageExpression> </image> <rectangle> <reportElement x="0" y="79" width="325" height="1" uuid="5633a159-f474-42dd-96d5-5013312780d7"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <graphicElement> <pen lineWidth="0.5" lineStyle="Solid"/> </graphicElement> </rectangle> <rectangle> <reportElement x="183" y="-261" width="200" height="1" forecolor="#CC0000" uuid="4903398f-18e1-4ca1-b7e3-efb1b3b8ab25"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <graphicElement> <pen lineWidth="0.5"/> </graphicElement> </rectangle> <textField> <reportElement x="0" y="85" width="330" height="20" uuid="432a2eab-c517-4639-afd7-c54ac0de2656"> <property name="com.jaspersoft.studio.unit.x" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="pixel"/> </reportElement> <textElement textAlignment="Center"> <font fontName="Denar" size="14" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{signPersonOccupation}]]></textFieldExpression> </textField> <textField> <reportElement x="5" y="109" width="325" height="20" uuid="47c6d3cd-e63d-4df9-ab59-f925c33a2560"> <property name="com.jaspersoft.studio.unit.x" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="pixel"/> </reportElement> <textElement textAlignment="Center"> <font fontName="Denar" size="14"/> </textElement> <textFieldExpression><![CDATA[$F{sigturePersonName}]]></textFieldExpression> </textField> </band> <band height="205"> <rectangle> <reportElement mode="Transparent" x="0" y="29" width="573" height="163" forecolor="#FF0905" uuid="053bc035-6083-4fc6-b873-63a58e42e28f"/> </rectangle> <staticText> <reportElement x="100" y="36" width="400" height="30" uuid="0f1b8271-af83-4474-80a9-4e6bdec097d2"/> <textElement textAlignment="Center"> <font fontName="Denar" size="17" isBold="true"/> </textElement> <text><![CDATA[هذه الشهادة صدرت إلكترونيا ولا تحتاج إلى ختم]]></text> </staticText> <staticText> <reportElement x="75" y="72" width="492" height="20" forecolor="#595858" uuid="e97e8fbf-30ef-4a96-8859-b9e6bec19a39"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right"> <font fontName="Denar" size="16"/> </textElement> <text><![CDATA[* للتأكد من صحة هذه الشهادة يرجى زيارة موقعنا على الإنترنت و الدخول على خدمة]]></text> </staticText> <staticText> <reportElement x="75" y="101" width="492" height="20" forecolor="#595858" uuid="9a0f6f0b-df1c-43f5-bbea-2a9012817d32"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right"> <font fontName="Denar" size="16"/> </textElement> <text><![CDATA[الاستعلام عن المستندات الصادرة .]]></text> </staticText> <staticText> <reportElement x="127" y="130" width="440" height="20" forecolor="#595858" uuid="fc31b39f-6020-4e11-8279-1608e0dc139f"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Right"> <font fontName="Denar" size="16"/> </textElement> <text><![CDATA[* أي كشط أو تغيير في هذه الشهادة يلغيها.]]></text> </staticText> <staticText> <reportElement x="107" y="163" width="460" height="30" forecolor="#595858" uuid="f3fdce3f-15b9-4933-94cb-7f1d77c51c92"/> <textElement textAlignment="Right"> <font fontName="Denar" size="16"/> </textElement> <text><![CDATA[* هذه الشهادة سارية المفعول لمدة 3 أشهر فقط.]]></text> </staticText> <rectangle> <reportElement x="513" y="3" width="60" height="26" forecolor="#CC0000" backcolor="#CC0000" uuid="650f4f6b-54e5-448c-b1f7-d870f9086443"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> </rectangle> <staticText> <reportElement x="514" y="7" width="58" height="20" forecolor="#FFFFFF" uuid="4928e102-b3fc-480d-b8da-39ffaa716618"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Denar" size="16" isBold="true"/> </textElement> <text><![CDATA[ملاحظة]]></text> </staticText> </band> </detail> <summary> <band height="116" splitType="Stretch"> <image> <reportElement x="2" y="1" width="567" height="115" uuid="57a54eb0-b2a8-4267-a05a-6b13aabc350f"/> <imageExpression><![CDATA[$F{footerImagePath}]]></imageExpression> </image> </band> </summary></jasperReport> 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