2016-10-11 4 views
1

1Wie loswerden diese Band Linie in Bericht

Die Zeile für jeden Datensatz wird nicht in der korrekten Position zwischen den Datensatz Anzeigen stattdessen wird es an der falschen Position angezeigt wird (markiert durch den roten Pfeil). In der Tat würde ich gerne die Linie loswerden. Irgendeine Idee, wie man es repariert?

Unten finden Sie den Inhalt der Jaspis-Berichts-XML-Datei.

<?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="patientreceiptreportsubreport" pageWidth="500" pageHeight="802" columnWidth="500" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="48657e21-be23-4f69-be3f-450dbbefbea5"> 
    <style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/> 
    <style name="Detail" fontName="Arial" fontSize="12"/> 
    <field name="productServiceName" class="java.lang.String"/> 
    <field name="cdate" class="java.util.Date"/> 
    <field name="transactionResult" class="java.lang.String"/> 
    <columnHeader> 
     <band height="36" splitType="Stretch"> 
      <line> 
       <reportElement positionType="FixRelativeToBottom" x="0" y="35" width="481" height="1" uuid="b50e34d4-69d0-4c76-abbc-52923dfeb133"/> 
       <graphicElement> 
        <pen lineWidth="0.5" lineColor="#999999"/> 
       </graphicElement> 
      </line> 
      <staticText> 
       <reportElement style="Column header" x="10" y="15" width="158" height="19" forecolor="#000000" uuid="b19d024d-9f1a-402c-8af5-863cc9139414"/> 
       <textElement> 
        <font fontName="SansSerif" size="10" isBold="true"/> 
       </textElement> 
       <text><![CDATA[TEST NAME/DESCRIPTION]]></text> 
      </staticText> 
      <staticText> 
       <reportElement style="Column header" x="336" y="15" width="74" height="19" forecolor="#000000" uuid="c8aedac6-920c-4ede-8ced-d9aece5bdca4"/> 
       <textElement> 
        <font fontName="SansSerif" size="10"/> 
       </textElement> 
       <text><![CDATA[DATE:]]></text> 
      </staticText> 
     </band> 
    </columnHeader> 
    <detail> 
     <band height="59" splitType="Stretch"> 
      <line> 
       <reportElement positionType="FixRelativeToBottom" x="0" y="15" width="481" height="1" uuid="89f624c9-f0e6-4363-a8a9-49d64990e262"/> 
       <graphicElement> 
        <pen lineWidth="0.5" lineColor="#999999"/> 
       </graphicElement> 
      </line> 
      <textField> 
       <reportElement style="Detail" x="9" y="0" width="30" height="15" uuid="519c3624-5c33-4656-89a6-0e4374b86f13"/> 
       <textElement> 
        <font size="10"/> 
       </textElement> 
       <textFieldExpression><![CDATA[$V{COLUMN_COUNT}]]></textFieldExpression> 
      </textField> 
      <textField> 
       <reportElement style="Detail" x="336" y="0" width="62" height="15" uuid="78def88b-bdcc-42de-9426-3b1e84853fe2"/> 
       <textElement> 
        <font size="10"/> 
       </textElement> 
       <textFieldExpression><![CDATA[$F{cdate}]]></textFieldExpression> 
      </textField> 
      <textField> 
       <reportElement style="Detail" x="39" y="1" width="129" height="14" uuid="1cb312b2-1367-499b-a603-aaca310b2ef1"/> 
       <textElement> 
        <font size="10"/> 
       </textElement> 
       <textFieldExpression><![CDATA[$F{productServiceName}]]></textFieldExpression> 
      </textField> 
      <textField isStretchWithOverflow="true"> 
       <reportElement x="10" y="21" width="470" height="30" uuid="7fee676c-39ae-4bd8-80c2-50dab2c1641f"/> 
       <textFieldExpression><![CDATA[$F{transactionResult}]]></textFieldExpression> 
      </textField> 
     </band> 
    </detail> 
</jasperReport> 

Antwort

2

