You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
359 lines
9.1 KiB
359 lines
9.1 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
pageEncoding="UTF-8"%>
|
|
<% response.setContentType("application/vnd.ms-excel;charset=UTF-8"); %>
|
|
<%@page import="com.wat.component.excel.*" %>
|
|
<%@page import="java.util.Map" %>
|
|
<%@page import="java.net.URLEncoder" %>
|
|
<%
|
|
String excelid = request.getParameter("id");
|
|
Map data = WatExcelDataContainer.getInstance().getReportData(excelid);
|
|
if(data==null || data.size()==0)return;
|
|
//*
|
|
response.setHeader("Content-Disposition",
|
|
"attachment; filename=\""
|
|
+ new String((data.get("name")+".xls").getBytes("GBK"),"iso-8859-1") + "\"");
|
|
if(data.get("excel") != null){
|
|
byte[] bs = (byte[])data.get("excel");
|
|
out.clear();
|
|
response.getOutputStream().write(bs);
|
|
//response.getOutputStream().close();
|
|
return;
|
|
}
|
|
//*/
|
|
/*
|
|
response.setHeader("Content-Disposition",
|
|
"attachment; filename=\""
|
|
+ URLEncoder.encode(data.get("name")+".xls", System.getProperty("file.encoding")) + "\"");
|
|
//*/
|
|
%>
|
|
<HTML xmlns:o="urn:schemas-microsoft-com:office:office"
|
|
xmlns:x="urn:schemas-microsoft-com:office:excel"
|
|
xmlns="http://www.w3.org/TR/REC-html40">
|
|
<HEAD>
|
|
<style>
|
|
/*--*报表用css--*/
|
|
.printBold{
|
|
font-weight : normal}
|
|
|
|
/*--report.jsp中的body用--*/
|
|
body.report{background-color : #EDF3FF}
|
|
|
|
/*--标题栏采用public.css中topTitle定义--*/
|
|
|
|
/*--报表条件--*/
|
|
table.repCnd{width:100%;
|
|
font-size:10pt;
|
|
border-collapse:collapse;
|
|
padding:1px;
|
|
border:1px solid #7BB6E7}
|
|
tr.repCnd{height:20px}
|
|
/*--复选框--*/
|
|
td.repCndCbx{border:1px solid #7BB6E7;
|
|
padding-left:2px;
|
|
padding-right:2px;
|
|
padding-top:1px;
|
|
padding-bottom:1px;
|
|
background:#E8F2FA url(../images/public/bg/editBg.gif) repeat-x center;
|
|
width:22px}
|
|
/*--条件标题--*/
|
|
td.repCndLb{border:1px solid #7BB6E7;
|
|
padding:1px 2px 1px 2px;
|
|
white-space:nowrap;
|
|
background:#DBEBF8 url(../images/public/bg/lableBg.gif) repeat-x center;
|
|
color:#006699;
|
|
text-align:left;
|
|
font-weight:bold}
|
|
/*--条件编辑区--*/
|
|
td.repCndEdit{border:1px solid #7BB6E7;
|
|
padding:1px 20px 1px 3px;
|
|
white-space:nowrap;
|
|
background:#E8F2FA url(../images/public/bg/editBg.gif) repeat-x center;}
|
|
/*--条件编辑区-最右端--*/
|
|
td.repCndEditRight{border:1px solid #7BB6E7;
|
|
padding:1px 3px;
|
|
white-space:nowrap;
|
|
background:#E8F2FA url(../images/public/bg/editBg.gif) repeat-x center;
|
|
width:100%}
|
|
|
|
/*--条件工具条--*/
|
|
div.repCndToolBar{width:100%;
|
|
height:24px;
|
|
background:#E8F3FF url(../images/public/bg/toolbarBg.gif) repeat-x center}
|
|
td.repCndToolBar{padding:0px 10px 0px 2px;
|
|
color:#004E73;
|
|
white-space:nowrap;
|
|
font-size:9pt;
|
|
}
|
|
|
|
/*--报表功能菜单--*/
|
|
/*--顶部功能菜单--*/
|
|
div.repFuncMenuTop{width:100%;
|
|
padding-top:2px}
|
|
/*--底部功能菜单--*/
|
|
div.repFuncMenu{width:100%}
|
|
|
|
/*--报表功能菜单-链接--*/
|
|
div.repFuncMenuLink{padding:2px}
|
|
table.repFuncMenuLink{}
|
|
td.repFuncMenuLink{white-space:nowrap;
|
|
cursor:pointer;
|
|
vertical-align:top}
|
|
/*--报表用户功能菜单文字--*/
|
|
td.repFuncMenuText{white-space:nowrap;
|
|
font-size:9pt;
|
|
color:#23698B;
|
|
background:#E8F3FF url(../images/report/menuTextBg.gif) repeat-x center}
|
|
|
|
/*--报表功能菜单-复选框--*/
|
|
div.repFuncMenuCbx{}
|
|
table.repFuncMenuCbx{}
|
|
td.repFuncMenuCbx{white-space:nowrap;
|
|
font-size:10pt;
|
|
padding-right:10px}
|
|
|
|
/*--报表功能菜单-下拉框--*/
|
|
div.repFuncMenuDropdown{padding-left:2px}
|
|
|
|
/*--报表工具条--*/
|
|
div.repToolBar{width:100%;
|
|
height:24px;
|
|
background:#E8F3FF url(../images/public/bg/toolbarBg.gif) repeat-x center}
|
|
td.repToolBar{white-space:nowrap;
|
|
color:#004E73;
|
|
padding-top:1px;
|
|
padding-bottom:1px;
|
|
font-size:9pt}
|
|
|
|
/*--报表容器--*/
|
|
table.repContainer{width:100%;}
|
|
|
|
/*--报表标题--*/
|
|
td.repHd{text-align:center;
|
|
font-weight:bold;
|
|
font-size:14pt;
|
|
padding:2;}
|
|
/*--报表付标题--*/
|
|
td.repSubHd{font-size:9pt;
|
|
padding:2;}
|
|
/*--报表表尾--*/
|
|
td.repFt{font-size:9pt;
|
|
padding:2;}
|
|
|
|
/*--列表报表--*/
|
|
|
|
table.repList{width:100%;
|
|
border:1px solid #999999;
|
|
border-collapse:collapse;
|
|
padding:2px;
|
|
font-size:10pt}
|
|
|
|
/*--列表式thead风格--*/
|
|
thead.repList{display:table-header-group}
|
|
/*--列表标题--*/
|
|
tr.repListHd{background-color:#FFE066;
|
|
height:26;
|
|
text-align:center}
|
|
/*--列表标题-最左边--*/
|
|
td.repListHdLeft{white-space:nowrap;
|
|
padding:1px;
|
|
border-top:1px solid #999999}
|
|
/*--列表标题-中间--*/
|
|
td.repListHd{white-space:nowrap;
|
|
padding:1px;
|
|
border-top:1px solid #999999;
|
|
border-left:1px solid #999999;}
|
|
/*--列表右边--*/
|
|
td.repListRight{white-space:nowrap;
|
|
padding:1px;
|
|
font-weight:normal;
|
|
border-left:1px solid #999999;
|
|
border-right:1px solid #999999;
|
|
border-top:1px solid #999999}
|
|
/*--列表下边--*/
|
|
td.repListBottom{white-space:nowrap;
|
|
padding:1px;
|
|
font-weight:normal;
|
|
border:1px solid #999999}
|
|
/*--只显示上下左边--*/
|
|
td.repListTBL{white-space:nowrap;
|
|
padding:1px;
|
|
font-weight:normal;
|
|
border-top:1px solid #999999;
|
|
border-bottom:1px solid #999999;
|
|
border-left:1px solid #999999}
|
|
/*--只显示上下左边--*/
|
|
td.repListTBLR{white-space:nowrap;
|
|
padding:1px;
|
|
font-weight:normal;
|
|
border-top:1px solid #999999;
|
|
border-bottom:1px solid #999999;
|
|
border-right:1px solid #999999;
|
|
border-left:1px solid #999999}
|
|
/*--列表标题-不打印--*/
|
|
td.repListHdNoPrt{white-space:nowrap;
|
|
padding:1px;
|
|
border-top:1px solid #999999;
|
|
border-left:1px solid #999999;}
|
|
/*--列表标题首行-最左边--*/
|
|
td.repListHdLTop{white-space:nowrap;
|
|
padding:1px;}
|
|
/*--列表标题首行-中间--*/
|
|
td.repListHdTop{white-space:nowrap;
|
|
padding:1px;
|
|
border-left:1px solid #999999}
|
|
|
|
|
|
/*--列表式tbody风格overflow: auto;max-height: 300px在firefox可以锁定标题滚动--*/
|
|
tbody.repList{}
|
|
|
|
/*--列表报表奇数行--*/
|
|
tr.repList1{background-color:#EDF3FF;
|
|
page-break-inside:avoid;
|
|
height:26}
|
|
/*--列表报表偶数行--*/
|
|
tr.repList2{background-color:#DEEBF7;
|
|
page-break-inside:avoid;
|
|
height:26}
|
|
|
|
/*--列表报表-最左边--*/
|
|
td.repListLeft{white-space:nowrap;
|
|
padding:1px;
|
|
font-weight:normal;
|
|
border-top:1px solid #999999}
|
|
/*--列表报表-中间--*/
|
|
td.repList{white-space:nowrap;
|
|
padding:1px;
|
|
font-weight:normal;
|
|
border-left:1px solid #999999;
|
|
border-top:1px solid #999999}
|
|
/*--列表报表-不打印--*/
|
|
td.repListNoPrt{white-space:nowrap;
|
|
padding:1px;
|
|
font-weight:normal;
|
|
border-left:1px solid #999999;
|
|
border-top:1px solid #999999}
|
|
|
|
/*--列表式tfoot风格--*/
|
|
tfoot.repList{}
|
|
|
|
/*--报表列表式汇总行--*/
|
|
tr.repListSum {background-color:transparent;
|
|
font-weight:bold;
|
|
height:26px}
|
|
|
|
/*--列表汇总单元格-最左边--*/
|
|
td.repListSumL{white-space:nowrap;
|
|
padding:1px;
|
|
border-top:1px solid #999999}
|
|
/*--列表汇总单元格-中间--*/
|
|
td.repListSum{white-space:nowrap;
|
|
padding:1px;
|
|
border-left:1px solid #999999;
|
|
border-top:1px solid #999999}
|
|
/*--列表汇总单元格-不打印--*/
|
|
td.repListSumNoPrt{white-space:nowrap;
|
|
padding:1px;
|
|
border-left:1px solid #999999;
|
|
border-top:1px solid #999999}
|
|
|
|
/*--明细显示--*/
|
|
|
|
/*--明细分隔栏--*/
|
|
div.repDSeperator{padding:5px;}
|
|
|
|
/*--明细报表--*/
|
|
table.repDetail{width:100%;
|
|
border:1px solid #999999;
|
|
border-collapse:collapse;
|
|
padding:2px;
|
|
font-size:10pt;
|
|
word-wrap: break-word;
|
|
word-break: break-all}
|
|
|
|
/*--明细tr--*/
|
|
tr.repDetail{ height : 24px;}
|
|
|
|
/*--明细列标题--*/
|
|
td.repDetailLb{ background-color : #DEEBF7;
|
|
color : #006699;
|
|
font-weight:bold;
|
|
padding : 2;
|
|
border-left:1px solid #999999;
|
|
border-top:1px solid #999999}
|
|
/*--明细列左边标题--*/
|
|
td.repDetailLbL{ background-color : #DEEBF7;
|
|
color : #006699;
|
|
font-weight:bold;
|
|
padding : 2;
|
|
border-top:1px solid #999999}
|
|
/*--明细列顶部标题--*/
|
|
td.repDetailLbTop{ background-color : #DEEBF7;
|
|
color : #006699;
|
|
font-weight:bold;
|
|
padding : 2;
|
|
border-left:1px solid #999999}
|
|
/*--明细列左上角标题--*/
|
|
td.repDetailLbLTop{ background-color : #DEEBF7;
|
|
color : #006699;
|
|
font-weight:bold;
|
|
padding : 2}
|
|
|
|
/*--明细数据--*/
|
|
td.repDetail{ background-color: #EDF3FF;
|
|
padding : 2;
|
|
border-left:1px solid #999999;
|
|
border-top:1px solid #999999}
|
|
/*--明细数据-顶部--*/
|
|
td.repDetailTop{ background-color: #EDF3FF;
|
|
padding : 2;
|
|
border-left:1px solid #999999}
|
|
|
|
/*--明细分隔列--*/
|
|
td.repDSeperator{ background-color: #DEEBF7;
|
|
font-size : 11pt;
|
|
font-weight : bold;
|
|
text-align : center;
|
|
color : #006699;
|
|
padding : 2;
|
|
border-top:1px solid #999999}
|
|
|
|
/*--弹出菜单--*/
|
|
table.repPopMenu{ background-color : #666666;
|
|
font-size : 10pt}
|
|
tr.repPopMenu{}
|
|
td.repPopMenu{ padding : 0;
|
|
background-color : #ffffe0;}
|
|
.repUnitFunc{color : #006699;
|
|
font-size : 10pt;}
|
|
|
|
/*--列表式报表排序用--*/
|
|
.sort-arrow{
|
|
width:0px;
|
|
height:0px;
|
|
margin:0px}
|
|
.sort-arrow.descending{
|
|
width:8px;
|
|
height:7px;
|
|
background-image:url("./down.png");
|
|
background-repeat:no-repeat;
|
|
margin:0px}
|
|
.sort-arrow.ascending{
|
|
width:8px;
|
|
height:7px;
|
|
background-image:url("./up.png");
|
|
background-repeat:no-repeat;
|
|
margin:0px}
|
|
|
|
|
|
span.listTreeNode{cursor:pointer
|
|
}
|
|
</style>
|
|
</HEAD>
|
|
|
|
<BODY>
|
|
|
|
<!-- 下面的删掉,导入报表 -->
|
|
<%=data.get("data")%>
|
|
|
|
</BODY>
|
|
</HTML>
|
|
|