您的位置:首页 > 其它

打印报表版本1.0

2009-07-20 11:07 28 查看
<h:commandButton id="printBtn" value="打印准迁证" accesskey="p"
style="width: 90px" tabindex="200" onclick="return print()" />


function print() {
var slh = document.getElementById("slbh_4_form").innerText;
alert(slh);
window.open("/gdrk/cn/hnisi/gdrk/hjsp/swqr/SwqrZqzPrintPane.jsp?slh="+slh, "", "width=700,height=500,top=100,left=100,toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=no,status=no");
return false;
}


<%@ page contentType="text/html;charset=GBK"%>
<%@ taglib uri="/WEB-INF/runqianReport4.tld" prefix="report"%>
<%@ page language="java"%>

<html>
<title>准予迁入证明</title>
<body onmouseover="self.status='准予迁入证明';return true" topMargin=0
rightMargin=0 bottomMargin=0>
<%
String reportName = "zqzTest2" + ".raq";
String b = "SLH=" + request.getParameter("slh");
System.out.println("======================"+b);
%>
<div align="center"
style="border: 0 solid #91A7B4; overflow-x: auto; overflow-y: auto; height: 100%; width: 100%">
<table width="100%" height="800">
<tr>
<td valign="top" align="center">
<report:html name="report1" reportFileName="<%=reportName%>"
params="<%=b%>" funcBarLocation="boTh" needPageMark="yes"
functionBarColor="#fff5ee" funcBarFontSize="10pt"
funcBarFontColor="blue" separator="  "
needSaveAsExcel="yes" needSaveAsPdf="yes" needPrint="yes"
pageMarkLabel="页号{currpage}/{totalPage}" printLabel="打印"
displayNoLinkPageMark="yes" saveAsName="准予迁入证明" />
</td>
</tr>
</table>
</div>
</body>
</html>


在润乾报表里建立两个数据集,一个参数SLH

ds1:

SELECT t1.SLH,
t1.ZQYY,
t1.BZ,
t1.CBR,
t1.DZ,
t1.FWDW,
t1.GMSFHM,
t1.HKDJJG,
t1.PZJG,
t1.QCDXZ,
t1.SQRXM FROM
V_HJSP_PRINT_QRSP_ZQZ t1

WHERE ( t1.SLH = ?)


ds2:

SELECT t.YZQRGXMC,
t.XM,
t.XB,
t.CSRQ,
t.SLH,t.ZJHM ,
rownum rid
FROM
V_HJSP_QRRYXX t

WHERE (t.SLH =? and rownum < 5)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