Jasper报告未显示详细区域中仅一个字段的数据

时间:2019-11-18 16:05:25

标签: java swing jasper-reports

昨天一切正常。但是当我今天尝试打印报告时,产品名称不再可见。但是我可以在预览模式下看到。 [如您所见,我可以在预览部分下查看所有详细信息,但是][1]在我打印报告时看不到。我已经尝试了所有研究人员,但一无所获。我没有什么问题。我花了将近一整天,却一无所获。

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0  -->
<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="sale_3inch" pageWidth="216" pageHeight="288" columnWidth="206" leftMargin="5" rightMargin="5" topMargin="5" bottomMargin="5" uuid="b6f736bc-ea6d-4e32-99ec-533bd69df2e1">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="inch"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="inch"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w1" value="479"/>
<property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w2" value="521"/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="newdb"/>
<parameter name="companyname" class="java.lang.String">
    <defaultValueExpression><![CDATA[$P{companyname}]]></defaultValueExpression>
</parameter>
<parameter name="address" class="java.lang.String">
    <defaultValueExpression><![CDATA[$P{address}]]></defaultValueExpression>
</parameter>
<parameter name="gstin" class="java.lang.String">
    <defaultValueExpression><![CDATA[$P{gstin}]]></defaultValueExpression>
</parameter>
<parameter name="address2" class="java.lang.String">
    <defaultValueExpression><![CDATA[$P{address2}]]></defaultValueExpression>
</parameter>
<parameter name="mobile" class="java.lang.String">
    <defaultValueExpression><![CDATA[$P{mobile}]]></defaultValueExpression>
</parameter>
<queryString language="SQL">
    <![CDATA[SELECT foodcourt.shortsale.billno,
foodcourt.shortsale.total,
foodcourt.shortsale.grossamount,
foodcourt.shortsale.discount,
foodcourt.shortsale.cgst,
foodcourt.shortsale.sgst,
foodcourt.shortsale.roundoff,
foodcourt.shortsale.runnerno,
foodcourt.shortsale.parcel,
foodcourt.shortsale.billdate,
foodcourt.shortsale.tokenno,
foodcourt.sale.item,
foodcourt.sale.rate,
foodcourt.sale.qty,
foodcourt.sale.producttotal,
foodcourt.item.name,
foodcourt.item.hsn
FROM foodcourt.shortsale
inner join foodcourt.sale ON 
 foodcourt.shortsale.billno = foodcourt.sale.billno 
inner join foodcourt.item ON 
 foodcourt.sale.item = foodcourt.item.sno]]>
</queryString>
<field name="billno" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="billno"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="total" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="total"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="grossamount" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="grossamount"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="discount" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="discount"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="cgst" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="cgst"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="sgst" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="sgst"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="roundoff" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="roundoff"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="runnerno" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="runnerno"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="parcel" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="parcel"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="billdate" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="billdate"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="tokenno" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="tokenno"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="shortsale"/>
</field>
<field name="item" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="item"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="sale"/>
</field>
<field name="rate" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="rate"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="sale"/>
</field>
<field name="qty" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="qty"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="sale"/>
</field>
<field name="producttotal" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="producttotal"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="sale"/>
</field>
<field name="name" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="name"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="item"/>
</field>
<field name="hsn" class="java.lang.String">
    <property name="com.jaspersoft.studio.field.label" value="hsn"/>
    <property name="com.jaspersoft.studio.field.tree.path" value="item"/>
</field>
<background>
    <band splitType="Stretch"/>
</background>
<title>
    <band height="61" splitType="Stretch">
        <frame>
            <reportElement x="0" y="0" width="206" height="60" uuid="49546c81-162b-4d5a-9a13- 
  4655f7d9dd26"/>
            <box>
                <pen lineWidth="0.5"/>
            </box>
            <textField>
                <reportElement x="130" y="0" width="76" height="10" uuid="e1edec6d-96dd-4330-be2e- 
 da7e681325b7"/>
                <box rightPadding="5"/>
                <textElement textAlignment="Right">
                    <font size="7"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{gstin}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="0" y="10" width="206" height="20" uuid="b6fe3569-5bac-4c77-b821- 
