<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 做強大的自己 閱讀(720) 評論(0)  編輯  收藏


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


    網站導航:
     
    主站蜘蛛池模板: 最近中文字幕免费完整| 久久成人无码国产免费播放| 三年片在线观看免费观看高清电影| 夜夜亚洲天天久久| 香港a毛片免费观看| 亚洲黄色在线观看网站| 2021精品国产品免费观看| 亚洲校园春色小说| 91在线视频免费播放| 亚洲色大成网站WWW国产| 色播在线永久免费视频| 久久精品国产亚洲av瑜伽| 免费播放春色aⅴ视频| 国产精品美女久久久免费 | 亚洲人成电影青青在线播放| a拍拍男女免费看全片| 77777午夜亚洲| 浮力影院第一页小视频国产在线观看免费 | 91高清免费国产自产拍2021| 亚洲天堂一区二区三区| 国产免费不卡v片在线观看| 亚洲色大成WWW亚洲女子| 亚洲成a人片在线播放| 国产精品偷伦视频观看免费| 亚洲不卡1卡2卡三卡2021麻豆| 成人免费网站在线观看| 免费手机在线看片| 亚洲av成人无码久久精品| 久久久久久免费视频| 曰批免费视频播放在线看片二| 亚洲成av人在线视| 在线播放高清国语自产拍免费 | 麻豆精品成人免费国产片| 亚洲a级在线观看| 亚洲裸男gv网站| 精品成在人线AV无码免费看 | 色噜噜AV亚洲色一区二区| www.免费在线观看| 一级毛片无遮挡免费全部| 亚洲韩国在线一卡二卡| 人人狠狠综合久久亚洲高清|