生成html页面的代码如下:调试完成,欢迎探讨。
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="net.sf.jasperreports.engine.*" %>
<%@ page import="net.sf.jasperreports.engine.util.*" %>
<%@ page import="net.sf.jasperreports.engine.export.*" %>
<%@ page import="net.sf.jasperreports.j2ee.servlets.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.io.File" %>
<%@ page import="java.sql.*"%>
<jsp:useBean id="hashtable" class="java.util.Hashtable" scope="request"/>
<%
String rpt_id="",branch_id="",jasper_name="",user_id="",REPORT_STS_ID="",srpt_id="",item_id="";
if(hashtable!=null){
if(hashtable.get("rpt_id")!=null){
rpt_id=(String) hashtable.get("rpt_id");
System.out.println(rpt_id);
}
if(hashtable.get("branch_id")!=null){
branch_id=(String) hashtable.get("branch_id");
System.out.println(branch_id);
}
if(hashtable.get("user_id")!=null){
user_id=(String) hashtable.get("user_id");
}
if(hashtable.get("jasper_name")!=null){
jasper_name=(String)hashtable.get("jasper_name");
System.out.println(jasper_name);
}
else{
动态编译jrxml文件生成html报表收藏
最新推荐文章于 2024-08-31 21:49:18 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)