Jump to content
We've recently updated our Privacy Statement, available here ×

How to get Disclaimer on back side of every page I print in iReports?


azam_1

Recommended Posts

Hi, I am using iReports 5.6.0 and I have to print a Disclaimer for a company on back side of their Invoice. The main report is bascically divided into 3 Subreports:

1st is for the Logo (Company Name and their information)

2nd is INVOICE TO (It's for the customer who gets billed)

3rd is Last Page Footer (shows total calculation)

In between 2nd n 3rd Subreports there is the Table in 1st Detail Band which lists the products with their price.

The problem is, the table has many entries which makes the table extend into the next page and so on. I need the disclaimer to be printed in between each page of those tables as well.

I have tried putting the disclaimer in a another detail band right after the 1st Detail Band (in which the table resides) and used PrintWhenExpression but the Disclaimer is printed after the whole table has printed.

Other thing i tried is that I put the disclaimer inside the table below the table row. But the disclaimer can only reside in one of the column of the table (I have 3 columns in the table). I need to print the disclaimer in the whole page with full width (not the width of 1 column of table).

Please help! Below is the my source code in XML

<?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="JasperMemo_Print_WithImages" language="groovy" pageWidth="595" pageHeight="980" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="75f92902-a586-4cdc-bb02-dd1a2a8f5189">
    <property name="ireport.zoom" value="0.7513148009015809"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="213"/>
    <property name="net.sf.jasperreports.export.xls.ignore.graphics" value="false"/>
    <property name="net.sf.jasperreports.export.xls.one.page.per.sheet" value="true"/>
    <property name="net.sf.jasperreports.export.xls.ignore.cell.border" value="false"/>
    <subDataset name="DataSetReport" uuid="fc85dfe6-1cd0-47a6-8fe8-4b1e953bbcba">
        <parameter name="ORDERBY" class="java.lang.String"/>
        <parameter name="IMGDIR" class="java.lang.String"/>
        <parameter name="MEMOID" class="java.lang.String"/>
        <queryString>
            <![CDATA[sELECT n.`dummyNo.`,t.* FROM `dummytableMemo` n
LEFT JOIN (SELECT @rownum := @rownum +1 r,je.`jwl_desc` as line1,IF(je.`jwl_DIA_Weight`!=0.00,CONCAT(je.`jwl_metal`,'   ','Dia.',je.`jwl_DIA_Weight`,' ','Ct.'),je.`jwl_metal`) as line2,CONCAT(je.`jwl_custom1`,'   ',je.`jwl_custom2`,'   ',je.`jwl_custom3`) as line3, IFNULL(ad.memoId,0) as memoId,DATE_FORMAT(ao.date_created ,'%m/%d/%Y') as issueDate,ao.PO_id,sm.salesman_name as salesperson,sv.SHIPVIA ,ad.jwl_item,ad.qty,ad.desc,
ad.item,ao.freight,REPLACE(REPLACE(Concat((select Path from FilePath_Thumbnail where ID = 'JewelryImages'), if(je.`jwl_jewel_image1`!=null || je.`jwl_jewel_image1`!='',CONCAT(
SUBSTRING_INDEX(`jwl_jewel_image1`,'.',1),'_','tb.',SUBSTRING_INDEX(`jwl_jewel_image1`,'.',-1)),
CONCAT(SUBSTRING_INDEX('blank.jpg','.',1),'_','tb.',SUBSTRING_INDEX(`jwl_jewel_image1`,'.',-1)) )) ,' ','%20'),'  ','%20%20') as jwlImage,ad.price_per_ct,ad.total_price as totalPrice ,(ad.price_per_ct*ad.qty) as total,ao.memo_total,ao.sub_total,ac.name,ac.city,ac.state,ac.phone,CONCAT(ac.`zip`,'',ac.`country`) as add2,CONCAT(ac.`phone`,'/',ac.`name`) as add3,ac.fax,ac.cell,am.Message, CONCAT(ac.`address1`,' ',ac.`city`,',',ac.`state`) as add1,ac.email,st.shipTo,st.city as shpCity,st.state as shpstate,st.phone as shpphone,CONCAT(st.`zip`,'',st.`country`) as shpadd2,CONCAT(st.`phone`,'/',st.`shipTo`) as shpadd3,
st.fax as shpfax, CONCAT(st.`address1`,' ',st.`city`,',',st.`state`) as shpadd1 from account_memoOutData as ad
LEFT JOIN account_memoOut as ao ON (ad.memoId=ao.memoId)
LEFT JOIN account_salesManMaintanance as sm ON (sm.salesman_id=ao.salesman_id_1)
LEFT JOIN account_shipvia as sv ON (sv.shipvia_id=ao.shipvia_id)
LEFT JOIN account_shipTo as st ON (st.id=ao.shipTo_id)
LEFT JOIN account_terms as at ON (at.terms_Id=ao.terms_id)
LEFT JOIN account_customer as ac ON (ac.customerId=ao.customer_id)
LEFT JOIN account_message as am ON (am.message_id=ao.message_id)
LEFT JOIN jewel_entry as je ON ( je.`jwl_store_style` = ad.`Store_Style` ) ,(SELECT @rownum :=0)r  where ad.memoId=$P!{MEMOID} order by $P!{ORDERBY} )t
ON n.`dummyNo.`=t.R]]>
        </queryString>
        <field name="dummyNo." class="java.lang.Integer"/>
        <field name="r" class="java.lang.Double"/>
        <field name="line1" class="java.lang.String"/>
        <field name="line2" class="java.lang.String"/>
        <field name="line3" class="java.lang.String"/>
        <field name="memoId" class="java.lang.Long"/>
        <field name="issueDate" class="java.lang.String"/>
        <field name="PO_id" class="java.lang.String"/>
        <field name="salesperson" class="java.lang.String"/>
        <field name="SHIPVIA" class="java.lang.String"/>
        <field name="jwl_item" class="java.lang.String"/>
        <field name="qty" class="java.lang.Integer"/>
        <field name="desc" class="java.lang.String"/>
        <field name="item" class="java.lang.String"/>
        <field name="freight" class="java.lang.Double"/>
        <field name="jwlImage" class="java.lang.String"/>
        <field name="price_per_ct" class="java.lang.Double"/>
        <field name="totalPrice" class="java.lang.Double"/>
        <field name="total" class="java.lang.Double"/>
        <field name="memo_total" class="java.lang.Double"/>
        <field name="sub_total" class="java.lang.Double"/>
        <field name="name" class="java.lang.String"/>
        <field name="city" class="java.lang.String"/>
        <field name="state" class="java.lang.String"/>
        <field name="phone" class="java.lang.String"/>
        <field name="add2" class="java.lang.String"/>
        <field name="add3" class="java.lang.String"/>
        <field name="fax" class="java.lang.String"/>
        <field name="cell" class="java.lang.String"/>
        <field name="Message" class="java.lang.String"/>
        <field name="add1" class="java.lang.String"/>
        <field name="email" class="java.lang.String"/>
        <field name="shipTo" class="java.lang.String"/>
        <field name="shpCity" class="java.lang.String"/>
        <field name="shpstate" class="java.lang.String"/>
        <field name="shpphone" class="java.lang.String"/>
        <field name="shpadd2" class="java.lang.String"/>
        <field name="shpadd3" class="java.lang.String"/>
        <field name="shpfax" class="java.lang.String"/>
        <field name="shpadd1" class="java.lang.String"/>
    </subDataset>
    <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA["D:\backupServer\Superior\PrintWithImage\"]]></defaultValueExpression>
    </parameter>
    <parameter name="ORDERBY" class="java.lang.String"/>
    <parameter name="IMGDIR" class="java.lang.String"/>
    <parameter name="MEMOID" class="java.lang.String"/>
    <queryString>
        <![CDATA[sELECT 1 from dual]]>
    </queryString>
    <field name="1" class="java.lang.Long">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
    <title>
        <band height="288" splitType="Stretch">
            <subreport>
                <reportElement x="0" y="0" width="555" height="180" uuid="95362b59-e8b3-406d-a043-3252ac7cb3fb"/>
                <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                <subreportExpression><![CDATA["repo:JasperMemo_Print_WithImages_subreport1.jrxml"]]></subreportExpression>
            </subreport>
            <subreport>
                <reportElement x="0" y="180" width="555" height="108" uuid="888548a5-f49f-4b1d-831a-c6f0f7ae7cc0"/>
                <subreportParameter name="MEMOID">
                    <subreportParameterExpression><![CDATA[$P{MEMOID}]]></subreportParameterExpression>
                </subreportParameter>
                <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                <subreportExpression><![CDATA["repo:JasperMemo_Print_WithImages_subreport3.jrxml"]]></subreportExpression>
            </subreport>
        </band>
    </title>
    <detail>
        <band height="33" splitType="Stretch">
            <componentElement>
                <reportElement key="table" x="0" y="0" width="555" height="30" uuid="14f930cc-833f-4766-a233-b6363b285808"/>
                <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" whenNoDataType="AllSectionsNoDetail">
                    <datasetRun subDataset="DataSetReport" uuid="1bfe5313-a62c-41b7-b7b6-c31326712076">
                        <datasetParameter name="ORDERBY">
                            <datasetParameterExpression><![CDATA[$P{ORDERBY}]]></datasetParameterExpression>
                        </datasetParameter>
                        <datasetParameter name="IMGDIR">
                            <datasetParameterExpression><![CDATA[$P{IMGDIR}]]></datasetParameterExpression>
                        </datasetParameter>
                        <datasetParameter name="MEMOID">
                            <datasetParameterExpression><![CDATA[$P{MEMOID}]]></datasetParameterExpression>
                        </datasetParameter>
                        <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                    </datasetRun>
                    <jr:column width="5" uuid="a72c408a-cadd-4696-b870-735251a1e1fc">
                        <jr:columnHeader height="17" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineColor="#999999"/>
                                <leftPen lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineColor="#999999"/>
                            </box>
                        </jr:columnHeader>
                        <jr:columnFooter height="5" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineColor="#999999"/>
                                <leftPen lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineColor="#999999"/>
                            </box>
                        </jr:columnFooter>
                        <jr:detailCell height="67" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineColor="#999999"/>
                                <leftPen lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineColor="#999999"/>
                            </box>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="107" uuid="00601a34-01f3-4184-814d-1abf08dd9a1c">
                        <jr:columnHeader height="17" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineColor="#999999"/>
                                <leftPen lineWidth="0.75" lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineColor="#999999"/>
                            </box>
                            <staticText>
                                <reportElement mode="Opaque" x="1" y="0" width="106" height="17" forecolor="#FFFFFF" backcolor="#999999" uuid="9f3f2651-f198-445f-8968-9fe84838567c"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                                <text><![CDATA[item]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:columnFooter height="5" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineWidth="0.75" lineColor="#999999"/>
                                <leftPen lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineColor="#999999"/>
                            </box>
                        </jr:columnFooter>
                        <jr:detailCell height="67" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineColor="#999999"/>
                                <leftPen lineWidth="0.75" lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineWidth="0.75" lineColor="#999999"/>
                            </box>
                            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                                <reportElement x="55" y="0" width="51" height="42" uuid="3c9fe3f8-108f-4c6f-909f-13cc7e3233f0"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle">
                                    <font size="9"/>
                                </textElement>
                                <textFieldExpression><![CDATA[iF($F{jwl_item}!='',$F{jwl_item},$F{item})]]></textFieldExpression>
                            </textField>
                            <image onErrorType="Blank">
                                <reportElement x="1" y="0" width="55" height="42" uuid="f57348f9-53ac-478c-a3c7-92016b617b02"/>
                                <imageExpression><![CDATA[$F{jwlImage}]]></imageExpression>
                            </image>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="338" uuid="1f52660d-f50f-4bf8-872c-1759819ea1cb">
                        <jr:columnHeader height="17" rowSpan="1">
                            <staticText>
                                <reportElement mode="Opaque" x="0" y="0" width="338" height="17" forecolor="#FFFFFF" backcolor="#999999" uuid="868ee437-e0b6-4ef8-ab46-769abe481c9b"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle">
                                    <font size="11"/>
                                </textElement>
                                <text><![CDATA[Description]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:columnFooter height="5" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineWidth="0.75" lineColor="#999999"/>
                                <leftPen lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineColor="#999999"/>
                            </box>
                        </jr:columnFooter>
                        <jr:detailCell height="67" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineColor="#999999"/>
                                <leftPen lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineWidth="0.75" lineColor="#999999"/>
                            </box>
                            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                                <reportElement x="0" y="0" width="338" height="14" uuid="2c96054a-b2a1-4cef-9184-ecf8ff5f07da"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                                <textFieldExpression><![CDATA[$F{line1}]]></textFieldExpression>
                            </textField>
                            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                                <reportElement x="0" y="14" width="338" height="14" uuid="ad24e9a2-29fd-4aea-a599-486732a4f076"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                                <textFieldExpression><![CDATA[$F{line2}]]></textFieldExpression>
                            </textField>
                            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                                <reportElement x="0" y="28" width="338" height="14" uuid="e64af041-61be-4473-97d9-4ec426a3da2c"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                                <textFieldExpression><![CDATA[$F{line3}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    <jr:column width="100" uuid="26235dfe-1cf3-4408-81ba-45cb348fb267">
                        <jr:columnHeader height="17" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineColor="#999999"/>
                                <leftPen lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineWidth="0.75" lineColor="#999999"/>
                            </box>
                            <staticText>
                                <reportElement mode="Opaque" x="0" y="0" width="100" height="17" forecolor="#FFFFFF" backcolor="#999999" uuid="1b3e9144-219a-477c-8f6c-71acf932b170"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle"/>
                                <text><![CDATA[Total Price  ]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:columnFooter height="5" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineWidth="0.75" lineColor="#999999"/>
                                <leftPen lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineColor="#999999"/>
                            </box>
                        </jr:columnFooter>
                        <jr:detailCell height="67" rowSpan="1">
                            <box>
                                <pen lineColor="#999999"/>
                                <topPen lineColor="#999999"/>
                                <leftPen lineColor="#999999"/>
                                <bottomPen lineColor="#999999"/>
                                <rightPen lineWidth="0.75" lineColor="#999999"/>
                            </box>
                            <textField isStretchWithOverflow="true" pattern="$#,##0" isBlankWhenNull="true">
                                <reportElement x="0" y="0" width="100" height="42" uuid="fbf5f574-a8e5-4fbf-a145-4717ac3aa516"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle">
                                    <font size="9"/>
                                </textElement>
                                <textFieldExpression><![CDATA[$F{totalPrice}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                </jr:table>
            </componentElement>
        </band>
    </detail>
    <lastPageFooter>
        <band height="136">
            <subreport>
                <reportElement x="0" y="0" width="555" height="136" uuid="835dcc6c-bc58-440f-adae-7a3f4b55a2e8"/>
                <subreportParameter name="MEMOID">
                    <subreportParameterExpression><![CDATA[$P{MEMOID}]]></subreportParameterExpression>
                </subreportParameter>
                <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                <subreportExpression><![CDATA["repo:JasperMemo_Print_WithImages_subreport4.jrxml"]]></subreportExpression>
            </subreport>
        </band>
    </lastPageFooter>
    <summary>
        <band height="792" splitType="Prevent">
            <staticText>
                <reportElement x="26" y="75" width="529" height="316" uuid="c2a2bf08-f453-4d19-a931-69ee2067302a"/>
                <textElement>
                    <paragraph lineSpacing="1_1_2" leftIndent="35" rightIndent="35"/>
                </textElement>
                <text><![CDATA[The merchandise described on the reverse side hereof is received on memorandum only, at the Consignee's risk from all hazards, regardless of the cause of the loss or damage, only for examination and inspection by prospective purchasers, upon the the express condition that all such merchandise shall remain the property of HAJIBAY & CO. , and shall be returned on demand, in full in its original form. Until the merchandise is returned and actually received by us, the Consignor, the Consignee shall remain fully responsible therefor, and in the event of damage or loss, whether caused by Consignee or by another, whether or not under Consignee's control, Consignee will indemnify HAJIBAY & CO. immediately by payment of the stated value which represents the extent of the actual loss (and is not intended to constitute a price for the sale of the merchandise), provided that the stated value may be increased by Consignor notifying Consignee in writing of such increase, plus legal fees of twenty-five (25%) percent of the memorandum value, plus costs and disbursements, if litigation is commenced to enforce Consignor's rights. Consignee further agrees that in the event legal process shall be instituted against it for the recovery of the merchandise described herein, or in the event of conversion of the same for damages sustained by Consignor, it hereby waives the filing or posting of any and all bonds which may otherwise be required. Consignee acquires no right or authority to sell, pledge, hypothecate or otherwise dispose of the merchandise, or any part thereof, by memorandum or otherwise, it being expressly understood that regardless of other transactions or prior trade customs, no credit is extended with respect to this merchandise.]]></text>
            </staticText>
            <staticText>
                <reportElement x="26" y="391" width="529" height="69" uuid="e4b804a0-616a-40b5-aafd-9b449c1e2fbf"/>
                <textElement>
                    <paragraph lineSpacing="1_1_2" leftIndent="35" rightIndent="35"/>
                </textElement>
                <text><![CDATA[A sale of all or any portion of the merchandise shall occur only if and when Consignee shall have received from HAJIBAY & CO. a separate invoice covering specific merchandise on the memorandum, provided a sale of any specific part of the merchandise shall not affect the terms hereof with respect to the balance thereof. ]]></text>
            </staticText>
            <staticText>
                <reportElement x="26" y="460" width="529" height="69" uuid="7dbc6393-2b05-4f60-905a-fcd1ba4c8f59"/>
                <textElement>
                    <paragraph lineSpacing="1_1_2" leftIndent="35" rightIndent="35"/>
                </textElement>
                <text><![CDATA[Proceeds of sales of specific merchandise subject to this All-Risk Memorandum by the Consignee prior to receipt of Consignor's invoice covering said specific merchandise shall be held in trust for the Consignor and released from trust only upon receipt from Consignor of an invoice covering said specific merchandise.]]></text>
            </staticText>
            <staticText>
                <reportElement x="26" y="529" width="529" height="177" uuid="f3c20864-0e4a-417c-bf15-6951576413ff"/>
                <textElement>
                    <paragraph lineSpacing="1_1_2" leftIndent="35" rightIndent="35"/>
                </textElement>
                <text><![CDATA[Receipt of the merchandise constitutes Consignee's agreement to the foregoing terms, which represent the entire contract with respect to the merchandise herein described. This contract cannot be varied by oral statements, dealings with respect to other merchandise or any contrary custom of the trade. Consignee hereby agrees that the venue for any litigation brought to enforce Consignor's rights under this agreement or which in way pertains to this agreement shall be in the City and Sate of New York, unless otherwise selected by Consignor. Permission is granted Consignor to file a financing statement under the U.C.C. This memorandum and all memoranda transactions between the parties shall be governed and construed in accordance with the laws of the State of New York, shall be considered for all purposes a Security Agreement, and shall cover all future memoranda transactions between Consignor and Consignee.]]></text>
            </staticText>
        </band>
    </summary>
    <noData>
        <band/>
    </noData>
</jasperReport>

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...