ireport 导出word格式
导出word格式 在它的文档中也没有,
// String sql = "select * from cfg_static_user_relation"; 如果传SQL语句的话用该句
String ReportModel ="/test/test.jasper";
File reportFile = new File(application.getRealPath(ReportModel));
System.out.println(reportFile);
if(!reportFile.exists())
throw new JRRuntimeException("报表绘制失败,找不到报表配置文件!");
JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());
// Connection conn=null;
// conn=JdbcConnectionFactory.getConnection();
Collection coll = UserService.generalCollecion();
JRDataSource sor = new JRBeanCollectionDataSource(coll);
System.out.println(application.getRealPath("test/1224215057359.png"));
Map parameters = new HashMap();
parameters.put("re",application.getRealPath("test/1224215057359.png"));
// JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport ,parameters,conn);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport ,parameters,sor);
JRExporter exporter = new JRRtfExporter();
String tmpFilename = System.currentTimeMillis() + ".doc";
response.setContentType("application/msword;charset=utf-8");
response.setHeader("Content-Disposition", "attachment; filename="+tmpFilename);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, response.getOutputStream());
exporter.exportReport();
这样就可以导出WORD格式了
--------------------------------------------------------------------------------
提问者对于答案的评价:
我的已经出来了‘
哎
我用的是金山的WSP办公
换了office的就可以了
jquery 怎么通过tableexport 将html导出pdf文件
tableExport是一个jQuery插件可以将HTML中表导出JSON、XML、PNG、CSV、TXT,SQL,MS-Word,Ms-Excel Ms-Powerpoint、PDF,功能相当强大。
谁有《jquery 基础教程》(Learning Jquery)的中文PDF版本啊?
来这里看看。http://ishare.iask.sina.com.cn/search.php?key=jquery+%BB%F9%B4%A1%BD%CC%B3%CC&format=
求jQuery基础教程第三版pdf
你可以通过下面这个w3school进行学习,快捷方便,看教程来的慢
最好的方法就是,边学边查,边用边查,用啥学上,上手很快,干学基础上手慢。
还用附件是jQuery的API查询非常方便,多看看,常用的了解了基本开发就没问题了。
使用jQuery的PDF查看器问题,怎么解决
jquery.media.js 插件实现在线预览PDF文件
代码:
[html]view plaincopy
<!DOCTYPEhtml>
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/>
<title>在线预览PDF文档</title>
<linkrel="stylesheet"href="bootstrap-3.3.7/css/bootstrap.min.css">
<scripttype="text/javascript"src="js/jquery.min.js"></script>
<scripttype="text/javascript"src="js/jquery.media.js"></script>
<scripttype="text/javascript">
$(function(){
$('a.media').media({width:800,height:600});
});
</script>
</head>
<body>
<center>
<divclass="panelpanel-primary">
<divclass="panel-heading"align="center">
<h2>预览pdf文件</h2>
</div>
<divclass="panel-body">
<aclass="media"href="yulan.pdf"></a>
</div>
</center>
</body>
</html>
- 截图:
Jquery怎么学?我现在边工作边自学,下点PDF自己看。。。不知道怎么学习快
关键是你自己的学习决心,如果PDf觉得枯燥,你可以下载视频学习,网络是最好的学习工具!
求JQuery UI 视频 教程或者完整PDF文档
http://jqueryui.com/ 这权威网站 虽然是英文的但绝对看的懂 我就是学的这里的教程
现在已经到1.92了 ,左边是一些方法 效果的教程学习,点击就是了 右上角是下载
view source 就是查看代码
下载下来后 解压
在你的工程里面考入
js 和 css文件即可
然后引用 注意你自己的地址
网路版. <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.8.3.js" type="text/javascript"></script> <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js" type="text/javascript"></script>
本地版
<link href="Styles/jquery-ui-1.9.2.custom.css" rel="stylesheet" type="text/css" /> <script src="Scripts/jquery-1.8.3.js" type="text/javascript"></script> <script src="Scripts/jquery-ui-1.9.2.custom.js" type="text/javascript"></script>
min 版
<script src="Scripts/jquery-1.8.3.js" type="text/javascript"></script> <script src="Scripts/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script> <link href="Styles/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css" />
jquery.media.js 怎么预览pdf文件
其实也就是简单的在浏览器中实现一个打开pdf文件,并有类似预览功能的边框。
其实在中国上经常见到类似的页面,在浏览器中打开pdf文档,可大部分都是由于版权的原因使用了一些很特殊的技术,自然很难模仿了。
即使有直接在浏览器打开的例子,也必须手动点击一下链接然后才能打开pdf文件。如何直接打开,而不用点击链接呢?
本以为自己对js很熟,也就使用js模拟点击,可就是不管用,没办法,只能在中国上继续寻找资料。最终想不到代码却很简单。
最主要的是使用到了一个jquery的插件jquery.media.js,使用这个插件就很容易实现了。
核心代码:
成因分析 使用jquery.media.js就可以直接把一个连接到pdf文件的链接打
转载请注明出处51数据库 » jqueryword转pdf Jquery可以导出word么
断魂少爷

