I have added tables in jasper report it displays tables in pdf preview but not in PDF output

0
<?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="report16" language="groovy" pageWidth="612"
              pageHeight="792" columnWidth="555" leftMargin="20"
              rightMargin="20" topMargin="20" bottomMargin="20"
              uuid="2bbc0a92-ee30-4bec-b1c6-cd066c10e108">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x"    value="0"  />
    <property name="ireport.y"    value="0"  />
    <style name="table">
        <box><pen lineWidth="1.0" lineColor="#000000"/></box>
    </style>
    <style name="table_TH" mode="Opaque" backcolor="#8ACD00"><box>
        <pen lineWidth="0.5" lineColor="#000000"/></box>
    </style>
    <style name="table_CH" mode="Opaque" backcolor="#F7FFE6">
        <box><pen lineWidth="0.5" lineColor="#000000"/></box>
    </style>
    <style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
        <box><pen lineWidth="0.5" lineColor="#000000"/></box>
    </style>
    <style name="table 1">
        <box><pen lineWidth="1.0" lineColor="#000000"/></box>
    </style>
    <style name="table 1_TH" mode="Opaque" backcolor="#ADFF2F">
        <box><pen lineWidth="0.5" lineColor="#000000"/></box>
    </style>
    <style name="table 1_CH" mode="Opaque" backcolor="#E6FFBF">
        <box><pen lineWidth="0.5" lineColor="#000000"/></box>
    </style>
    <style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF">
        <box><pen lineWidth="0.5" lineColor="#000000"/></box>
    </style>
    <style name="table 2">
        <box><pen lineWidth="1.0" lineColor="#000000"/></box>
    </style>
    <style name="table 2_TH" mode="Opaque" backcolor="#9ACD32">
        <box><pen lineWidth="0.5" lineColor="#000000"/> </box>
    </style>
    <style name="table 2_CH" mode="Opaque" backcolor="#EAFFBF">
        <box><pen lineWidth="0.5" lineColor="#000000"/></box>
    </style>
    <style name="table 2_TD" mode="Opaque" backcolor="#FFFFFF">
        <box><pen lineWidth="0.5" lineColor="#000000"/></box>
    </style>
    <subDataset name="New Dataset 1"
                uuid="7ce1829c-887c-4871-b3d3-394ca29e8fc0">
        <queryString language="SQL">
            <![CDATA[SELECT * FROM rept01]]>
        </queryString>
        <field name="Comp_Label" class="java.lang.String">
            <fieldDescription><![CDATA[]]></fieldDescription>
        </field>
        <field name="Name" class="java.lang.String">
            <fieldDescription><![CDATA[]]></fieldDescription>
        </field>
        <field name="Unit_Id" class="java.lang.Integer">
            <fieldDescription><![CDATA[]]></fieldDescription>
        </field>
        <field name="Size" class="java.lang.Integer">
            <fieldDescription><![CDATA[]]></fieldDescription>
        </field>
        <field name="Dimension" class="java.lang.String">
            <fieldDescription><![CDATA[]]></fieldDescription>
        </field>
        <field name="Price" class="java.math.BigDecimal">
            <fieldDescription><![CDATA[]]></fieldDescription>
        </field>
        <field name="Demark" class="java.lang.String">
            <fieldDescription><![CDATA[]]></fieldDescription>
        </field>
    </subDataset>
    <queryString language="SQL">
        <![CDATA[SELECT * FROM rept01]]>
    </queryString>
    <field name="Comp_Label" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Name" class="java.lang.String">  <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Unit_Id" class="java.lang.Integer">  <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Size" class="java.lang.Integer">  <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Dimension" class="java.lang.String">  <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Price" class="java.math.BigDecimal">  <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <field name="Demark" class="java.lang.String">  <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <background>  <band             splitType="Stretch"/></background>
    <title>       <band height="79" splitType="Stretch"/></title>
    <pageHeader>  <band height="35" splitType="Stretch"/></pageHeader>
    <columnHeader><band height="61" splitType="Stretch"/></columnHeader>
    <detail>
        <band height="127" splitType="Stretch">
            <componentElement>
                <reportElement key="table 2" style="table 2" x="16" y="0" width="540" height="127"
                               uuid="599e6873-5d53-482e-b7f9-955b4aa864ca"/>
                <jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components"
                          xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components
                                              http://jasperreports.sourceforge.net/xsd/components.xsd">
                    <datasetRun subDataset="New Dataset 1" uuid="b63efb8f-943b-4191-8375-2360a37dff0a">
                        <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                    </datasetRun>
                    <jr:column width="90" uuid="fceeac70-65d9-4067-9419-50b130b9d1ae">
                        <jr:tableHeader  style="table 2_TH" height="30"/>
                        <jr:tableFooter  style="table 2_TH" height="30"/>
                        <jr:columnHeader style="table 2_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="90" height="30"
                                               uuid="b9d7e5b8-e9dd-4ff8-a417-dfe986796398"/>
                                <text><![CDATA[Name]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:columnFooter style="table 2_CH" height="30"/>
                        <jr:detailCell   style="table 2_TD" height="20">
                            <textField>
                                <reportElement x="0" y="0" width="90" height="20"
                                               uuid="85005296-43a5-4975-9235-5a721c8c05d5"/>
                                <textFieldExpression><![CDATA[$F{Name}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="90" uuid="96d9e32f-b3e5-47cf-9f09-9d400cac7608">
                        <jr:tableHeader  style="table 2_TH" height="30"/>
                        <jr:tableFooter  style="table 2_TH" height="30"/>
                        <jr:columnHeader style="table 2_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="90" height="30"
                                               uuid="820641dd-430e-4e90-97b7-a41ceb3db6c8"/>
                                <text><![CDATA[Unit_Id]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:columnFooter style="table 2_CH" height="30"/>
                        <jr:detailCell   style="table 2_TD" height="20">
                            <textField>
                                <reportElement x="0" y="0" width="90" height="20"
                                               uuid="9efb9951-05b6-4478-af69-d3a92f10d98a"/>
                                <textFieldExpression><![CDATA[$F{Unit_Id}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="90" uuid="724d65dd-337d-4c20-9926-b43a8a1b59d6">
                        <jr:tableHeader  style="table 2_TH" height="30"/>
                        <jr:tableFooter  style="table 2_TH" height="30"/>
                        <jr:columnHeader style="table 2_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="90" height="30"
                                               uuid="06b0c423-135c-4fd3-976f-8fb8d8fc9ab5"/>
                                <text><![CDATA[Size]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:columnFooter style="table 2_CH" height="30"/>
                        <jr:detailCell   style="table 2_TD" height="20">
                            <textField>
                                <reportElement x="0" y="0" width="90" height="20"
                                               uuid="8417d8a6-228b-4fec-ba30-5f7ded8ad857"/>
                                <textFieldExpression><![CDATA[$F{Size}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="90" uuid="74981c94-2010-49b8-8140-386a6f40fa80">
                        <jr:tableHeader style="table 2_TH" height="30"/>
                        <jr:tableFooter style="table 2_TH" height="30"/>
                        <jr:columnHeader style="table 2_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="90" height="30"
                                               uuid="c699003d-56a4-4265-a8d1-44f6262cc0cc"/>
                                    <text><![CDATA[Dimension]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:columnFooter style="table 2_CH" height="30"/>
                            <jr:detailCell style="table 2_TD" height="20">
                            <textField>
                                <reportElement x="0" y="0" width="90" height="20"
                                               uuid="232b585b-9e06-4727-b29c-0b1a3972d8fa"/>
                                    <textFieldExpression><![CDATA[$F{Dimension}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="90" uuid="32616937-2239-4d8d-8c4a-fafee90a491d">
                        <jr:tableHeader  style="table 2_TH" height="30"/>
                        <jr:tableFooter  style="table 2_TH" height="30"/>
                        <jr:columnHeader style="table 2_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="90" height="30"
                                               uuid="32918ab4-b396-402f-82f2-587a0175c962"/>
                                <text><![CDATA[Price]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:columnFooter style="table 2_CH" height="30"/>
                        <jr:detailCell   style="table 2_TD" height="20">
                            <textField>
                                <reportElement x="0" y="0" width="90" height="20"
                                               uuid="ee42249d-6cca-4685-8221-ef56c0e38bb8"/>
                                <textFieldExpression><![CDATA[$F{Price}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="90" uuid="e7c7916c-b2ec-4eb6-8b82-e5dfb08a66f3">
                        <jr:tableHeader style="table 2_TH" height="30"/>
                        <jr:tableFooter style="table 2_TH" height="30"/>
                        <jr:columnHeader style="table 2_CH" height="30">
                            <staticText>
                                <reportElement x="0" y="0" width="90" height="30"
                                               uuid="7854cc7b-02e9-444a-88a4-9ce1b86082ff"/>
                                <text><![CDATA[Demark]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:columnFooter style="table 2_CH" height="30"/>
                        <jr:detailCell   style="table 2_TD" height="20">
                            <textField>
                                <reportElement x="0" y="0" width="90" height="20"
                                               uuid="48878698-4dc6-4c15-aef2-93fc0e177e64"/>
                                <textFieldExpression><![CDATA[$F{Demark}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                </jr:table>
            </componentElement>
        </band>
    </detail>
    <columnFooter> <band height="45" splitType="Stretch"/></columnFooter>
    <pageFooter>
        <band height="54" splitType="Stretch"/>
    </pageFooter>
    <summary>
        <band height="42" splitType="Stretch"/> 
    </summary>
</jasperReport>
 
 
 
 
 

I need to add any properties or components........?

venkat1661993's picture
Joined: Oct 18 2016 - 1:16am
Last seen: 1 year 11 months ago

0 Answers:

No answers yet
Feedback
randomness