<?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="Counter Sale" pageWidth="612" pageHeight="792" columnWidth="552" leftMargin="30" rightMargin="30" topMargin="36" bottomMargin="20"> <property name="ireport.scriptlethandling" value="0"/> <property name="ireport.encoding" value="UTF-8"/> <property name="ireport.zoom" value="1.1000000000000003"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <import value="org.openvpms.component.business.domain.im.party.Party"/> <import value="net.sf.jasperreports.engine.*"/> <import value="java.util.*"/> <import value="org.openvpms.archetype.function.party.PartyFunctions"/> <import value="net.sf.jasperreports.engine.data.*"/> <parameter name="dataSource" class="org.openvpms.report.jasper.IMObjectCollectionDataSource" isForPrompting="false"/> <parameter name="IsEmail" class="java.lang.Boolean" isForPrompting="false"> <parameterDescription><![CDATA[If true, indicates the report is being emailed, to enable different formatting]]></parameterDescription> <defaultValueExpression><![CDATA[Boolean.FALSE]]></defaultValueExpression> </parameter> <field name="author.entity.name" class="java.lang.String"/> <field name="customer.entity.name" class="java.lang.String"/> <field name="customer.entity" class="org.openvpms.component.business.domain.im.party.Party"/> <field name="startTime" class="java.util.Date"/> <field name="id" class="java.lang.Long"/> <field name="tax" class="java.math.BigDecimal"/> <field name="notes" class="java.lang.String"/> <field name="[party:getBillingAddress(.)]" class="java.lang.String"/> <field name="[party:getPartyFullName(.)]" class="java.lang.String"/> <background> <band splitType="Stretch"/> </background> <title> <band height="90" splitType="Stretch"> <staticText> <reportElement x="15" y="30" width="517" height="20"> <printWhenExpression><![CDATA[$P{IsEmail}.equals(Boolean.TRUE)]]></printWhenExpression> </reportElement> <textElement/> <text><![CDATA[This is automatically hidden when printing. See the "Print When Expression" property for more details.]]></text> </staticText> <staticText> <reportElement x="15" y="6" width="517" height="24"> <printWhenExpression><![CDATA[$P{IsEmail}.equals(Boolean.TRUE)]]></printWhenExpression> </reportElement> <textElement/> <text><![CDATA[Email Letterhead. Replace this label with the practice logo and details.]]></text> </staticText> </band> </title> <pageHeader> <band height="113" splitType="Stretch"> <staticText> <reportElement key="staticText-1" x="139" y="4" width="236" height="29"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement textAlignment="Center"> <font size="18" isBold="true" pdfFontName="Helvetica-Bold"/> </textElement> <text><![CDATA[Invoice]]></text> </staticText> <textField pattern="MM/dd/yyyy" isBlankWhenNull="false"> <reportElement key="textField-3" x="403" y="44" width="124" height="16"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="12"/> </textElement> <textFieldExpression class="java.util.Date"><![CDATA[$F{startTime}]]></textFieldExpression> </textField> <staticText> <reportElement key="staticText-2" x="329" y="60" width="81" height="16"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="12"/> </textElement> <text><![CDATA[Transaction No]]></text> </staticText> <staticText> <reportElement key="staticText-3" x="329" y="44" width="81" height="16"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="12"/> </textElement> <text><![CDATA[Date]]></text> </staticText> <textField isBlankWhenNull="false"> <reportElement key="textField-4" x="403" y="59" width="124" height="16"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="12"/> </textElement> <textFieldExpression class="java.lang.Long"><![CDATA[$F{id}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false"> <reportElement key="textField-2" x="62" y="60" width="251" height="45"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{[party:getBillingAddress(.)]}]]></textFieldExpression> </textField> <textField isBlankWhenNull="false"> <reportElement key="textField" x="403" y="76" width="27" height="16"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement textAlignment="Left"> <font size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{PAGE_NUMBER} + " of "]]></textFieldExpression> </textField> <textField evaluationTime="Report" isBlankWhenNull="false"> <reportElement key="textField" x="429" y="76" width="44" height="16"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement textAlignment="Left"> <font size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER} + ""]]></textFieldExpression> </textField> <staticText> <reportElement key="staticText-5" x="329" y="76" width="81" height="16"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="12"/> </textElement> <text><![CDATA[Page]]></text> </staticText> <textField isBlankWhenNull="false"> <reportElement key="textField-7" x="62" y="44" width="251" height="16"/> <textElement> <font size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{[party:getPartyFullName(.)]}]]></textFieldExpression> </textField> </band> </pageHeader> <columnHeader> <band splitType="Stretch"/> </columnHeader> <detail> <band height="50" splitType="Stretch"> <subreport isUsingCache="true"> <reportElement key="subreport-1" x="2" y="9" width="530" height="31"/> <dataSourceExpression><![CDATA[$P{dataSource}.getDataSource("items", new String[]{"target.startTime"})]]></dataSourceExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA["Counter Sale Items.jrxml"]]></subreportExpression> </subreport> </band> </detail> <columnFooter> <band splitType="Stretch"/> </columnFooter> <pageFooter> <band splitType="Stretch"/> </pageFooter> <summary> <band height="110" splitType="Stretch"> <staticText> <reportElement key="staticText-4" x="216" y="21" width="151" height="17"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="12"/> </textElement> <text><![CDATA[This Invoice is inclusive of]]></text> </staticText> <textField pattern="¤ #,##0.00" isBlankWhenNull="false"> <reportElement key="textField-6" x="367" y="21" width="53" height="17"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="12" isBold="true" pdfFontName="Helvetica-Bold"/> </textElement> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{tax}]]></textFieldExpression> </textField> <staticText> <reportElement key="staticText-6" x="169" y="35" width="0" height="0"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement/> <text><![CDATA[Static text]]></text> </staticText> <staticText> <reportElement key="staticText-7" x="420" y="21" width="74" height="17"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="12"/> </textElement> <text><![CDATA[State Tax]]></text> </staticText> </band> </summary> </jasperReport>