<?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="ERR1506" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <parameter name="REPORTHEADER" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="list" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[label]]></parameterDescription> <defaultValueExpression ><![CDATA["LIST"]]></defaultValueExpression> </parameter> <parameter name="amount__T3" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[label]]></parameterDescription> <defaultValueExpression ><![CDATA["AMOUNT"]]></defaultValueExpression> </parameter> <parameter name="unit__T1" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[label]]></parameterDescription> <defaultValueExpression ><![CDATA["UNIT"]]></defaultValueExpression> </parameter> <parameter name="total_amount" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[label]]></parameterDescription> <defaultValueExpression ><![CDATA["TOTAL AMOUNT"]]></defaultValueExpression> </parameter> <parameter name="overall" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[label]]></parameterDescription> <defaultValueExpression ><![CDATA["OVERALL"]]></defaultValueExpression> </parameter> <parameter name="amount__T4" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[label]]></parameterDescription> <defaultValueExpression ><![CDATA["AMOUNT"]]></defaultValueExpression> </parameter> <parameter name="total" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[label]]></parameterDescription> <defaultValueExpression ><![CDATA["TOTAL"]]></defaultValueExpression> </parameter> <parameter name="MONTH1" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="MONTH2" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="YEAR" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component ]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="LANG" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[lang]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <field name="er_ht_drug_buy_detail__codeid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_buy_detail__codeid]]></fieldDescription> </field> <field name="er_ht_drug_buy_detail__buy_date" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_buy_detail__buy_date]]></fieldDescription> </field> <field name="er_ht_drug_buy_detail__drugid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_buy_detail__drugid]]></fieldDescription> </field> <field name="er_ht_drug_buy_detail__qty" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_buy_detail__qty]]></fieldDescription> </field> <field name="er_ht_drug_buy_detail__price" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_buy_detail__price]]></fieldDescription> </field> <field name="er_ht_drug__drugid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug__drugid]]></fieldDescription> </field> <field name="er_ht_drug__typeid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug__typeid]]></fieldDescription> </field> <field name="er_ht_drug__unitid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug__unitid]]></fieldDescription> </field> <field name="er_ht_drug__tdesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug__tdesc]]></fieldDescription> </field> <field name="er_ht_drug__edesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug__edesc]]></fieldDescription> </field> <field name="er_ht_drug__price" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug__price]]></fieldDescription> </field> <field name="er_ht_drug_unit__unitid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_unit__unitid]]></fieldDescription> </field> <field name="er_ht_drug_unit__tdesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_unit__tdesc]]></fieldDescription> </field> <field name="er_ht_drug_unit__edesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_unit__edesc]]></fieldDescription> </field> <field name="er_ht_drug_type__typeid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_type__typeid]]></fieldDescription> </field> <field name="er_ht_drug_type__tdesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_type__tdesc]]></fieldDescription> </field> <field name="er_ht_drug_type__edesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by er_ht_drug_type__edesc]]></fieldDescription> </field> <variable name="inc_row" class="java.lang.Integer" resetType="Group" resetGroup="drug_type" calculation="Nothing"> <variableExpression><![CDATA[new Integer($V{inc_row}.intValue()+1)]]></variableExpression> <initialValueExpression><![CDATA[new Integer(0)]]></initialValueExpression> </variable> <variable name="sum_qty" class="java.lang.Integer" resetType="Group" resetGroup="drug" calculation="Sum"> <variableExpression><![CDATA[new Integer(new com.csc.library.utilities.CheckNull().chkNullString($F{er_ht_drug_buy_detail__qty},"0")) ]]></variableExpression> <initialValueExpression><![CDATA[new Integer(0)]]></initialValueExpression> </variable> <variable name="sum_money" class="java.lang.Double" resetType="Group" resetGroup="drug" calculation="Sum"> <variableExpression><![CDATA[new Double(new com.csc.library.utilities.CheckNull().chkNullString($F{er_ht_drug_buy_detail__price},"0")) ]]></variableExpression> <initialValueExpression><![CDATA[new Double(0)]]></initialValueExpression> </variable> <variable name="sum_totalmoney" class="java.lang.Double" resetType="Group" resetGroup="drug_type" calculation="Sum"> <variableExpression><![CDATA[new Double(new com.csc.library.utilities.CheckNull().chkNullString($F{er_ht_drug_buy_detail__price},"0")) ]]></variableExpression> <initialValueExpression><![CDATA[new Double(0)]]></initialValueExpression> </variable> <variable name="grand_sum_money" class="java.lang.Double" resetType="Report" calculation="Sum"> <variableExpression><![CDATA[new Double(new com.csc.library.utilities.CheckNull().chkNullString($F{er_ht_drug_buy_detail__price},"0")) ]]></variableExpression> <initialValueExpression><![CDATA[new Double(0)]]></initialValueExpression> </variable> <variable name="inc_row_1" class="java.lang.Integer" resetType="Group" resetGroup="drug_type" calculation="DistinctCount"> <variableExpression><![CDATA[$F{er_ht_drug__drugid}]]></variableExpression> <initialValueExpression><![CDATA[new Integer(0)]]></initialValueExpression> </variable> <group name="drug_type" > <groupExpression><![CDATA[$F{er_ht_drug__typeid}]]></groupExpression> <groupHeader> <band height="19" isSplitAllowed="true" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="0" y="0" width="534" height="19" backcolor="#CCCCCC" key="textField-10" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="2" rightBorder="Thin" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIAB.TTF" size="14" isBold="true" isItalic="false" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{er_ht_drug_type__tdesc}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="19" isSplitAllowed="true" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="0" y="0" width="418" height="19" backcolor="#CCCCCC" key="textField-15" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" rightPadding="2" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{total}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="418" y="0" width="116" height="19" backcolor="#CCCCCC" key="textField-16" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" rightPadding="2" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.Double"><![CDATA[$V{sum_totalmoney}]]></textFieldExpression> </textField> </band> </groupFooter> </group> <group name="drug" > <groupExpression><![CDATA[$F{er_ht_drug_buy_detail__drugid}]]></groupExpression> <groupHeader> <band height="0" isSplitAllowed="true" > </band> </groupHeader> <groupFooter> <band height="19" isSplitAllowed="true" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="0" width="261" height="19" key="textField-11" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$V{inc_row_1}+". "+$F{er_ht_drug__tdesc}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="#,###" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="261" y="0" width="92" height="19" key="textField-12" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" rightPadding="2" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{sum_qty}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="353" y="0" width="65" height="19" key="textField-13" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="2" rightBorder="Thin" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{er_ht_drug_unit__tdesc}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="418" y="0" width="116" height="19" key="textField-14" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" rightPadding="2" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.Double"><![CDATA[$V{sum_money}]]></textFieldExpression> </textField> </band> </groupFooter> </group> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="0" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="64" isSplitAllowed="true" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="0" width="535" height="21" key="textField-1" isPrintWhenDetailOverflows="true"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIAB.TTF" size="16" isBold="true" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{REPORTHEADER}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="0" y="45" width="261" height="19" backcolor="#CCCCCC" key="textField-2" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIAB.TTF" size="14" isBold="true" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{list}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="261" y="45" width="92" height="19" backcolor="#CCCCCC" key="textField-3" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIAB.TTF" size="14" isBold="true" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{amount__T3}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="353" y="45" width="65" height="19" backcolor="#CCCCCC" key="textField-4" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIAB.TTF" size="14" isBold="true" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{unit__T1}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="418" y="45" width="116" height="19" backcolor="#CCCCCC" key="textField-5" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIAB.TTF" size="14" isBold="true" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{amount__T4}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="21" width="535" height="19" key="textField-19" isPrintWhenDetailOverflows="true"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="16" isBold="false" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[(!$P{MONTH1}.equals(""))? new com.csc.library.report.ReportUDF().getSystemCode("MONTHCODE",$P{LANG},$P{MONTH1})+ " - "+ new com.csc.library.report.ReportUDF().getSystemCode("MONTHCODE",$P{LANG},$P{MONTH2})+ " "+$P{YEAR}:""]]></textFieldExpression> </textField> </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="0" isSplitAllowed="true" > </band> </detail> <columnFooter> <band height="0" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="0" isSplitAllowed="true" > </band> </pageFooter> <summary> <band height="19" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="0" y="0" width="418" height="19" backcolor="#CCCCCC" key="textField-17" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{overall}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="418" y="0" width="116" height="19" backcolor="#CCCCCC" key="textField-18" isPrintWhenDetailOverflows="true"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" pdfEncoding ="Identity-H"/> </textElement> <textFieldExpression class="java.lang.Double"><![CDATA[$V{grand_sum_money}]]></textFieldExpression> </textField> </band> </summary> </jasperReport>