<%@ page contentType="text/html;charset=GBK" %>
<%@ taglib uri="/WEB-INF/Report.tld" prefix="report" %>
<%@ page import="java.io.File"%>
<%@ page import="com.runqian.report4.usermodel.Context"%>
<%@ page import="java.util.*"%>
<html>
<body topmargin=0 leftmargin=0 rightmargin=0 bottomMargin=0>
<%
request.setCharacterEncoding( "GBK" );
String report = request.getParameter( "raq" );
String reportFileHome=Context.getInitCtx().getMainDir();
StringBuffer param=new StringBuffer();
//保证报表名称的完整性
int iTmp = 0;
if( (iTmp = report.lastIndexOf(".raq")) <= 0 ){
report = report + ".raq";
iTmp = 0;
}
//12.2.14 gcl 统计查询下面报表改为使用存储过程统计
Enumeration paramNames = request.getParameterNames();
if (paramNames != null) {
while (paramNames.hasMoreElements()) {
String paramName = (String) paramNames.nextElement();
String paramValue = request.getParameter(paramName);
if (paramValue != null && !"".equals(paramValue)) {
param.append("p_"+paramName).append("=").append(paramValue).append(";");
}
}
}
String buryear=(String)session.getAttribute("buryear");
param.append("p_buryear").append("=").append(buryear).append(";");
String v_sql=(String)session.getAttribute("v_sql");
param.append("v_sql").append("=").append(v_sql).append(";");
//System.out.println(param);
//以下代码是检测这个报表是否有相应的参数模板
String paramFile = report.substring(0,iTmp)+"_arg.raq";
System.out.println(paramFile);
System.out.println(reportFileHome);
System.out.println(File.separator);
File f=new File(application.getRealPath(reportFileHome+ File.separator +paramFile));
System.out.println(reportFileHome+ File.separator +paramFile);
%>
<script type="text/javascript">
var ie5 = (document.all && document.getElementsByTagName);
var step = 0;
function setSB(v, el, inforEl, message) {
if (ie5 || document.readyState == "complete") {
filterEl = el.children[0];
valueEl = el.children[1];
if (filterEl.style.pixelWidth > 0) {
var filterBackup = filterEl.style.filter;
filterEl.style.filter = "";
filterEl.style.filter = filterBackup;
}
filterEl.style.width = v + "%";
valueEl.innerText = v + "%";
inforEl.innerText = message;
}
}
function setSBByStep(v, el, inforEl, message) {
if (ie5 || document.readyState == "complete") {
step = step + v;
filterEl = el.children[0];
valueEl = el.children[1];
if (filterEl.style.pixelWidth > 0) {
var filterBackup = filterEl.style.filter;
filterEl.style.filter = "";
filterEl.style.filter = filterBackup;
}
filterEl.style.width = step + "%";
valueEl.innerText = step + "%";
inforEl.innerText = message;
}
}
function fakeProgress(v, el) {
if (v >= 99) {
document.getElementById("aa").style.display="none";
document.getElementById("mainaa").style.display="block";
} else {
setSB(v, el, infor, " \u52a0\u8f7d\u4e2d\u2026\u2026");
window.setTimeout("fakeProgress(" + (v + 1) + ", document.all['" + el.id + "'])", 10);
}
} //-->
</script>
<body οnlοad="fakeProgress(0,sb)">
<DIV align=center id=aa>
<table width="691">
<td width="691" height="200">
</table>
<DIV align=center>
<DIV id=sb
style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BACKGROUND: #DCDCDC; WIDTH: 400px; BORDER-BOTTOM: #cccccc 1px solid; HEIGHT: 14px; TEXT-ALIGN: left">
<DIV id=sbChild1
style="FILTER: Alpha(Opacity = 0, FinishOpacity = 80, Style = 1, StartX = 0, StartY = 0, FinishX = 100, FinishY = 0); OVERFLOW: hidden; WIDTH: 100%; POSITION: absolute; HEIGHT: 12px">
<DIV style="BACKGROUND: #000000; WIDTH: 100%" hidden overflow:height:12px;></DIV>
</DIV>
<DIV
style="FONT-SIZE: 10px; WIDTH: 400px; COLOR: white; FONT-FAMILY: arial; POSITION: absolute; HEIGHT: 14px; TEXT-ALIGN: center"></DIV>
</DIV>
<P></P>
<DIV id=infor
style="FONT-SIZE: 11px; WIDTH: 100%; COLOR: #999999; FONT-FAMILY: arial; POSITION: relative; HEIGHT: 14px; TEXT-ALIGN: center"></DIV>
</DIV>
</DIV>
<div id=mainaa style="display: none;">
<jsp:include page="toolbar.jsp" flush="false" />
<table id=rpt align=center><tr><td>
<% //如果参数模板存在,则显示参数模板
if( f.exists() ) {
%>
<table id=param_tbl><tr><td>
<report:param name="form1" paramFileName="<%=paramFile%>"
needSubmit="no"
params="<%=param.toString()%>"
/>
</td>
<td><a href="javascript:_submit( form1 )"><img src="../images/query.jpg" border=no style="vertical-align:middle"></a></td>
</tr></table>
<% }
%>
<table align=center id="">
<tr><td>
<report:html name="report1" reportFileName="<%=report%>"
funcBarLocation=""
needPageMark="yes"
generateParamForm="no"
needLinkStyle="yes"
params="<%=param.toString()%>"
width="-1"
exceptionPage="/error.jsp"
/>
</td></tr>
</table>
<script language="javascript">
//设置分页显示值
document.getElementById( "t_page_span" ).innerHTML=report1_getTotalPage();
document.getElementById( "c_page_span" ).innerHTML=report1_getCurrPage();
function show_detail(orderId){
window.open("showReport.jsp?raq=order_detail.raq&orderid="+orderId,"_blank");
}
</script>
</td></tr></table></div>
</body>
</html>