当我在Jasper Reports中使用JRBeanCollectionDataSource传递列表时,页面变空

时间:2014-03-12 11:31:42

标签: jasper-reports ireport

我想使用JRBeanCollectionDataSource传递列表并显示在dataset1中。在传递list1之前报告工作正常。但是当我将list1传递给报告页面变空时。我不知道它是否是数据源中的问题.... / p>

      public void generateReport() 
    {
Statement stmt = null;
ResultSet resultset = null;
ResultSet resultset1=null;
ResultSet resultset2=null;
Connection con=null;
String fromdate="2013-01-01";
String todate="2013-01-31";
int unitId=1;
String driver="com.mysql.jdbc.Driver";
String connection="jdbc:mysql://localhost:3306/compliance?user=root&password=root";
List<Object> shornamelist=new ArrayList<Object>();
try {
    String selectstatement="CALL P_Select_Salary ('"+fromdate+"', '"+todate+"','"+unitId+"', 'Salary_Summary')";
    Class.forName(driver);
    con=DriverManager.getConnection(connection);
    stmt=con.createStatement();
    resultset=stmt.executeQuery(selectstatement);

    while(resultset.next())
    {
        String emloyeeid=resultset.getString("emp_id");
        logger.info("employee id"+emloyeeid);


        try {
            String selectstatement1="CALL P_Select_Salary ('2013-01-01', '2013-01-31', 1, 'Salary_OA')";
            Class.forName(driver);
            con=DriverManager.getConnection(connection);
            stmt=con.createStatement();
            resultset1=stmt.executeQuery(selectstatement1);
            while(resultset1.next())
            {
                if(emloyeeid.equals(resultset1.getString("Emp_id")))
                {
                String shortname=resultset1.getString("alw_short_name");
                logger.info("alw_short_name"+shortname);
                shornamelist.add(shortname);
                }
                else
                {
                    logger.info("no values");
                }
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    JRResultSetDataSource resultsetdatasource=new JRResultSetDataSource(resultset);
    JRBeanCollectionDataSource list1=new JRBeanCollectionDataSource(shornamelist);

    String selectstatement2="SELECT salary,address FROM testing_two";
    Class.forName(driver);
    con=DriverManager.getConnection(connection);
    stmt=con.createStatement();
    resultset2=stmt.executeQuery(selectstatement2);

    Map<String, Object> hashmap=new HashMap<String, Object>();
    hashmap.put("companyName",companyName);
    hashmap.put("branchName", branchName);
    hashmap.put("list1",list1);
    hashmap.put("list2",new JRResultSetDataSource(resultset2));
    String realpath=FacesContext.getCurrentInstance().getExternalContext().getRealPath("common/reports/wageslip.jasper");
    jasperprint=JasperFillManager.fillReport(realpath,hashmap,resultsetdatasource);
    HttpServletResponse httpservlet=(HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
    httpservlet.addHeader("Content-disposition", "attachment;filename=wageslip.pdf");
    ServletOutputStream servletout=httpservlet.getOutputStream();
    JasperExportManager.exportReportToPdfStream(jasperprint, servletout);
    FacesContext.getCurrentInstance().responseComplete();

}
catch(net.sf.jasperreports.engine.JRException JRexception)
{
    logger.info("JRException Exception"+JRexception.getMessage());
    JsfUtil.addErrorMessage("No Datas between FromDate to ToDate");
}
catch (Exception e) {
    e.printStackTrace();
}
finally
{
close(stmt);
close(resultset);
close(resultset1);
close(resultset2);
close(con);
}
  }

.jrxml文件:

     <?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="wageslip" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isSummaryWithPageHeaderAndFooter="true" uuid="7f42ca32-d9f0-4e34-979b-435c75d0a1a5">
<subDataset name="dataset2" uuid="5c39d002-3a19-46ab-b14d-4a153c493982">
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="salary" class="java.lang.Double"/>
    <variable name="variable1" class="java.lang.Double" resetType="None" calculation="Sum">
        <variableExpression><![CDATA[$F{salary}]]></variableExpression>
    </variable>
</subDataset>
<subDataset name="dataset3" uuid="354e1822-d450-4eeb-a65f-19e181f57642">
    <queryString language="plsql">
        <![CDATA[]]>
    </queryString>
    <field name="alw_short_name" class="java.lang.String">
        <fieldDescription><![CDATA[]]></fieldDescription>
    </field>
</subDataset>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
    <defaultValueExpression><![CDATA["C:\\Users\\DS\\Desktop\\backup reports\\"]]></defaultValueExpression>
</parameter>
<parameter name="fromdate" class="java.util.Date">
    <defaultValueExpression><![CDATA[$F{FromDate}]]></defaultValueExpression>
</parameter>
<parameter name="todate" class="java.util.Date">
    <defaultValueExpression><![CDATA[$F{ToDate}]]></defaultValueExpression>
</parameter>
<parameter name="unitId" class="java.lang.Integer">
    <defaultValueExpression><![CDATA[$F{unit_id}]]></defaultValueExpression>
</parameter>
<parameter name="companyName" class="java.lang.String">
    <parameterDescription><![CDATA[]]></parameterDescription>
    <defaultValueExpression><![CDATA[$P{companyName}]]></defaultValueExpression>
</parameter>
<parameter name="branchName" class="java.lang.String">
    <defaultValueExpression><![CDATA[$P{branchName}]]></defaultValueExpression>
</parameter>
<parameter name="list2" class="net.sf.jasperreports.engine.JRResultSetDataSource"/>
<parameter name="list1" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<queryString language="plsql">
    <![CDATA[CALL P_Select_Salary ($P{fromdate},$P{todate},$P{unitId},'Salary_Summary')]]>
</queryString>
<field name="unit_id" class="java.lang.Integer"/>
<field name="Category_Code" class="java.lang.Integer"/>
<field name="FromDate" class="java.sql.Date"/>
<field name="ToDate" class="java.sql.Date"/>
<field name="emp_id" class="java.lang.String"/>
<field name="Emp_Class" class="java.lang.String"/>
<field name="Gender" class="java.lang.String"/>
<field name="Work_Hrs" class="java.lang.String"/>
<field name="AB_Hrs" class="java.lang.String"/>
<field name="LOP_Hrs" class="java.lang.String"/>
<field name="Paid_Leave_Hrs" class="java.lang.String"/>
<field name="OT_Hrs" class="java.lang.String"/>
<field name="WO" class="java.lang.String"/>
<field name="NFH" class="java.lang.String"/>
<field name="CO_WO" class="java.lang.String"/>
<field name="CO_NFH" class="java.lang.String"/>
<field name="Pay_NFH" class="java.lang.String"/>
<field name="BASIC_F" class="java.lang.String"/>
<field name="DA_F" class="java.lang.String"/>
<field name="SA_F" class="java.lang.String"/>
<field name="Basic_E" class="java.lang.String"/>
<field name="DA_E" class="java.lang.String"/>
<field name="SA_E" class="java.lang.String"/>
<field name="DY_Alw_E" class="java.lang.String"/>
<field name="NFH_E" class="java.lang.String"/>
<field name="Paid_Leave_E" class="java.lang.String"/>
<field name="LOP_Amt" class="java.lang.String"/>
<field name="OT_Amt" class="java.lang.String"/>
<field name="Gross_Amt" class="java.lang.String"/>
<field name="ESI_F" class="java.lang.String"/>
<field name="ESI_Amt" class="java.lang.String"/>
<field name="Emp_ESI" class="java.lang.String"/>
<field name="Emr_ESI" class="java.lang.String"/>
<field name="EPF_F" class="java.lang.String"/>
<field name="EPF_Amt" class="java.lang.String"/>
<field name="PF" class="java.lang.String"/>
<field name="EPS" class="java.lang.String"/>
<field name="EPF" class="java.lang.String"/>
<field name="Advance_Loan" class="java.lang.String"/>
<field name="Fine" class="java.lang.String"/>
<field name="Damage_Loss" class="java.lang.String"/>
<field name="Other_Deduct" class="java.lang.String"/>
<field name="Net_Salary" class="java.lang.String"/>
<field name="Accum_unpaid_Amt" class="java.lang.String"/>
<field name="Paid_Date" class="java.lang.String"/>
<field name="Paid_Amt" class="java.lang.String"/>
<title>
    <band height="35" splitType="Stretch"/>
</title>
<pageHeader>
    <band height="51" splitType="Stretch">
        <staticText>
            <reportElement x="335" y="35" width="138" height="16" uuid="b768112a-e9b1-4812-8908-c5f523a3250e"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[FORM – T [See Rule 11 (6)]]]></text>
        </staticText>
        <textField pattern="dd/MM/yyyy">
            <reportElement x="493" y="15" width="62" height="20" uuid="23f43174-664d-47bc-b6f6-e005841ef754"/>
            <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
        </textField>
        <staticText>
            <reportElement x="11" y="15" width="81" height="15" uuid="4fefae51-0909-4253-aa6f-25df2754167c"/>
            <text><![CDATA[Company Name:]]></text>
        </staticText>
        <staticText>
            <reportElement x="12" y="30" width="80" height="20" uuid="dbfa65bb-53aa-48b9-8c6b-935c18d57c47"/>
            <textElement verticalAlignment="Middle"/>
            <text><![CDATA[Branch Name   :]]></text>
        </staticText>
        <staticText>
            <reportElement x="212" y="31" width="123" height="20" uuid="3caab647-ca4b-4570-84a2-6c6e5ef40ce7"/>
            <textElement textAlignment="Center">
                <font size="12" isBold="true"/>
            </textElement>
            <text><![CDATA[WAGE SLIP/LEAVE CARD]]></text>
        </staticText>
        <staticText>
            <reportElement x="115" y="0" width="332" height="14" uuid="0b89931b-3f88-4991-a618-a5b188004459"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[The Tamil Nadu Shops and Establishments Rules, 1948]]></text>
        </staticText>
        <textField>
            <reportElement x="92" y="14" width="100" height="16" uuid="2a7da3bc-b3bc-4a0e-b3ef-b9c17c3aa989"/>
            <textFieldExpression><![CDATA[$P{companyName}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="92" y="30" width="100" height="20" uuid="f96eeb78-f13a-47c5-9e28-51993a1d5166"/>
            <textFieldExpression><![CDATA[$P{branchName}]]></textFieldExpression>
        </textField>
    </band>
</pageHeader>
<detail>
    <band height="660" splitType="Stretch">
        <rectangle>
            <reportElement x="11" y="0" width="530" height="656" uuid="53ea393b-af37-4101-9ad8-e52c61a76c44"/>
        </rectangle>
        <line>
            <reportElement x="11" y="29" width="530" height="1" uuid="9286724d-5a54-4a6f-b12d-d88f3aef994e"/>
        </line>
        <line>
            <reportElement x="11" y="59" width="530" height="1" uuid="3017c752-089e-4878-8069-e76815133552"/>
        </line>
        <line>
            <reportElement x="11" y="89" width="530" height="1" uuid="a075a71b-85d0-40c1-aa35-525e090a8ad9"/>
        </line>
        <line>
            <reportElement x="275" y="0" width="1" height="511" uuid="6f1f44e4-2ad1-4c27-a837-741a89e709db"/>
        </line>
        <line>
            <reportElement x="51" y="0" width="1" height="656" uuid="f93106ec-286b-42c2-8c40-c5afdf23c536"/>
        </line>
        <staticText>
            <reportElement x="11" y="7" width="40" height="20" uuid="0f68b390-b1b0-45b3-a87d-2e324cb0882f"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[1]]></text>
        </staticText>
        <staticText>
            <reportElement x="11" y="40" width="40" height="20" uuid="a9f77ae4-1394-42f8-ad56-adb7efa1b653"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[2]]></text>
        </staticText>
        <staticText>
            <reportElement x="11" y="68" width="40" height="21" uuid="65e442ad-5d9a-4313-8a46-16cac946d808"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[3]]></text>
        </staticText>
        <staticText>
            <reportElement x="64" y="8" width="191" height="20" uuid="00ad0793-12d4-4b9f-8fa6-06f073ad6bf4"/>
            <text><![CDATA[Name and Address of the Establishment:]]></text>
        </staticText>
        <staticText>
            <reportElement x="64" y="40" width="191" height="20" uuid="ea7615b6-f664-4919-b5fd-677d2fc48d8f"/>
            <text><![CDATA[Name of the Person Employed:]]></text>
        </staticText>
        <staticText>
            <reportElement x="64" y="67" width="191" height="20" uuid="ba10a19e-2b4e-409b-b24d-2810118f5551"/>
            <textElement verticalAlignment="Middle"/>
            <text><![CDATA[Father’s or Husband’s Name:]]></text>
        </staticText>
        <line>
            <reportElement x="11" y="119" width="530" height="1" uuid="b2d84b0c-2f1d-416a-89b1-611002391570"/>
        </line>
        <staticText>
            <reportElement x="11" y="97" width="40" height="20" uuid="8f21469c-000e-49a0-95e1-8a54d5c5a92d"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[4]]></text>
        </staticText>
        <staticText>
            <reportElement x="64" y="99" width="191" height="20" uuid="37d905b1-c9a1-4e07-b087-e34adf73cc0c"/>
            <text><![CDATA[Designation:]]></text>
        </staticText>
        <line>
            <reportElement x="11" y="149" width="530" height="1" uuid="0c140452-32b8-493e-8a29-d3c7de92711a"/>
        </line>
        <staticText>
            <reportElement x="11" y="127" width="40" height="20" uuid="cfa980de-a848-4759-a28d-aa76aebae7ec"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[5]]></text>
        </staticText>
        <staticText>
            <reportElement x="65" y="130" width="190" height="20" uuid="c767c2b9-4c62-4d3d-bb66-5fb6841f7f96"/>
            <text><![CDATA[Date of Entry into Service:]]></text>
        </staticText>
        <line>
            <reportElement x="11" y="179" width="530" height="1" uuid="b8c03f8e-6c07-43cb-84a5-5917d6c33018"/>
        </line>
        <staticText>
            <reportElement x="11" y="160" width="40" height="20" uuid="26d9deac-d028-499c-8bf6-d73e215c5a90"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[6]]></text>
        </staticText>
        <staticText>
            <reportElement x="65" y="159" width="64" height="20" uuid="603b042e-d8e5-455a-919b-10e2b0ef8108"/>
            <text><![CDATA[Wage Period:]]></text>
        </staticText>
        <staticText>
            <reportElement x="140" y="160" width="28" height="20" uuid="7418d358-9aff-485d-842b-dd05b2c6c5d3"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[From]]></text>
        </staticText>
        <staticText>
            <reportElement x="236" y="161" width="38" height="20" uuid="8a2a7707-e63c-4d42-bfc8-dce992f21b89"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[To]]></text>
        </staticText>
        <staticText>
            <reportElement x="335" y="159" width="138" height="22" uuid="d4344515-54ea-4260-9296-f4bc533eef45"/>
            <text><![CDATA[No of work days in the period]]></text>
        </staticText>
        <line>
            <reportElement x="11" y="208" width="530" height="1" uuid="83692339-61c7-4634-b7ae-582524ba874b"/>
        </line>
        <staticText>
            <reportElement x="12" y="189" width="38" height="20" uuid="2d4986ef-f871-4705-b2e3-904b12eef57b"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[7]]></text>
        </staticText>
        <staticText>
            <reportElement x="64" y="189" width="75" height="20" uuid="1a4303b5-3ff8-46e7-aeb0-a988b18bb7d7"/>
            <text><![CDATA[Wage Earned:]]></text>
        </staticText>
        <staticText>
            <reportElement x="291" y="181" width="85" height="27" uuid="ab981288-a8d1-4806-ab30-833cea423116"/>
            <textElement verticalAlignment="Middle"/>
            <text><![CDATA[Deductions:]]></text>
        </staticText>
        <line>
            <reportElement x="13" y="433" width="529" height="1" uuid="066af81f-0d16-462c-aa33-3df2c9cb2e65"/>
        </line>
        <line>
            <reportElement x="13" y="458" width="529" height="1" uuid="7ea50a5c-a9b5-4c28-b364-db33d2247caf"/>
        </line>
        <staticText>
            <reportElement x="65" y="435" width="75" height="22" uuid="3ee86638-65de-4fa7-b50c-06e992be50ee"/>
            <textElement verticalAlignment="Middle"/>
            <text><![CDATA[Leave Type:]]></text>
        </staticText>
        <line>
            <reportElement x="227" y="408" width="1" height="190" uuid="80afe587-fa60-46c1-be70-1c04a65b6355"/>
        </line>
        <line>
            <reportElement x="463" y="209" width="1" height="198" uuid="b20f2b15-89b1-4cef-bd3c-9fcd7fb01277"/>
        </line>
        <staticText>
            <reportElement x="227" y="433" width="47" height="24" uuid="ec7a1c42-9e81-43fc-ad36-a8a45ac4ca57"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[CL-4.0]]></text>
        </staticText>
        <line>
            <reportElement x="13" y="485" width="529" height="1" uuid="7ca5bdff-4490-4913-a06c-cb81dd65a504"/>
        </line>
        <line>
            <reportElement x="13" y="511" width="529" height="1" uuid="0f9e66ae-47b9-4667-9ad1-9b4ff135f626"/>
        </line>
        <line>
            <reportElement x="52" y="538" width="490" height="1" uuid="3ab199b5-5ce0-4eb6-ae31-0200bf4f766b"/>
        </line>
        <line>
            <reportElement x="13" y="576" width="529" height="1" uuid="21f3ff54-cf3e-4ee6-848c-9fb30ee7d5dd"/>
        </line>
        <line>
            <reportElement x="13" y="597" width="529" height="1" uuid="a8c37e58-8805-4b52-b9e9-edf8616864d2"/>
        </line>
        <line>
            <reportElement x="317" y="434" width="1" height="163" uuid="ca131a7c-f62b-450c-b6d9-2cdad40b8026"/>
        </line>
        <line>
            <reportElement x="364" y="433" width="1" height="143" uuid="6c1bad5d-b2b2-4fd6-a78f-0f0d9537e7a0"/>
        </line>
        <line>
            <reportElement x="410" y="408" width="1" height="103" uuid="4165321f-fb47-4a96-8da4-4dd9db5449b4"/>
        </line>
        <line>
            <reportElement x="463" y="433" width="1" height="164" uuid="fbd60058-55ac-4207-96cc-6ba33c345b38"/>
        </line>
        <line>
            <reportElement x="501" y="433" width="1" height="78" uuid="3fa51850-c23d-4e30-bb0a-b5adb9ab5f45"/>
        </line>
        <line>
            <reportElement x="13" y="407" width="529" height="1" uuid="1ae6e7ef-9063-42c3-a8e8-5ce3063ffcb2"/>
        </line>
        <staticText>
            <reportElement x="66" y="408" width="75" height="25" uuid="f7c990ce-97b6-4aa2-ab79-e9d5ca01054e"/>
            <textElement verticalAlignment="Middle"/>
            <text><![CDATA[Gross Wages]]></text>
        </staticText>
        <staticText>
            <reportElement x="317" y="408" width="88" height="25" uuid="318f3e10-1ac3-424d-aa82-594eba6747b8"/>
            <textElement verticalAlignment="Middle"/>
            <text><![CDATA[Net Amount Paid]]></text>
        </staticText>
        <staticText>
            <reportElement x="502" y="435" width="40" height="23" uuid="5a906839-2b39-46ae-97cb-20e4744ae9c7"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[OPL]]></text>
        </staticText>
        <staticText>
            <reportElement x="464" y="435" width="36" height="23" uuid="f57ad17c-a4af-4a28-9b5c-669459fad204"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[HPL]]></text>
        </staticText>
        <staticText>
            <reportElement x="411" y="435" width="51" height="22" uuid="891ad2e3-c8ae-4686-8397-60bc8f9d2680"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[CO]]></text>
        </staticText>
        <staticText>
            <reportElement x="365" y="435" width="45" height="23" uuid="d2117139-41a8-4531-966f-c4aa9128d3ad"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[ML]]></text>
        </staticText>
        <staticText>
            <reportElement x="318" y="435" width="45" height="22" uuid="93fb4f4f-186d-470b-a147-013b31c3d407"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[EL]]></text>
        </staticText>
        <staticText>
            <reportElement x="277" y="433" width="39" height="24" uuid="929c20f1-f8a0-4761-bac3-530d0a3d4aba"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[SL]]></text>
        </staticText>
        <staticText>
            <reportElement x="65" y="467" width="161" height="18" uuid="76bbf361-1368-48c6-93ef-47b299ea6723"/>
            <text><![CDATA[Leave Availed  during the month:]]></text>
        </staticText>
        <staticText>
            <reportElement x="66" y="492" width="84" height="20" uuid="79793a90-3b15-4c36-ba98-0858e3ce4a81"/>
            <text><![CDATA[Leave at Credit:]]></text>
        </staticText>
        <staticText>
            <reportElement x="66" y="518" width="103" height="20" uuid="58144e30-21d0-4230-8113-43ecd97e06e7"/>
            <text><![CDATA[No of days Present]]></text>
        </staticText>
        <staticText>
            <reportElement x="65" y="545" width="104" height="31" uuid="60bd0c16-5d5e-43d8-9122-b843af835126"/>
            <text><![CDATA[National /Festival /Other Paid Holidays]]></text>
        </staticText>
        <staticText>
            <reportElement x="237" y="518" width="67" height="19" uuid="48c24bde-8726-4118-a700-8b99680d3b08"/>
            <textElement verticalAlignment="Middle"/>
            <text><![CDATA[Absent Days]]></text>
        </staticText>
        <staticText>
            <reportElement x="237" y="543" width="67" height="33" uuid="c02051f8-4364-40b6-a0d8-348cd8c841a7"/>
            <textElement verticalAlignment="Middle"/>
            <text><![CDATA[Weekly Off]]></text>
        </staticText>
        <staticText>
            <reportElement x="378" y="518" width="70" height="19" uuid="8ddfab9d-63ad-454e-a31c-1d36e540ce99"/>
            <text><![CDATA[Loss of Pay Leaves]]></text>
        </staticText>
        <staticText>
            <reportElement x="378" y="543" width="78" height="33" uuid="66c131fd-6d62-4b09-ac2e-a53f60223ced"/>
            <text><![CDATA[Total Overtime hours]]></text>
        </staticText>
        <staticText>
            <reportElement x="330" y="580" width="126" height="18" uuid="09e54ad7-41fa-470a-8735-6eb3fe1f52d3"/>
            <text><![CDATA[Date of payment of Wages]]></text>
        </staticText>
        <staticText>
            <reportElement x="65" y="580" width="141" height="17" uuid="6115cd1f-b044-4764-af5f-8674c5ea3df9"/>
            <text><![CDATA[Date of Issue of Wages Slip]]></text>
        </staticText>
        <staticText>
            <reportElement x="13" y="629" width="261" height="27" uuid="d177599f-6eb8-4a90-a077-5a8d5814c306"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[Signature of the Employer/Manager
         Or any other Authorized Person.
      ]]></text>
        </staticText>
        <line>
            <reportElement x="277" y="598" width="1" height="58" uuid="ebafac4a-b457-4ba5-81b5-88e68566ef65"/>
        </line>
        <staticText>
            <reportElement x="292" y="629" width="250" height="27" uuid="373613b5-2683-44b7-aad0-7151b48e8343"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[Signature or Thumb Impression
      of the Person Employed
      ]]></text>
        </staticText>
        <line>
            <reportElement x="170" y="512" width="1" height="65" uuid="9725f9ca-fc0f-4d06-8535-4d6fce40e136"/>
        </line>
        <line>
            <reportElement x="236" y="150" width="1" height="29" uuid="192643f7-bcd7-45e6-8a88-406f277583e7"/>
        </line>
        <line>
            <reportElement x="172" y="150" width="1" height="29" uuid="7564822d-6393-42a6-8b5d-ec6d0ec9028f"/>
        </line>
        <line>
            <reportElement x="140" y="150" width="1" height="29" uuid="475096c8-a86a-44c2-a5ed-162b2088228c"/>
        </line>
        <staticText>
            <reportElement x="13" y="467" width="38" height="20" uuid="6f6ecc2a-0c9b-4d1d-b76d-e247990fe5c6"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[8]]></text>
        </staticText>
        <staticText>
            <reportElement x="13" y="494" width="39" height="17" uuid="cf3ba350-b4fe-47b7-8507-2e51b5a3bfb0"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[9]]></text>
        </staticText>
        <staticText>
            <reportElement x="13" y="520" width="38" height="20" uuid="06da3aaa-adc7-49dc-9dc1-e4ef84c933fd"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[10]]></text>
        </staticText>
        <staticText>
            <reportElement x="13" y="578" width="38" height="20" uuid="0205da3d-d142-4b12-b49d-183227b9a6e6"/>
            <textElement textAlignment="Center"/>
            <text><![CDATA[11]]></text>
        </staticText>
        <line>
            <reportElement x="329" y="150" width="1" height="29" uuid="d485eace-d68f-4a65-b23d-fde51964646e"/>
        </line>
        <line>
            <reportElement x="479" y="150" width="1" height="30" uuid="76fc4ec8-89c7-40f0-b42e-a38678897122"/>
        </line>
        <textField>
            <reportElement x="177" y="160" width="59" height="20" uuid="cebc3947-3cfa-4a5e-ae18-9b125eec2bf3"/>
            <textFieldExpression><![CDATA[$F{FromDate}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="275" y="160" width="50" height="20" uuid="ce2a6ea1-0fdf-4621-abd1-3f9c7d535325"/>
            <textFieldExpression><![CDATA[$F{ToDate}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="411" y="185" width="100" height="20" uuid="7520c448-e2bc-47b5-a73b-2c39b91ea849"/>
            <textFieldExpression><![CDATA[$F{Other_Deduct}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="317" y="39" width="100" height="20" uuid="2ef72c19-745b-40b9-a37a-b23f57532567"/>
            <textFieldExpression><![CDATA[$F{Emp_Class}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="443" y="412" width="100" height="20" uuid="de2ff6a6-4e38-4d42-8cc2-88575d6c33da"/>
            <textFieldExpression><![CDATA[$F{Paid_Amt}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="463" y="578" width="79" height="20" uuid="3e250b09-2a78-45bb-84c6-8363bb54bbd7"/>
            <textFieldExpression><![CDATA[$F{Paid_Date}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="228" y="413" width="46" height="20" uuid="1acfd93c-2927-40e2-9e0b-23d29bf14078"/>
            <textFieldExpression><![CDATA[$F{Gross_Amt}]]></textFieldExpression>
        </textField>
        <componentElement>
            <reportElement x="277" y="211" width="264" height="18" isPrintWhenDetailOverflows="true" uuid="5c77602f-3ceb-4537-9b8f-ace622560265"/>
            <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
                <datasetRun subDataset="dataset2" uuid="6338c30f-551d-43e6-8584-76aa06181717">
                    <dataSourceExpression><![CDATA[$P{list2}]]>  </dataSourceExpression>
                </datasetRun>
                <jr:listContents height="18" width="264">
                    <textField>
                        <reportElement x="34" y="0" width="100" height="18" uuid="de7fd40a-342d-4d55-9c1f-7e5cd161cdcd"/>
                        <textFieldExpression><![CDATA[$F{salary}]]></textFieldExpression>
                    </textField>
                </jr:listContents>
            </jr:list>
        </componentElement>
        <textField>
            <reportElement x="315" y="2" width="100" height="26" uuid="869fd25e-c464-4506-8a03-f003ca33d620"/>
            <textFieldExpression><![CDATA[$F{emp_id}]]></textFieldExpression>
        </textField>
        <componentElement>
            <reportElement x="57" y="211" width="218" height="18" uuid="e01bdbfe-1f6e-437e-826b-13a440d605b9"/>
            <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
                <datasetRun subDataset="dataset3" uuid="a40e59e1-ce66-4f03-9eb6-03fe26927a1e">
                    <dataSourceExpression><![CDATA[$P{list1}]]></dataSourceExpression>
                </datasetRun>
                <jr:listContents height="18" width="218">
                    <textField>
                        <reportElement x="7" y="0" width="100" height="18" uuid="89c6f1b5-bb78-4a44-88aa-b82365eb3567"/>
                        <textFieldExpression><![CDATA[$F{alw_short_name}]]></textFieldExpression>
                    </textField>
                </jr:listContents>
            </jr:list>
        </componentElement>
    </band>
</detail>
<pageFooter>
    <band height="22" splitType="Stretch">
        <textField>
            <reportElement x="242" y="0" width="50" height="20" uuid="9f34a424-043c-4b4e-b83a-1d2f78022f38"/>
            <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]> </textFieldExpression>
        </textField>
    </band>
</pageFooter>
      </jasperReport>

1 个答案:

答案 0 :(得分:0)

参数类应与服务器上的“jrbeancollection”对象相同