<?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="TOA_R018" 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="UDF1" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="UDF2" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="UDF3" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="UDF5" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="UDF4" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="COMPANY" isForPrompting="false" class="java.lang.String"> <parameterDescription><![CDATA[component]]></parameterDescription> <defaultValueExpression ><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="LANG" isForPrompting="true" class="java.lang.String"> <defaultValueExpression ><![CDATA["THA"]]></defaultValueExpression> </parameter> <field name="memployee__employeeid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__EMPLOYEEID]]></fieldDescription> </field> <field name="memployee__companyid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__COMPANYID]]></fieldDescription> </field> <field name="memployee__emp_prefix" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__EMP_PREFIX]]></fieldDescription> </field> <field name="memployee__fname" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__FNAME]]></fieldDescription> </field> <field name="memployee__lname" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__LNAME]]></fieldDescription> </field> <field name="memployee__efname" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__EFNAME]]></fieldDescription> </field> <field name="memployee__elname" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__ELNAME]]></fieldDescription> </field> <field name="memployee__emp_position" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__EMP_POSITION]]></fieldDescription> </field> <field name="memployee__salary" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__SALARY]]></fieldDescription> </field> <field name="memployee__branch" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__BRANCH]]></fieldDescription> </field> <field name="memployee__bu2" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__BU2]]></fieldDescription> </field> <field name="memployee__startdate" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__STARTDATE]]></fieldDescription> </field> <field name="memployee__endworkdate" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__ENDWORKDATE]]></fieldDescription> </field> <field name="mprefix__prefixid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MPREFIX__PREFIXID]]></fieldDescription> </field> <field name="mprefix__edesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MPREFIX__EDESC]]></fieldDescription> </field> <field name="mprefix__tdesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MPREFIX__TDESC]]></fieldDescription> </field> <field name="mposition__positionid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MPOSITION__POSITIONID]]></fieldDescription> </field> <field name="mposition__companyid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MPOSITION__COMPANYID]]></fieldDescription> </field> <field name="mposition__tdesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MPOSITION__TDESC]]></fieldDescription> </field> <field name="mposition__edesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MPOSITION__EDESC]]></fieldDescription> </field> <field name="mbu2__bu2id" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MBU2__BU2ID]]></fieldDescription> </field> <field name="mbu2__companyid" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MBU2__COMPANYID]]></fieldDescription> </field> <field name="mbu2__tdesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MBU2__TDESC]]></fieldDescription> </field> <field name="mbu2__edesc" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MBU2__EDESC]]></fieldDescription> </field> <field name="memployee__fullname" class="java.lang.String"> <fieldDescription><![CDATA[Field returned by MEMPLOYEE__FULLNAME]]></fieldDescription> </field> <variable name="SALARY_STR" class="java.lang.String" resetType="None" calculation="Nothing"> <variableExpression><![CDATA[(Double.parseDouble(new com.csc.library.utilities.CheckNull().chkNullString( $F{memployee__salary},"0"))>0)? (new com.csc.library.utilities.CurrencyToThai().getStringAvancedDesc(Double.parseDouble(new com.csc.library.utilities.CheckNull().chkNullString( $F{memployee__salary},"0")), "####0.00")):("ศูนย์บาทถ้วน")]]></variableExpression> </variable> <variable name="SALARY" class="java.lang.String" resetType="None" calculation="Nothing"> <variableExpression><![CDATA[String.valueOf(new DecimalFormat("#,##0.00").format( Double.parseDouble(new com.csc.library.utilities.CheckNull().chkNullString($F{memployee__salary},"0.00"))))]]></variableExpression> </variable> <group name="emp" isStartNewPage="true" isReprintHeaderOnEachPage="true" > <groupExpression><![CDATA[ $F{memployee__employeeid}]]></groupExpression> <groupHeader> <band height="62" isSplitAllowed="true" > <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="4" y="8" width="522" height="50" forecolor="#000000" backcolor="#FFFFFF" key="textField" isPrintWhenDetailOverflows="true"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[" หนังสือฉบับนี้ให้ไว้เพื่อรับรองว่า " +$F{memployee__fullname} +" เลขที่ประจำตัว " +$F{memployee__employeeid} +" ได้ปฏิบัติงานกับ " +$P{COMPANY} +" ตั้งแต่วันที่ " +new com.csc.library.report.ReportUDF().getFullLongDate("THA", $F{memployee__startdate}) +" และปัจจุบันยังคงปฏิบัติงานอยู่ในตำแหน่ง "+$F{mposition__tdesc} +" สังกัดฝ่าย "+$F{mbu2__tdesc} +" โดยมีอัตราเงินเดือน ๆ ละ " +$V{SALARY} +" บาท ( " +$V{SALARY_STR} +" )"]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="180" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="278" y="111" width="199" height="18" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["( " +$P{UDF4} +" )"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="278" y="133" width="200" height="18" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{UDF5}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="303" y="21" width="198" height="26" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["ให้ไว้ ณ วันที่ "+new com.csc.library.report.ReportUDF().getCurrentdate("THA")]]></textFieldExpression> </textField> </band> </groupFooter> </group> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="0" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="182" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="303" y="90" width="231" height="26" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle" lineSpacing="Single"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{UDF2}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="135" y="145" width="259" height="30" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single"> <font fontName="Cordia New" pdfFontName="CORDIAB.TTF" size="18" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["หนังสือรับรองเงินเดือน/รับรองการทำงาน"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="0" y="90" width="195" height="26" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle" lineSpacing="Single"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["ที่ "+$P{UDF1}]]></textFieldExpression> </textField> </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="0" isSplitAllowed="false" > </band> </detail> <columnFooter> <band height="0" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="96" isSplitAllowed="true" > <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="5" y="7" width="243" height="18" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle" lineSpacing="Single"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{UDF2}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Opaque" x="5" y="26" width="243" height="18" forecolor="#000000" backcolor="#FFFFFF" key="textField"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Middle" lineSpacing="Single"> <font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Identity-H" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{UDF3}]]></textFieldExpression> </textField> </band> </pageFooter> <summary> <band height="0" isSplitAllowed="true" > </band> </summary> </jasperReport>