5935616cc978"/>
                <textElement textAlignment="Center">
                    <font size="9" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{companyname}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="0" y="30" width="206" height="10" uuid="c88eb90e-aa6e-4859-b329- 
   8d1c9598cf7b"/>
                <textElement textAlignment="Center">
                    <font size="7"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{address}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="3" y="0" width="100" height="10" uuid="87f372ad-c62c-46b2-ad2b- 
    57b8aca66795"/>
                <textElement>
                    <font size="7"/>
                </textElement>
                <textFieldExpression><![CDATA[$P{mobile}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="100" y="40" width="104" height="10" uuid="493d6583-f909-4f0f-8272- 
    fdd817438165"/>
                <textElement textAlignment="Right">
                    <font size="7"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{billdate}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="3" y="40" width="97" height="10" uuid="fdc712c9-01c1-49de-9cb0- 
a4ec04ffd585"/>
                <textElement>
                    <font size="7"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{billno}]]></textFieldExpression>
            </textField>
        </frame>
    </band>
</title>
<columnHeader>
    <band height="13" splitType="Stretch">
        <frame>
            <reportElement x="0" y="0" width="206" height="12" uuid="f823f29a-f51e-4b10-a119- 
d3a11e6f4247"/>
            <staticText>
                <reportElement mode="Opaque" x="0" y="0" width="90" height="12" backcolor="#B5B1B1" 
   uuid="2e67ff25-3aa6-49f0-bb83-5cd28e314998">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="d024575a- 
  fb0a-451f-8b2d-cade842575f4"/>
                </reportElement>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement>
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[ProductName]]></text>
            </staticText>
            <staticText>
                <reportElement mode="Opaque" x="123" y="0" width="37" height="12" 
     backcolor="#B5B1B1" uuid="bcbbd2a5-80a1-4fc9-a81e-eacc39f13469">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="d3bba6ed- 
     de90-43cf-8f6f-69e46424a222"/>
                </reportElement>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center">
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[QTY]]></text>
            </staticText>
            <staticText>
                <reportElement mode="Opaque" x="160" y="0" width="46" height="12" 
 backcolor="#B5B1B1" uuid="b03a9f6b-8e4a-4713-97d5-4f4b0d5328a4">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="0858ebda- 
 96cc-47aa-87e1-547a933ba615"/>
                </reportElement>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center">
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[Amount]]></text>
            </staticText>
            <staticText>
                <reportElement mode="Opaque" x="90" y="0" width="33" height="12" backcolor="#B5B1B1" 
   uuid="84d50446-e949-45fb-8878-970110ad3b77">
                    <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="78f6ac15- 
   2b9b-44af-a5d3-24653c1ccba8"/>
                </reportElement>
                <textElement>
                    <font size="8" isBold="true"/>
                </textElement>
                <text><![CDATA[HSN]]></text>
            </staticText>
        </frame>
    </band>
