<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    方槍槍的java世界

    不要因為風雨飄落就停止了你的腳步,真正的得失就在你的心中。 做喜歡做的事,不輕言放棄!

    cell 報表制作腳本舉例

     

    <%@ page contentType="text/html;charset=GBK"%>
    <%@ taglib uri="/tags/web-html" prefix="html"%>
    <%@ taglib uri="/tags/web-tianhe" prefix="templates"%>
    <%@ page import="java.math.BigDecimal"%>
    <%@ page import="java.util.List"%>
    <%@ page import="java.util.Map"%>
    <%@ page import="java.util.Date"%>


    <script language="Jscript">

    function setfilename()
    {
      filen="jsp/hr/personnel/Personnelreport.cll";  
      return filen;
    }
    function filldata()
    {
    <%
       List bodyList=(List)request.getAttribute("bodyList");  //表體數據
       Map headTailMap=(Map)request.getAttribute("headTailMap");  //表頭表尾數據
      
       int len = bodyList.size();
       String title= (String) headTailMap.get("title");//標題
          String userName=(String)headTailMap.get("userName");//制表人
          String date=(String)headTailMap.get("dateId");//制表時間
    %>
         sheet = <%=0%>;
      content_col=1;
      //設置某頁行數
      CellRpt.SetRows(<%=len+4+1%>,sheet);//設置某頁行數(行數,頁號)
      CellRpt.SetCols(15,sheet);//設置某頁列數(列數,頁號)
      CellRpt.PrintSetOrient(1);//設置進紙方式為橫放

      CellRpt.MergeCells(1,1,15,1);//將指定區域的單元格組合(區域起始點列號,行號,區域結束點列號,行號)
      CellRpt.SetCellFontStyle(1,1,sheet,2);//設置指定單元格的字體風格(列號,行號,頁號,字體風格)
       CellRpt.SetCellFontSize(1,1,sheet,20);//設置單元格字體大小(列號,行號,頁號,字號)
      CellRpt.SetCellAlign(1,1,sheet,36);//設置指定單元格的對齊方式(列號,行號,頁號,參數)
      CellRpt.S(1,1,sheet,"<%=title%>");

      CellRpt.MergeCells(1,2,1,2);
      CellRpt.SetCellFontStyle(1,2,sheet,3);
       CellRpt.SetCellFontSize(1,2,sheet,10);
      CellRpt.SetCellAlign(1,2,sheet,36);
      CellRpt.S(1,2,sheet,"部門");

      CellRpt.MergeCells(2,2,2,2);
      CellRpt.SetCellFontStyle(2,2,sheet,3);
       CellRpt.SetCellFontSize(2,2,sheet,10);
      CellRpt.SetCellAlign(2,2,sheet,36);
      CellRpt.S(2,2,sheet,"姓名");

      CellRpt.MergeCells(3,2,3,2);
      CellRpt.SetCellFontStyle(3,2,sheet,3);
       CellRpt.SetCellFontSize(3,2,sheet,10);
      CellRpt.SetCellAlign(3,2,sheet,36);
      CellRpt.S(3,2,sheet,"性別");

      CellRpt.MergeCells(4,2,4,2);
      CellRpt.SetCellFontStyle(4,2,sheet,3);
       CellRpt.SetCellFontSize(4,2,sheet,10);
      CellRpt.SetCellAlign(4,2,sheet,36);
      CellRpt.S(4,2,sheet,"年齡");

      CellRpt.MergeCells(5,2,5,2);
      CellRpt.SetCellFontStyle(5,2,sheet,3);
       CellRpt.SetCellFontSize(5,2,sheet,10);
      CellRpt.SetCellAlign(5,2,sheet,36);
      CellRpt.S(5,2,sheet,"政治面貌");

      CellRpt.MergeCells(6,2,6,2);
      CellRpt.SetCellFontStyle(6,2,sheet,3);
       CellRpt.SetCellFontSize(6,2,sheet,10);
      CellRpt.SetCellAlign(6,2,sheet,36);
      CellRpt.S(6,2,sheet,"學歷");

      CellRpt.MergeCells(7,2,7,2);
      CellRpt.SetCellFontStyle(7,2,sheet,3);
       CellRpt.SetCellFontSize(7,2,sheet,10);
      CellRpt.SetCellAlign(7,2,sheet,36);
      CellRpt.S(7,2,sheet,"專業技術名稱");

      CellRpt.MergeCells(8,2,8,2);
      CellRpt.SetCellFontStyle(8,2,sheet,3);
       CellRpt.SetCellFontSize(8,2,sheet,10);
      CellRpt.SetCellAlign(8,2,sheet,36);
      CellRpt.S(8,2,sheet,"職業技能名稱");

      CellRpt.MergeCells(9,2,9,2);
      CellRpt.SetCellFontStyle(9,2,sheet,3);
       CellRpt.SetCellFontSize(9,2,sheet,10);
      CellRpt.SetCellAlign(9,2,sheet,36);
      CellRpt.S(9,2,sheet,"出生日期");

      CellRpt.MergeCells(10,2,10,2);
      CellRpt.SetCellFontStyle(10,2,sheet,3);
       CellRpt.SetCellFontSize(10,2,sheet,10);
      CellRpt.SetCellAlign(10,2,sheet,36);
      CellRpt.S(10,2,sheet,"入職時間");
     
      CellRpt.MergeCells(11,2,11,2);
      CellRpt.SetCellFontStyle(11,2,sheet,3);
       CellRpt.SetCellFontSize(11,2,sheet,10);
      CellRpt.SetCellAlign(11,2,sheet,36);
      CellRpt.S(11,2,sheet,"家庭地址");
     
      CellRpt.MergeCells(12,2,12,2);
      CellRpt.SetCellFontStyle(12,2,sheet,3);
       CellRpt.SetCellFontSize(12,2,sheet,10);
      CellRpt.SetCellAlign(12,2,sheet,36);
      CellRpt.S(12,2,sheet,"辦公電話");
     
      CellRpt.MergeCells(13,2,13,2);
      CellRpt.SetCellFontStyle(13,2,sheet,3);
       CellRpt.SetCellFontSize(13,2,sheet,10);
      CellRpt.SetCellAlign(13,2,sheet,36);
      CellRpt.S(13,2,sheet,"移動電話");
     
      CellRpt.MergeCells(14,2,14,2);
      CellRpt.SetCellFontStyle(14,2,sheet,3);
       CellRpt.SetCellFontSize(14,2,sheet,10);
      CellRpt.SetCellAlign(14,2,sheet,36);
      CellRpt.S(14,2,sheet,"員工狀態");
     
         content_row=3;

    <%
      BigDecimal sumEmpNum = new BigDecimal(bodyList.size());

            for(int i = 0;i < bodyList.size();i++){
           Map  bodyMap = (Map) bodyList.get(i);
           String orgName = (String)bodyMap.get("ORGAN_NAME");//部門
        String empName = (String)bodyMap.get("EMP_NAME");//員工姓名
        String sex = (String)bodyMap.get("SEX");//性別
        String policital = (String)bodyMap.get("POLICITAL_STATUS");//政治面貌
        String edu = (String)bodyMap.get("EDUCATION");//學歷
        String tName = (String)bodyMap.get("NAME");//專業技術名稱
        String skillName = (String)bodyMap.get("SKILL_POST_NAME");//職業技能名稱
        String birthday = (String)bodyMap.get("BIRTHDAY");//生日
        String entryDay = (String)bodyMap.get("ENTRY_ENTERPRISE_DAT");//入職時間
        String addr = (String)bodyMap.get("ADDRESS");//家庭住址
        String officePhone = (String)bodyMap.get("OFFICE_PHONE");//辦公電話
        String mobilePhone = (String)bodyMap.get("MOBILE_PHONE");//移動電話
        String state = (String)bodyMap.get("STATE");//員工狀態
        String ageStr = "";
        if(sex == null || "".equals(sex)){
         sex = "";
        }else{
         switch(Integer.parseInt(sex)){
         case 0 : sex="男";break;
         case 1 : sex="女";break;
         } 
        }
        if(policital == null || "".equals(policital)){
         policital = "";
        }else{
         switch(Integer.parseInt(policital)){
         case 1 : policital="工人";break;
         case 2 : policital="農民";break;
         case 3 : policital="知識分子";break;
         case 4 : policital="群眾";break;
         } 
        }
        if(edu == null || "".equals(edu)){
         edu = "";
        }else{
         switch(Integer.parseInt(edu)){
         case 1 : edu="小學";break;
         case 2 : edu="初中";break;
         case 3 : edu="高中";break;
         case 4 : edu="大學???;break;
         case 5 : edu="大學本科";break;
         case 6 : edu="碩士";break;
         case 7 : edu="博士";break;
         } 
        }
        if(skillName == null || "".equals(skillName)){
         skillName = "";
        }else{
         switch(Integer.parseInt(skillName)){
         case 1 : skillName="企業人力資源管理";break;
         case 2 : skillName="計算機操作";break;
         case 3 : skillName="倉儲工";break;
         case 4 : skillName="企業經營管理";break;
         case 5 : skillName="秘書";break;
         case 6 : skillName="物流管理";break;
         case 7 : skillName="卷煙商品營銷";break;
         case 8 : skillName="客戶服務管理";break;
         case 9 : skillName="企業信息管理";break;
         case 10 : skillName="汽車駕駛";break;
         case 11 : skillName="營業員";break;
         } 
        }
        if(birthday == null || "".equals(birthday)){
         birthday = "";
        }else{
         String yearBir = birthday.substring(0,4);
         String dateNow = new Date().toString();
         String yearNow = dateNow.substring(dateNow.length()-4,dateNow.length());
         int ageInt = Integer.parseInt(yearNow) - Integer.parseInt(yearBir);
         ageStr = String.valueOf(ageInt); 
        }
    %>
            content_col=1;
       CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
      CellRpt.SetCellAlign(content_col,content_row,sheet,33);
      CellRpt.S(content_col,content_row,sheet,"<%=orgName%>");
      content_col++;

      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,33);
      CellRpt.S(content_col,content_row,sheet,"<%=empName%>");
      content_col++;

      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,33);
      CellRpt.S(content_col,content_row,sheet,"<%=sex%>");
      content_col++;

      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=ageStr%>");
      content_col++;

      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=policital%>");
      content_col++;

      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=edu%>");
      content_col++;

      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=tName%>");
      content_col++;

      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=skillName%>");
      content_col++;

      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=birthday%>");
      content_col++;
     
      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=entryDay%>");
      content_col++;
     
      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=addr%>");
      content_col++;
     
      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=officePhone%>");
      content_col++;
     
      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=mobilePhone%>");
      content_col++;
     
      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=state%>");

      content_row++;
    <%

    }
    %>
      content_col=1;
      CellRpt.MergeCells(content_col,content_row,content_col,content_row);
      CellRpt.SetCellFontStyle(content_col,content_row,sheet,0);
      CellRpt.SetCellAlign(content_col,content_row,sheet,33);
      CellRpt.S(content_col,content_row,sheet,"合計");

      content_col++;

      CellRpt.SetCellFontSize(content_col,content_row,sheet,10);
       CellRpt.SetCellAlign(content_col,content_row,sheet,34);
      CellRpt.S(content_col,content_row,sheet,"<%=sumEmpNum%>(人)");//總人數

     
      content_row++;
     
     
      CellRpt.MergeCells(1,content_row,3,content_row);
      CellRpt.SetCellFontSize(1,content_row,sheet,10);
       CellRpt.SetCellAlign(1,content_row,sheet,33);
      CellRpt.S(1,content_row,sheet,"制表人:"+"<%=userName%>");

      CellRpt.MergeCells(12,content_row,14,content_row);
      CellRpt.SetCellFontSize(12,content_row,sheet,10);
       CellRpt.SetCellAlign(12,content_row,sheet,34);
      CellRpt.S(12,content_row,sheet,"制表日期:"+"<%=date%>");

       var line_rowBegin=2; //從第二行開始
      var line_rowEnd=CellRpt.getRows(sheet)-2; //畫到倒數第三行
      var line_colBegin=1; //從第一列開始
      var line_colEnd=CellRpt.getCols(sheet);//畫到最后一列
      CellRpt.DrawGridLine(line_colBegin, line_rowBegin, line_colEnd,line_rowEnd, 0, 2,-1);//所有框畫細線
     
      //打印設置
       CellRpt.PrintRange(1,1,CellRpt.getCols(sheet),CellRpt.getRows(sheet));
      CellRpt.PrintSetTopTitle(1,6);
      CellRpt.PrintSetBottomTitle(content_row+1,content_row+1);
      CellRpt.PrintSetOrient(1);//打印方向:1為橫向,0為縱向
    }

    </script>

    posted on 2008-04-05 23:58 做強大的自己 閱讀(726) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 91精品啪在线观看国产线免费| 黄网站色视频免费观看45分钟 | 亚洲a在线视频视频| 中文字幕无码一区二区免费| 亚洲另类激情综合偷自拍图| 十八禁在线观看视频播放免费| 亚洲国产美女在线观看| 无码专区AAAAAA免费视频| 国产亚洲福利精品一区| 在线观看www日本免费网站| 亚洲日产2021三区在线| 在线免费观看毛片网站| 亚州**色毛片免费观看| 亚洲欧洲日产国码无码网站 | 国产美女被遭强高潮免费网站| av午夜福利一片免费看久久| 亚洲va在线va天堂va不卡下载| 成年女人男人免费视频播放 | 免费一级一片一毛片| 日本免费大黄在线观看| mm1313亚洲国产精品无码试看| 亚洲AV无码欧洲AV无码网站| 四色在线精品免费观看| 一级毛片**不卡免费播| 一级视频在线免费观看| 77777亚洲午夜久久多喷| 亚洲V无码一区二区三区四区观看| 韩国二级毛片免费播放| 99xxoo视频在线永久免费观看| 九九免费精品视频在这里| 亚洲乱码在线播放| 亚洲国产精品成人久久| 免费人成视网站在线观看不卡| 老司机在线免费视频| 色www永久免费| 瑟瑟网站免费网站入口| 亚洲综合国产成人丁香五月激情| 亚洲一区二区影院| 免费不卡中文字幕在线| 最近最新中文字幕完整版免费高清| 麻豆成人久久精品二区三区免费|