Sie sollten Float Wert für die Linie Position Attribut gesetzt. Momentan verwenden Sie den FixRelativeToBottom Wert - die Linie versucht sich nach unten zu bewegen.

So:

<line> 
    <reportElement positionType="Float" x="0" y="15" width="481" height="1"/> 
    <graphicElement> 
     <pen lineWidth="0.5" lineColor="#999999"/> 
    </graphicElement> 
</line> 

Ihre Vorlage wird:

<?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="patientreceiptreportsubreport" pageWidth="500" pageHeight="802" columnWidth="500" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="48657e21-be23-4f69-be3f-450dbbefbea5"> 
    <style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/> 
    <style name="Detail" fontName="Arial" fontSize="12"/> 
    <field name="productServiceName" class="java.lang.String"/> 
    <field name="cdate" class="java.util.Date"/> 
    <field name="transactionResult" class="java.lang.String"/> 
    <columnHeader> 
     <band height="36" splitType="Stretch"> 
      <line> 
       <reportElement positionType="FixRelativeToBottom" x="0" y="35" width="481" height="1" uuid="b50e34d4-69d0-4c76-abbc-52923dfeb133"/> 
       <graphicElement> 
        <pen lineWidth="0.5" lineColor="#999999"/> 
       </graphicElement> 
      </line> 
      <staticText> 
       <reportElement style="Column header" x="10" y="15" width="158" height="19" forecolor="#000000" uuid="b19d024d-9f1a-402c-8af5-863cc9139414"/> 
       <textElement> 
        <font fontName="SansSerif" size="10" isBold="true"/> 
       </textElement> 
       <text><![CDATA[TEST NAME/DESCRIPTION]]></text> 
      </staticText> 
      <staticText> 
       <reportElement style="Column header" x="336" y="15" width="74" height="19" forecolor="#000000" uuid="c8aedac6-920c-4ede-8ced-d9aece5bdca4"/> 
       <textElement> 
        <font fontName="SansSerif" size="10"/> 
       </textElement> 
       <text><![CDATA[DATE:]]></text> 
      </staticText> 
     </band> 
    </columnHeader> 
    <detail> 
     <band height="59" splitType="Stretch"> 
      <line> 
       <reportElement positionType="Float" x="0" y="15" width="481" height="1" uuid="89f624c9-f0e6-4363-a8a9-49d64990e262"/> 
       <graphicElement> 
        <pen lineWidth="0.5" lineColor="#999999"/> 
       </graphicElement> 
      </line> 
      <textField> 
       <reportElement style="Detail" x="9" y="0" width="30" height="15" uuid="519c3624-5c33-4656-89a6-0e4374b86f13"/> 
       <textElement> 
        <font size="10"/> 
       </textElement> 
       <textFieldExpression><![CDATA[$V{COLUMN_COUNT}]]></textFieldExpression> 
      </textField> 
      <textField> 
       <reportElement style="Detail" x="336" y="0" width="62" height="15" uuid="78def88b-bdcc-42de-9426-3b1e84853fe2"/> 
       <textElement> 
        <font size="10"/> 
       </textElement> 
       <textFieldExpression><![CDATA[$F{cdate}]]></textFieldExpression> 
      </textField> 
      <textField> 
       <reportElement style="Detail" x="39" y="1" width="129" height="14" uuid="1cb312b2-1367-499b-a603-aaca310b2ef1"/> 
       <textElement> 
        <font size="10"/> 
       </textElement> 
       <textFieldExpression><![CDATA[$F{productServiceName}]]></textFieldExpression> 
      </textField> 
      <textField isStretchWithOverflow="true"> 
       <reportElement x="10" y="21" width="470" height="30" uuid="7fee676c-39ae-4bd8-80c2-50dab2c1641f"/> 
       <textFieldExpression><![CDATA[$F{transactionResult}]]></textFieldExpression> 
      </textField> 
     </band> 
    </detail> 
</jasperReport> 

Das Ergebnis (in JSS) wird sein:

The result in JSS