</columnHeader>
<detail>
    <band height="13" splitType="Stretch">
        <textField>
            <reportElement x="90" y="0" width="33" height="10" uuid="0a514f1c-dfd0-4bb4-a2ee- 
   1f23b11e8af0">
                <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="993566be- 
   0699-4baf-9ce1-f2e432c13c09"/>
            </reportElement>
            <textElement>
                <font size="7"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{hsn}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="123" y="0" width="37" height="10" uuid="b6105148-f035-4c31-a4de- 
   4cdb6758be18">
                <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="0ba9f72a- 
   8f8e-4247-89c1-76dd3d7a5a84"/>
            </reportElement>
            <textElement>
                <font size="7"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{qty}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="160" y="0" width="46" height="10" uuid="a01a62ab-adf5-485d-86bd- 
   3e2cc95eda68">
                <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="6c40db8e- 
   dbb8-44b1-a1e9-16c201a3942b"/>
            </reportElement>
            <textElement textAlignment="Right">
                <font size="7"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{producttotal}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="1" y="0" width="89" height="10" uuid="acc2d70b-defc-4998-b810- 
   9c3d5b525c23">
                <property name="com.jaspersoft.studio.spreadsheet.connectionID" value="35745383- 
   6389-42e3-9f08-a7d4cb780ead"/>
            </reportElement>
            <textElement>
                <font size="5"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
        </textField>
    </band>
    </detail>
    <lastPageFooter>
    <band height="56">
        <staticText>
            <reportElement x="0" y="18" width="12" height="13" uuid="538bc9e2-272d-4806-837a- 
   96cc6098a6fb"/>
            <textElement>
                <font size="7" isBold="true"/>
            </textElement>
            <text><![CDATA[For]]></text>
        </staticText>
        <textField>
            <reportElement x="12" y="18" width="87" height="13" uuid="00937057-8ac7-489f-bdba- 
   395959ef0dec"/>
            <textElement>
                <font size="7"/>
            </textElement>
            <textFieldExpression><![CDATA[$P{companyname}]]></textFieldExpression>
        </textField>
        <staticText>
            <reportElement x="0" y="41" width="99" height="9" uuid="253a6978-4b31-4081-ab98- 
    024eb5f0df24"/>
            <textElement>
                <font size="7" isBold="true"/>
            </textElement>
            <text><![CDATA[Authorised Signatory]]></text>
        </staticText>
        <staticText>
            <reportElement x="0" y="1" width="77" height="10" uuid="205562d3-5d20-45d5-a82f- 
     d5236e2181e5"/>
            <textElement>
                <font size="7" isBold="true"/>
            </textElement>
            <text><![CDATA[T&C : E.& O.E.]]></text>
        </staticText>
        <line>
            <reportElement x="0" y="0" width="206" height="1" uuid="ab337e57-72ea-4ee2-872e- 
    823248051e51"/>
        </line>
        <staticText>
            <reportElement x="109" y="20" width="51" height="9" uuid="f843b4ed-3ecd-4332-b4b1- 
    ce7851f6d964"/>
            <textElement>
                <font size="7" isBold="true"/>
            </textElement>
            <text><![CDATA[CGST :-]]></text>
        </staticText>
        <staticText>
            <reportElement x="109" y="29" width="51" height="9" uuid="8f14e249-c258-4bc7-a74e- 
   b64c0f6702c5"/>
            <textElement>
                <font size="7" isBold="true"/>
            </textElement>
            <text><![CDATA[SGST :-]]></text>
        </staticText>
        <staticText>
            <reportElement x="109" y="38" width="51" height="9" uuid="5aeb990c-f54b-4df5-82b7- 
   0ebb64f791d5"/>
            <textElement>
                <font size="7" isBold="true"/>
            </textElement>
            <text><![CDATA[Round Off :-]]></text>
        </staticText>
        <staticText>
            <reportElement x="109" y="47" width="51" height="9" uuid="966b161c-4a1d-4d73-9278- 
    ed8ff5e79d9e"/>
            <textElement>
                <font size="7" isBold="true"/>
            </textElement>
            <text><![CDATA[Amount :-]]></text>
        </staticText>
        <textField>
            <reportElement x="160" y="20" width="46" height="9" uuid="16161ca3-054b-42f2-b530- 
   c24393821f6f"/>
            <textElement textAlignment="Right">
                <font size="7"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{cgst}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="160" y="29" width="46" height="9" uuid="a1d53d1f-e44a-4bda-9107- 
    10dae21a87e8"/>
            <textElement textAlignment="Right">
                <font size="7"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{cgst}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="160" y="38" width="46" height="9" uuid="6363cadf-5ef3-4bc7-be57- 
   978913cd23b4"/>
            <textElement textAlignment="Right">
                <font size="7"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{roundoff}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="160" y="47" width="46" height="9" uuid="290acd57-bb52-4685-9e83- 
   5ad03fde0f4f"/>
            <textElement textAlignment="Right">
                <font size="7" isBold="true"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
        </textField>
        <staticText>
            <reportElement x="109" y="2" width="51" height="9" uuid="7cc0c93f-6b54-4cfa-8033- 
   de0b26ca595a"/>
            <textElement>
                <font size="7" isBold="true"/>
            </textElement>
            <text><![CDATA[Gross Amnt :-]]></text>
        </staticText>
        <textField>
            <reportElement x="160" y="2" width="46" height="9" uuid="0b7a1e36-d63d-489e-88e1- 
   5908f3cf8f2f"/>
            <textElement textAlignment="Right">
                <font size="7"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{grossamount}]]></textFieldExpression>
        </textField>
        <staticText>
            <reportElement x="109" y="11" width="51" height="9" uuid="0a052948-893a-44fe-863d- 
  073f6b93c3cd"/>
            <textElement>
                <font size="7" isBold="true"/>
            </textElement>
            <text><![CDATA[Discount :-]]></text>
        </staticText>
        <textField>
            <reportElement x="160" y="11" width="46" height="9" uuid="559558f2-bca6-4150-9431- 
  65d40dd3e9dd"/>
            <textElement textAlignment="Right">
                <font size="7"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{discount}]]></textFieldExpression>
        </textField>
    </band>
</lastPageFooter>
 </jasperReport>

0 个答案:

没有答案