刚学finereport报表,在项目中使用报错: 找不到数据连接 有人在项目中用过finereport吗 帮下忙啊

xiaomm627 2013-01-14 05:47:49
刚刚学习finereport,按照文档一步一步做了一个模版,模版做完后点击 “分页预览”能够正常访问模版文件。 然后我把做好的模版文件加载到javaWeb项目中,然后做了一个页面访问:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FineReport Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF_8" />
<script type="text/javascript" src="/WebReport/ReportServer?op=emb&resource=finereport.js"></script>
<link rel="stylesheet" type="text/css" href="/WebReport/ReportServer?op=emb&resource=finereport.css"/>
<script type='text/javascript'>
function doPrint(){
var url="http://localhost:8080/finereport/ReportServer?reportlet=";
url+=document.report.cpt.value;
var isPopUp = true;
var config = {'url' : url,'isPopUp' : isPopUp}
FR.doURLFlashPrint(config);
}
</script>
</head>
<body>
<form name="report">
<input id="cpt" type="checkbox" value="table1.cpt" />table1.cpt<br>
</form>
<input type=button name=doprint onclick=doPrint() value='doPrint'></input>
</body>
</html>


或者直接在浏览器中输入 http://localhost:8080/finereport/ReportServer?reportlet=table1.cpt
都会报错:找不到数据连接:con1(con1是我在制作模板时创建的连接)

我不明白了,明明在制作模版的时候都能够从数据库中正常访问到数据(不然模版也不能制作成功啊)并且点击"分页预览"的时候也能够正常显示图表数据,为什么嵌入到项目中就抱着个错误了呢?。。。 我初学finereport,也不是太明白,有哪位在项目中用过这款软件,帮帮忙忙啊。谢了哦~
...全文
801 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
huyongjin1104 2015-05-19
  • 打赏
  • 举报
回复
可以看finereport的帮助文档找找有没有答案,要是还不懂的话建议你到帆软论坛上提问,那边有好多高手和大神,肯定会有满意的答复的。
maicuitao126 2013-06-24
  • 打赏
  • 举报
回复 1
我也出现了同样的问题!顶!

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