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

ravinderannaram50

Members
  • Posts

    5
  • Joined

  • Last visited

ravinderannaram50's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Thanks for reply mlopez_1, We need to add a page number variable in all subreports.
  2. I have created the main report with two subreports i need to print the page numbers in page header and page footer. I can print page numbers in page footer.In the same way i tried for page header also,but in page header i could not print page numbers at a fixed position for subreport page headers.Please hepl me to solve the problem. <?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="nao_invoice" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isSummaryWithPageHeaderAndFooter="true" > <property name="com.jasperassistant.designer.GridHeight" value="12"/> <property name="com.jasperassistant.designer.GridWidth" value="12"/> <property name="com.jasperassistant.designer.SnapToGrid" value="false"/> <property name="com.jasperassistant.designer.Grid" value="false"/> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <import value="org.joda.time.DateTime"/> <scriptlet name="invlanguage" class="dk.comtalk.billing.server.util.INVLanguage"/> <parameter name="invoiceNumber" class="java.lang.String"/> <parameter name="invoiceDate" class="java.lang.String"/> <parameter name="invoiceDueDate" class="java.lang.String"/> <parameter name="customerName" class="java.lang.String"/> <parameter name="customerAddress" class="java.lang.String"/> <parameter name="customerCity" class="java.lang.String"/> <parameter name="customerProvince" class="java.lang.String"/> <parameter name="customerPostalCode" class="java.lang.String"/> <parameter name="customerMessage1" class="java.lang.String"/> <parameter name="entityLogo" class="java.io.File"/> <parameter name="customerMessage2" class="java.lang.String"/> <parameter name="entity_id" class="java.lang.Integer"/> <parameter name="totalWithTax" class="java.lang.String"/> <parameter name="customerId" class="java.lang.String"/> <parameter name="invoiceId" class="java.lang.Integer"/> <parameter name="invoiceGeneratedDate" class="java.lang.String"/> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["/opt/apps/openbrm-2.2/openbrm/resources/designs/"]]></defaultValueExpression> </parameter> <queryString> <![CDATA[select it.description as itemDesc, (ol.amount) as amount from purchase_order po, order_line ol, order_process op, item_type it, item_type_map itm where po.id = ol.order_id and po.id = op.order_id and op.invoice_id = $P{invoiceId} and ol.item_id = itm.item_id and itm.type_id = it.id and it.description <> 'Provisionable' and it.description <> 'Usage' and it.description <> 'Refund';]]> </queryString> <field name="amount" class="java.math.BigDecimal"/> <field name="itemDesc" class="java.lang.String"/> <pageHeader> <band height="126"> <textField> <reportElement x="214" y="0" width="80" height="15"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}.intValue()]]></textFieldExpression> </textField> </band> </pageHeader> <columnFooter> <band height="78"> <staticText> <reportElement x="168" y="32" width="256" height="15"/> <textElement> <font size="8"/> </textElement> <text><![CDATA[NAO telecom – Pegasuslaan 5 - 1831 Diegem - Belgique]]></text> </staticText> <staticText> <reportElement x="119" y="47" width="560" height="15"/> <textElement> <font size="8"/> </textElement> <text><![CDATA[Customer Service: +32 2 895 70 70 – Fax : +32 2 895 70 99 - www.nao-telecom.be - BE0647.897.246]]></text> </staticText> <staticText> <reportElement x="90" y="0" width="465" height="16" forecolor="#E75E03"/> <textElement> <font size="12" isBold="true"/> </textElement> <text><![CDATA[ Thank you for using Nao-Telecom for all your communication needs]]></text> </staticText> <staticText> <reportElement x="148" y="16" width="377" height="16"/> <textElement> <font size="10" isBold="true"/> </textElement> <text><![CDATA[KBC - IBAN BE94 7340 4240 8914 - BIC KREDBEBB]]></text> </staticText> <staticText> <reportElement x="78" y="62" width="673" height="15"/> <textElement> <font size="8"/> </textElement> <text><![CDATA[All our services, invoices and contracts are subject to our general terms and conditions available on www.nao-telecom.be]]></text> </staticText> </band> </columnFooter> <pageFooter> <band height="19"> <line> <reportElement x="39" y="15" width="503" height="1" forecolor="#E75E03"> <printWhenExpression><![CDATA[new Boolean($V{PAGE_NUMBER}==1)]]></printWhenExpression> </reportElement> </line> <textField> <reportElement x="214" y="0" width="80" height="15"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}.intValue()]]></textFieldExpression> </textField> </band> </pageFooter> <summary> <band height="161"> <subreport runToBottom="true"> <reportElement positionType="Float" x="8" y="3" width="539" height="35" isPrintInFirstWholeBand="true"/> <subreportParameter name="invoiceDate"> <subreportParameterExpression><![CDATA[$P{invoiceDate}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="invoiceDueDate"> <subreportParameterExpression><![CDATA[$P{invoiceDueDate}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="customerId"> <subreportParameterExpression><![CDATA[$P{customerId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="entityLogo"> <subreportParameterExpression><![CDATA[$P{entityLogo}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="totalWithTax"> <subreportParameterExpression><![CDATA[$P{totalWithTax}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="invoiceId"> <subreportParameterExpression><![CDATA[$P{invoiceId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="entityName"> <subreportParameterExpression><![CDATA[$P{entityName}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="SUBREPORT_DIR"> <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="invoiceGeneratedDate"> <subreportParameterExpression><![CDATA[$P{invoiceGeneratedDate}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "nao_invoice-sub.jasper"]]></subreportExpression> </subreport> <subreport runToBottom="true"> <reportElement positionType="Float" x="8" y="114" width="539" height="47" isRemoveLineWhenBlank="true"/> <subreportParameter name="invoiceDate"> <subreportParameterExpression><![CDATA[$P{invoiceDate}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="invoiceDueDate"> <subreportParameterExpression><![CDATA[$P{invoiceDueDate}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="customerId"> <subreportParameterExpression><![CDATA[$P{customerId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="entityLogo"> <subreportParameterExpression><![CDATA[$P{entityLogo}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="totalWithTax"> <subreportParameterExpression><![CDATA[$P{totalWithTax}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="invoiceId"> <subreportParameterExpression><![CDATA[$P{invoiceId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="entityName"> <subreportParameterExpression><![CDATA[$P{entityName}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="SUBREPORT_DIR"> <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="invoiceGeneratedDate"> <subreportParameterExpression><![CDATA[$P{invoiceGeneratedDate}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "nao_invoice-sub2.jasper"]]></subreportExpression> </subreport> </band> </summary></jasperReport>[/code]my subreport: <?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="Usage Rport" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" > <property name="com.jasperassistant.designer.GridHeight" value="12"/> <property name="com.jasperassistant.designer.GridWidth" value="12"/> <property name="com.jasperassistant.designer.SnapToGrid" value="false"/> <property name="com.jasperassistant.designer.Grid" value="false"/> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <import value="org.joda.time.DateTime"/> <scriptlet name="invlanguage" class="dk.comtalk.billing.server.util.INVLanguage"/> <parameter name="invoiceNumber" class="java.lang.String"/> <parameter name="entityName" class="java.lang.String"/> <parameter name="entityAddress" class="java.lang.String"/> <parameter name="entityCity" class="java.lang.String"/> <parameter name="entityProvince" class="java.lang.String"/> <parameter name="entityPostalCode" class="java.lang.String"/> <parameter name="invoiceDate" class="java.lang.String"/> <parameter name="invoiceDueDate" class="java.lang.String"/> <parameter name="customerName" class="java.lang.String"/> <parameter name="customerAddress" class="java.lang.String"/> <parameter name="customerCity" class="java.lang.String"/> <parameter name="customerProvince" class="java.lang.String"/> <parameter name="customerPostalCode" class="java.lang.String"/> <parameter name="customerMessage1" class="java.lang.String"/> <parameter name="entityLogo" class="java.io.File"/> <parameter name="customerMessage2" class="java.lang.String"/> <parameter name="entity_id" class="java.lang.Integer"/> <parameter name="notes" class="java.lang.String"/> <parameter name="customerOrganization" class="java.lang.String"/> <parameter name="totalWithTax" class="java.lang.String"/> <parameter name="carriedBalance" class="java.lang.String"/> <parameter name="balance" class="java.lang.String"/> <parameter name="totalWithoutTax" class="java.lang.String"/> <parameter name="entityPhoneCountryCode" class="java.lang.String"/> <parameter name="entityPhoneAreaCode" class="java.lang.String"/> <parameter name="entityPhoneContry" class="java.lang.String"/> <parameter name="customerId" class="java.lang.String"/> <parameter name="invoiceId" class="java.lang.Integer"/> <parameter name="userId" class="java.lang.Integer"/> <parameter name="invoiceGeneratedDate" class="java.lang.String"/> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["/opt/apps/openbrm-2.2/openbrm/resources/designs/"]]></defaultValueExpression> </parameter> <queryString> <![CDATA[select it.description as itemDesc,bs.user_name ,co.organization_name ,sum(ol.amount) amount from purchase_order po, order_line ol, invoice_line l,order_process op, item_type it,invoice i,base_user bs,contact co,customer cu,item_type_map itm where po.id = ol.order_id and po.id = op.order_id and co.user_id = po.user_id and cu.user_id = po.user_id and bs.id=po.user_id and ol.item_id = itm.item_id and itm.type_id = it.id and op.invoice_id = $P{invoiceId} ;]]> </queryString> <field name="user_name" class="java.lang.String"/> <title> <band height="3"/> </title> <pageHeader> <band height="126"> <staticText> <reportElement x="30" y="82" width="160" height="15"/> <textElement> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Overzicht van de diensten en verbruik]]></text> </staticText> <line> <reportElement x="30" y="115" width="500" height="1" backcolor="#C3C3C3"/> <graphicElement> <pen lineWidth="0.0"/> </graphicElement> </line> <rectangle> <reportElement x="30" y="102" width="500" height="12" backcolor="#C3C3C3"/> <graphicElement> <pen lineWidth="0.0"/> </graphicElement> </rectangle> <staticText> <reportElement x="414" y="102" width="62" height="16"/> <textElement> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Quantity]]></text> </staticText> <staticText> <reportElement x="506" y="102" width="100" height="16"/> <textElement> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Total]]></text> </staticText> <staticText> <reportElement x="30" y="102" width="100" height="15"/> <textElement> <font isBold="true"/> </textElement> <text><![CDATA[Description]]></text> </staticText> <staticText> <reportElement x="379" y="41" width="101" height="14"/> <textElement> <font size="9"/> </textElement> <text><![CDATA[Klantnummer]]></text> </staticText> <staticText> <reportElement x="379" y="9" width="97" height="20"/> <textElement> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Factuur]]></text> </staticText> <textField> <reportElement x="397" y="29" width="133" height="14"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <textFieldExpression><![CDATA[$P{invoiceNumber}]]></textFieldExpression> </textField> <staticText> <reportElement positionType="Float" x="379" y="55" width="63" height="14"/> <textElement> <font size="9" isBold="false"/> </textElement> <text><![CDATA[Datum]]></text> </staticText> <staticText> <reportElement x="379" y="29" width="101" height="14"/> <textElement> <font size="9"/> </textElement> <text><![CDATA[Nummer]]></text> </staticText> <textField evaluationTime="Report"> <reportElement positionType="Float" x="383" y="56" width="147" height="14"/> <textElement textAlignment="Right"> <font size="9" isBold="false"/> </textElement> <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format(new SimpleDateFormat("dd/MM/yyyy").parse($P{invoiceGeneratedDate}))]]></textFieldExpression> </textField> <image> <reportElement x="30" y="0" width="189" height="58"/> <imageExpression class="java.io.File"><![CDATA[$P{entityLogo}]]></imageExpression> </image> <staticText> <reportElement x="458" y="69" width="72" height="13"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <text><![CDATA[3]]></text> </staticText> <staticText> <reportElement x="379" y="68" width="66" height="14"/> <textElement> <font size="9" isBold="false"/> </textElement> <text><![CDATA[Pagina]]></text> </staticText> <textField> <reportElement x="397" y="41" width="133" height="14"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <textFieldExpression><![CDATA[$P{invlanguage_SCRIPTLET}.getUserName($P{customerId})]]></textFieldExpression> </textField> </band> </pageHeader> <detail> <band height="74"> <subreport isUsingCache="false"> <reportElement isPrintRepeatedValues="false" x="30" y="0" width="498" height="15"/> <subreportParameter name="customerId"> <subreportParameterExpression><![CDATA[$P{customerId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="invoiceId"> <subreportParameterExpression><![CDATA[$P{invoiceId}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "nao_invoice-sub_details.jasper"]]></subreportExpression> </subreport> <subreport isUsingCache="false"> <reportElement positionType="Float" x="30" y="16" width="498" height="10" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true"> <printWhenExpression><![CDATA[new Boolean($P{invlanguage_SCRIPTLET}.checkUsage($P{invoiceId}))]]></printWhenExpression> </reportElement> <subreportParameter name="invoiceId"> <subreportParameterExpression><![CDATA[$P{invoiceId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="userId"> <subreportParameterExpression><![CDATA[$P{userId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="entity_id"> <subreportParameterExpression><![CDATA[$P{entity_id}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "nao_call_details.jasper"]]></subreportExpression> </subreport> <subreport isUsingCache="false"> <reportElement positionType="Float" x="30" y="34" width="498" height="10" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true"> <printWhenExpression><![CDATA[new Boolean($P{invlanguage_SCRIPTLET}.checkUsage($P{invoiceId}))]]></printWhenExpression> </reportElement> <subreportParameter name="invoiceId"> <subreportParameterExpression><![CDATA[$P{invoiceId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="entity_id"> <subreportParameterExpression><![CDATA[$P{entity_id}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "nao_international.jasper"]]></subreportExpression> </subreport> </band> </detail> <pageFooter> <band height="21"/> </pageFooter> <summary> <band height="32"> <staticText> <reportElement x="30" y="15" width="100" height="15"/> <textElement verticalAlignment="Bottom"> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Totaal (Excl. BTW)]]></text> </staticText> <textField> <reportElement x="452" y="17" width="76" height="13"/> <textElement textAlignment="Right" verticalAlignment="Top"> <font size="9" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$P{totalWithTax}]]></textFieldExpression> </textField> <staticText> <reportElement x="30" y="0" width="100" height="15"/> <textElement verticalAlignment="Bottom"> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Totaal Subaccount ]]></text> </staticText> <textField> <reportElement x="428" y="0" width="100" height="15"/> <textElement textAlignment="Right"> <font size="9" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$P{totalWithTax}]]></textFieldExpression> </textField> </band> </summary></jasperReport>[/code]my subreport 2: <?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="Usage Rport" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" > <property name="com.jasperassistant.designer.GridHeight" value="12"/> <property name="com.jasperassistant.designer.GridWidth" value="12"/> <property name="com.jasperassistant.designer.SnapToGrid" value="false"/> <property name="com.jasperassistant.designer.Grid" value="false"/> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <import value="org.joda.time.DateTime"/> <scriptlet name="invlanguage" class="dk.comtalk.billing.server.util.INVLanguage"/> <parameter name="invoiceNumber" class="java.lang.String"/> <parameter name="entityName" class="java.lang.String"/> <parameter name="entityAddress" class="java.lang.String"/> <parameter name="entityCity" class="java.lang.String"/> <parameter name="entityProvince" class="java.lang.String"/> <parameter name="entityPostalCode" class="java.lang.String"/> <parameter name="invoiceDate" class="java.lang.String"/> <parameter name="invoiceDueDate" class="java.lang.String"/> <parameter name="customerName" class="java.lang.String"/> <parameter name="customerAddress" class="java.lang.String"/> <parameter name="customerCity" class="java.lang.String"/> <parameter name="customerProvince" class="java.lang.String"/> <parameter name="customerPostalCode" class="java.lang.String"/> <parameter name="customerMessage1" class="java.lang.String"/> <parameter name="entityLogo" class="java.io.File"/> <parameter name="customerMessage2" class="java.lang.String"/> <parameter name="entity_id" class="java.lang.Integer"/> <parameter name="notes" class="java.lang.String"/> <parameter name="customerOrganization" class="java.lang.String"/> <parameter name="totalWithTax" class="java.lang.String"/> <parameter name="carriedBalance" class="java.lang.String"/> <parameter name="balance" class="java.lang.String"/> <parameter name="totalWithoutTax" class="java.lang.String"/> <parameter name="entityPhoneCountryCode" class="java.lang.String"/> <parameter name="entityPhoneAreaCode" class="java.lang.String"/> <parameter name="entityPhoneContry" class="java.lang.String"/> <parameter name="customerId" class="java.lang.String"/> <parameter name="invoiceId" class="java.lang.Integer"/> <parameter name="userId" class="java.lang.Integer"/> <parameter name="invoiceGeneratedDate" class="java.lang.String"/> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["/opt/apps/openbrm-2.2/openbrm/resources/designs/"]]></defaultValueExpression> </parameter> <queryString> <![CDATA[select it.description as itemDesc,bs.user_name ,co.organization_name ,sum(ol.amount) amount from purchase_order po, order_line ol, invoice_line l,order_process op, item_type it,invoice i,base_user bs,contact co,customer cu,item_type_map itm where po.id = ol.order_id and po.id = op.order_id and co.user_id = po.user_id and cu.user_id = po.user_id and bs.id=po.user_id and ol.item_id = itm.item_id and itm.type_id = it.id and op.invoice_id = $P{invoiceId} ;]]> </queryString> <field name="user_name" class="java.lang.String"/> <title> <band height="3"/> </title> <pageHeader> <band height="126"> <staticText> <reportElement x="30" y="82" width="160" height="15"/> <textElement> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Overzicht van de diensten en verbruik]]></text> </staticText> <line> <reportElement x="30" y="115" width="500" height="1" backcolor="#C3C3C3"/> <graphicElement> <pen lineWidth="0.0"/> </graphicElement> </line> <rectangle> <reportElement x="30" y="102" width="500" height="12" backcolor="#C3C3C3"/> <graphicElement> <pen lineWidth="0.0"/> </graphicElement> </rectangle> <staticText> <reportElement x="414" y="102" width="62" height="16"/> <textElement> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Quantity]]></text> </staticText> <staticText> <reportElement x="506" y="102" width="100" height="16"/> <textElement> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Total]]></text> </staticText> <staticText> <reportElement x="30" y="102" width="100" height="15"/> <textElement> <font isBold="true"/> </textElement> <text><![CDATA[Description]]></text> </staticText> <staticText> <reportElement x="379" y="41" width="101" height="14"/> <textElement> <font size="9"/> </textElement> <text><![CDATA[Klantnummer]]></text> </staticText> <staticText> <reportElement x="379" y="9" width="97" height="20"/> <textElement> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Factuur]]></text> </staticText> <textField> <reportElement x="397" y="29" width="133" height="14"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <textFieldExpression><![CDATA[$P{invoiceNumber}]]></textFieldExpression> </textField> <staticText> <reportElement positionType="Float" x="379" y="55" width="63" height="14"/> <textElement> <font size="9" isBold="false"/> </textElement> <text><![CDATA[Datum]]></text> </staticText> <staticText> <reportElement x="379" y="29" width="101" height="14"/> <textElement> <font size="9"/> </textElement> <text><![CDATA[Nummer]]></text> </staticText> <textField evaluationTime="Report"> <reportElement positionType="Float" x="383" y="56" width="147" height="14"/> <textElement textAlignment="Right"> <font size="9" isBold="false"/> </textElement> <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format(new SimpleDateFormat("dd/MM/yyyy").parse($P{invoiceGeneratedDate}))]]></textFieldExpression> </textField> <image> <reportElement x="30" y="0" width="189" height="58"/> <imageExpression class="java.io.File"><![CDATA[$P{entityLogo}]]></imageExpression> </image> <staticText> <reportElement x="458" y="69" width="72" height="13"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <text><![CDATA[3]]></text> </staticText> <staticText> <reportElement x="379" y="68" width="66" height="14"/> <textElement> <font size="9" isBold="false"/> </textElement> <text><![CDATA[Pagina]]></text> </staticText> <textField> <reportElement x="397" y="41" width="133" height="14"/> <textElement textAlignment="Right"> <font size="9"/> </textElement> <textFieldExpression><![CDATA[$P{invlanguage_SCRIPTLET}.getUserName($P{customerId})]]></textFieldExpression> </textField> </band> </pageHeader> <detail> <band height="74"> <subreport isUsingCache="false"> <reportElement isPrintRepeatedValues="false" x="30" y="0" width="498" height="15"/> <subreportParameter name="customerId"> <subreportParameterExpression><![CDATA[$P{customerId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="invoiceId"> <subreportParameterExpression><![CDATA[$P{invoiceId}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "nao_invoice-sub_details.jasper"]]></subreportExpression> </subreport> <subreport isUsingCache="false"> <reportElement positionType="Float" x="30" y="16" width="498" height="10" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true"> <printWhenExpression><![CDATA[new Boolean($P{invlanguage_SCRIPTLET}.checkUsage($P{invoiceId}))]]></printWhenExpression> </reportElement> <subreportParameter name="invoiceId"> <subreportParameterExpression><![CDATA[$P{invoiceId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="userId"> <subreportParameterExpression><![CDATA[$P{userId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="entity_id"> <subreportParameterExpression><![CDATA[$P{entity_id}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "nao_call_details.jasper"]]></subreportExpression> </subreport> <subreport isUsingCache="false"> <reportElement positionType="Float" x="30" y="34" width="498" height="10" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true"> <printWhenExpression><![CDATA[new Boolean($P{invlanguage_SCRIPTLET}.checkUsage($P{invoiceId}))]]></printWhenExpression> </reportElement> <subreportParameter name="invoiceId"> <subreportParameterExpression><![CDATA[$P{invoiceId}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="entity_id"> <subreportParameterExpression><![CDATA[$P{entity_id}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "nao_international.jasper"]]></subreportExpression> </subreport> </band> </detail> <pageFooter> <band height="21"/> </pageFooter> <summary> <band height="32"> <staticText> <reportElement x="30" y="15" width="100" height="15"/> <textElement verticalAlignment="Bottom"> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Totaal (Excl. BTW)]]></text> </staticText> <textField> <reportElement x="452" y="17" width="76" height="13"/> <textElement textAlignment="Right" verticalAlignment="Top"> <font size="9" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$P{totalWithTax}]]></textFieldExpression> </textField> <staticText> <reportElement x="30" y="0" width="100" height="15"/> <textElement verticalAlignment="Bottom"> <font size="10" isBold="true"/> </textElement> <text><![CDATA[Totaal Subaccount ]]></text> </staticText> <textField> <reportElement x="428" y="0" width="100" height="15"/> <textElement textAlignment="Right"> <font size="9" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$P{totalWithTax}]]></textFieldExpression> </textField> </band> </summary></jasperReport>[/code]
  3. I have changed my code and posted please check it.It is a subreport which I am using
  4. I am new to Ireport designs I need to print the values of invoice id, duedateand amountfrom table invoice table. I have used the textfieldexpressions but it is printing as null . I have checked my query manually it is executing fine.But,the probelm is getting when I use in design The parameters are correct and the paramaeter which i use in this design are working for other designs. Please help me how to print the values. My code: <?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="balkatel-esr-sub_srpski" pageWidth="595" pageHeight="70" whenNoDataType="AllSectionsNoDetail" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" > <property name="com.jasperassistant.designer.GridHeight" value="12"/> <property name="com.jasperassistant.designer.GridWidth" value="12"/> <property name="com.jasperassistant.designer.SnapToGrid" value="false"/> <property name="com.jasperassistant.designer.Grid" value="false"/> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <parameter name="customerId" class="java.lang.String"/> <parameter name="invoiceId" class="java.lang.Integer"/> <parameter name="invoiceDueDate" class="java.lang.String"/> <queryString> <![CDATA[select count(*) from invoice where id=$P{invoiceId};]]> </queryString> <field name="amount" class="java.math.BigDecimal"/> <variable name="total" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{amount}]]></variableExpression> </variable> <columnHeader> <band height="34"> <staticText> <reportElement x="12" y="10" width="100" height="16" /> <textElement> <font size="11" isBold="false"/> </textElement> <text><![CDATA[Racun Od]]></text> </staticText> <staticText> <reportElement x="180" y="10" width="70" height="14" /> <textElement> <font size="10" isBold="false"/> </textElement> <text><![CDATA[broj Racuna]]></text> </staticText> <staticText> <reportElement x="394" y="12" width="69" height="14" /> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="10" isBold="false"/> </textElement> <text><![CDATA[iznos ]]></text> </staticText> </band> </columnHeader> <detail> <band height="17"> <textField> <reportElement x="14" y="0" width="150" height="16" /> <textElement verticalAlignment="Middle"> <font size="10"/> </textElement> <textFieldExpression><![CDATA[$P{invoiceId}]]></textFieldExpression> </textField> <textField> <reportElement x="180" y="0" width="83" height="14" /> <textElement verticalAlignment="Middle"> <font size="10"/> </textElement> <textFieldExpression><![CDATA[$P{invoiceDueDate}]]></textFieldExpression> </textField> </band> </detail> <summary> <band height="20"> <textField> <reportElement x="394" y="1" width="129" height="15" forecolor="#000000" /> <textElement textAlignment="Right" verticalAlignment="Bottom"> <font size="10" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$V{total})]]></textFieldExpression> </textField> <staticText> <reportElement x="250" y="1" width="100" height="15" /> <text><![CDATA[ukupno CHF . . . . . . . . . . . . . . . . .]]></text> </staticText> </band> </summary> </jasperReport>
×
×
  • Create New...