<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)  編輯  收藏


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


    網站導航:
     
    主站蜘蛛池模板: 免费一级毛片在线播放不收费| 国产美女被遭强高潮免费网站 | 亚洲中文字幕在线第六区| 亚洲av中文无码乱人伦在线观看 | 2019中文字幕免费电影在线播放| 亚洲伊人久久精品影院| 亚洲成a人片毛片在线| 爱情岛论坛免费视频| 国产免费黄色大片| 亚洲喷奶水中文字幕电影| 2022国内精品免费福利视频| 日本精品人妻无码免费大全| 久久国产亚洲电影天堂| 一本久久免费视频| 免费观看国产精品| 日韩大片在线永久免费观看网站| 亚洲午夜成人精品电影在线观看| 9i9精品国产免费久久| 国产免费拔擦拔擦8x| 青青草97国产精品免费观看| 国产午夜亚洲精品国产成人小说| 成人爽a毛片免费| 77777亚洲午夜久久多人| 国色精品va在线观看免费视频| 久久亚洲AV成人无码国产| 成人毛片免费在线观看| 亚洲天堂一区二区三区| 日韩高清在线免费看| 亚洲色偷偷色噜噜狠狠99| 在线视频免费观看爽爽爽| 亚洲Av永久无码精品一区二区| 在线观看AV片永久免费| 亚洲一区二区影视| 最近免费中文字幕高清大全| 亚洲欧美日韩中文二区| 国产亚洲精品成人AA片新蒲金| 69成人免费视频| 乱淫片免费影院观看| 亚洲乱码在线播放| 亚洲区日韩区无码区| 美女被免费喷白浆视频|