该帖已经被评为精华帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-01-23
为什么我不能使用打印功能,点击打印按钮后弹出一个窗口,问是要打开还是保存一个_print_文件
|
|
返回顶楼 | |
发表时间:2007-01-23
这个我这边测试了 没有这种情况啊
:'( 你是什么浏览器 什么web服务器? |
|
返回顶楼 | |
发表时间:2007-01-23
我这边用的是maxthon 服务器是用的weblogic
|
|
返回顶楼 | |
发表时间:2007-01-23
你用的是我的示例还是自己开发的叶面啊??
|
|
返回顶楼 | |
发表时间:2007-01-23
我是在自己开发的页面上做的,一开始我没有在web.xml中加入<filter>
<filter-name>eXtremeExport</filter-name> <filter-class>org.extremecomponents.table.filter.ExportFilter</filter-class> </filter> <filter-mapping> <filter-name>eXtremeExport</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> 这时打印可以使用,但是不能导出excel文件,我加入后excel可以导出,但是打印就好像不正常了 |
|
返回顶楼 | |
发表时间:2007-01-24
能不能把你的jsp叶面发给我啊
|
|
返回顶楼 | |
发表时间:2007-01-24
第一个调用页面
<%@ page contentType="text/html; charset=GBK" %> <%@ include file = "/common/common.jsp" %> <link rel="stylesheet" href="/css/content.css" type="text/css"> <link rel="stylesheet" type="text/css" href="/common/css/td_style_ec.css" /> <%@ page import="java.lang.Object,java.util.*,javax.naming.*,javax.rmi.*, erp.common.*,erp.login.*,xtgl.*,wdgl.*,wdgl.js.*,Common.*,lcgl.*,bmgl.*, java.sql.Timestamp,java.text.SimpleDateFormat,java.math.BigDecimal;" %> <% XtglSession xtglSession = (XtglSession)session.getAttribute("xtglSession"); UserObject userObject = (UserObject)session.getAttribute("userObject"); String lsSql = ""; String lsCaption = "逾期核销单信息"; SimpleDateFormat ldtFormat = new SimpleDateFormat("yyyy-MM-dd"); Collection colSjfw = null; String lsAllZgbh="0"; %> <html> <head> <title><%out.print(lsCaption);%></title> <link rel="stylesheet" href="/css/content.css" type="text/css"> <script language="javascript" src="/js/form.js"></script> <script language="JavaScript" src="/js/window.js"></script> <script language="javascript" src="/js/calendar1.js"></script> <script language="javascript" src="/js/xmlhttp.js"></script> <script type="text/javascript" src="/common/js/prototypeajax.js" ></script> <script type="text/javascript" src="/common/js/eccn.js" ></script> <script language="JavaScript"> function getTjsj(){ var tmpFrm = document.forms[0]; var tmpUrl = "/cx/cy/getYqhxd.jsp?"; tmpUrl += "sj="+tmpFrm.sj.value tmpUrl += "&qdrbh="+tmpFrm.qdrbh.value; var res = getDataByXMLHttp(tmpUrl); document.getElementById("list").innerHTML=res; init(); } var eccn=new ECCN("hxdxx1"); function init(){ eccn.init(); EccnUtil.resizeInit(); } </script> </head> <body bgcolor="#ffffff" onload="getTjsj();setScroll()" onunload="getScroll()"> <table width="100%" border="0"> <tr> <td class="guide"><img src="/image/guide.gif" align="absmiddle"><%out.print(lsCaption);%></td> </tr> </table> <form name="tjForm"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td class="whitebg" >查询:</td> <td class="whitebg" valign="middle"> <select name="bmbh" onchange="getBmZgxx();getTjsj();"><% out.println(lsOption_BM); %></select> </td> <td class="whitebg" valign="middle" id="qdr"> <select name="qdrbh" onchange="getTjsj();"> <%out.print(lsOption_ZG);%> </select> </td> <td class="whitebg" >截止时间:</td> <td class="whitebg" > <input type="text" name="sj" class="field" value="<%=lsSj%>" readonly onFocus="javascript:fPopCalendar(sj,sj);return false;"> <a href="#" onclick="fPopCalendar(sj,sj);return false"><img src="/image/clock.gif" border="0" align="absmiddle"></a> </td> <td class="whitebg" > <% if(lbCwgl||lbTjdy){ //out.print(new GenIconButton("打印","func_print.gif","javascript:printTjsj();").getButton()); } out.print(new GenIconButton("刷新","func_circle.gif","javascript:getTjsj();").getButton()); %> </td> </tr> </table> </form> <hr> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td id="list" class="guide"> </td> </tr> </table> </body> </html> |
|
返回顶楼 | |
发表时间:2007-01-24
第二个显示页面
<%@ page contentType="text/html; charset=GBK" %> <%@ include file = "/common/common.jsp" %> <link rel="stylesheet" href="/css/content.css" type="text/css"> <link rel="stylesheet" type="text/css" href="/common/css/td_style_ec.css" /> <%@ taglib uri="/WEB-INF/extremecomponents.tld" prefix="ec" %> <%//@ include file = "/common/showparameter.jsp" %> <%@ page import="java.lang.Object,java.util.*,javax.naming.*,javax.rmi.*,java.text.SimpleDateFormat, erp.common.*,erp.login.*,xtgl.*,wdgl.*,wdgl.js.*,wdgl.cw.*,Common.*,java.math.BigDecimal,java.sql.*;" %> <% request.setCharacterEncoding("GB2312"); //取参数 String lsQdrbh = request.getParameter("qdrbh"); String lsSj = request.getParameter("sj"); XtglSession xtglSession = (XtglSession)session.getAttribute("xtglSession"); WdglSession wdglSession = (WdglSession)session.getAttribute("wdglSession"); UserObject userObject = (UserObject)session.getAttribute("userObject"); Map loMap = null; List loList = null; String lsSql = ""; try{ Common com1 = new Common(); lsSql = "Select a.*, b.zgmc AS zgmc,'' As yqyy,'' As yjfhrq From cw_hxdxx a LEFT OUTER JOIN xt_zgxx b ON a.lyzg = b.zgbh Where (a.tssb = 0) AND (a.hxdfhrq IS NULL) AND (a.ysbz = 0) AND (a.lyrq < '" + lsSj + "') And (a.qdrbh In (" + lsQdrbh + "))"; loList = wdglSession.querySQL(lsSql); }catch(Exception ex){ ex.printStackTrace(); } request.setAttribute("totalRows",new Integer(loList.size())); request.setAttribute("hxdxx",loList); %> <ec:table tableId="hxdxx1" items="hxdxx" var="cur" action="/cx/cy/getYqhxd.jsp" showPrint="true" showExports="true" sortable="true" style="table-layout:fixed;" toolbarLocation="top" rowsDisplayed="-1" xlsFileName="逾期核销单信息.xls" toolbarContent="export|extend|status" showTitle="true" > <ec:row> <ec:column property="xh" title="序号" width="4%" style="text-align:center;" value="${TOTALROWCOUNT}"/> <ec:column property="hxdh" title="核销单号" width="11%" style="text-align:center;"/> <ec:column property="ybh" title="运编号" width="11%" style="text-align:center;"/> <ec:column property="bgbb" title="币别" width="4%" style="text-align:center;"/> <ec:column property="bgje" title="报关金额" width="10%" style="text-align:right;" cell="currency" format="###0.00"/> <ec:column property="zgmc" title="领用人" width="9%" style="text-align:center;"/> <ec:column property="lyrq" title="领用日期" width="10%" style="text-align:center;" cell="date" format="yyyy-MM-dd"/> <ec:column property="yjfhrq" title="预计返回日期" width="10%" style="text-align:center;"/> <ec:column property="yqyy" title="逾期原因" style="text-align:center;"/> </ec:row> </ec:table> |
|
返回顶楼 | |
发表时间:2007-01-24
第一个页面是取过滤和显示的参数,第二个页面是取生成的显示数据用的
|
|
返回顶楼 | |
发表时间:2007-01-24
我是希望你以附件形式发 :'(
你这么发看着迷糊 而且 我不希望这个帖子成为聊天工具 希望你可以去圈子里发言 或者去我的blog里的 ecside综合讨论 帖 去回复 谢谢了 |
|
返回顶楼 | |