??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美中文字幕在线视频,亚洲三级精品,超碰免费在线播放 http://www.aygfsteel.com/three-3/游离中!Q! zh-cn Tue, 17 Jun 2025 05:38:33 GMT Tue, 17 Jun 2025 05:38:33 GMT 60 解决Jasperreport的web 套打 http://www.aygfsteel.com/three-3/archive/2010/07/27/327184.html杨慕 杨慕 Tue, 27 Jul 2010 01:24:00 GMT http://www.aygfsteel.com/three-3/archive/2010/07/27/327184.html http://www.aygfsteel.com/three-3/comments/327184.html http://www.aygfsteel.com/three-3/archive/2010/07/27/327184.html#Feedback 5 http://www.aygfsteel.com/three-3/comments/commentRss/327184.html http://www.aygfsteel.com/three-3/services/trackbacks/327184.html 阅读全文 ]]> 解决Jasperreport的web打印另一U方?/title> http://www.aygfsteel.com/three-3/archive/2010/06/24/324329.html杨慕 杨慕 Thu, 24 Jun 2010 05:08:00 GMT http://www.aygfsteel.com/three-3/archive/2010/06/24/324329.html http://www.aygfsteel.com/three-3/comments/324329.html http://www.aygfsteel.com/three-3/archive/2010/06/24/324329.html#Feedback 21 http://www.aygfsteel.com/three-3/comments/commentRss/324329.html http://www.aygfsteel.com/three-3/services/trackbacks/324329.html 打印是利用applet的来打印的。而且q需要客L安装 十几MB?jre 关于q个好坏Q每个h都有自己的看法。今天我q里要说的是利用jatoolsprinter 控g来打印jasperreport的报表。控件大只?00k左右 关于jasperreport的报表制作这里不做说明,我是在环境中跑了下jasperreport的demoq行界面如下
q行JSP Example 如下?br />
下面我们对demo中的html.jspq行修改 ?a target="_blank">jatoolsprinter 来打印Jasperreport 的报?br />
蓝色部分为控仉要的内容
<%@ page contentType="text/html; charset=gb2312" language="java" %>
<%@ page errorPage="error.jsp" %>
<%@ page import="datasource.*" %>
<%@ 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.*" %>
<html>
<head>
<!-- 插入打印控g -->
<OBJECT ID="jatoolsPrinter" CLASSID="CLSID:B43D3361-D975-4BE2-87FE-057188254255"
codebase="jatoolsPrinter.cab#version=5,3,0,0"></OBJECT>
</head>
<script type="text/javascript">
function doPrint(how)
{
//打印文对象
var myDoc ={
documents: document, // 打印面(div)们在本文中
copyrights : '杰创软g拥有版权 [url=]www.jatools.com' [/url] // 版权声明,必须
};
// 调用打印Ҏ
if(how == '打印预览 ...')
jatoolsPrinter.printPreview(myDoc,true ); // 打印预览
else if(how == '打印...')
jatoolsPrinter.print(myDoc ,true); // 打印前弹出打印设|对话框
else
jatoolsPrinter.print(myDoc ,false); // 不弹出对话框打印
}
</script>
<body>
<br>
<input type="button" value="打印预览...">
<input type="button" value="打印...">
<input type="button" value="打印">
<br>
<%
File reportFile = new File(application.getRealPath("/reports/WebappReport.jasper"));
if (!reportFile.exists())
throw new JRRuntimeException("File WebappReport.jasper not found. The report design must be compiled first.");
JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());
Map parameters = new HashMap();
parameters.put("ReportTitle", "Address Report");
parameters.put("BaseDir", reportFile.getParentFile());
JasperPrint jasperPrint =
JasperFillManager.fillReport(
jasperReport,
parameters,
new WebappDataSource()
);
JRHtmlExporter exporter = new JRHtmlExporter();
session.setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, jasperPrint);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "../servlets/image?image=");
exporter.exportReport();
%>
</body>
</html>
因ؓjatoolsprinter 的打印是Ҏ<div id='page'+数字>来区分打印的늚。而Jasperreport生成的html面中又没有包含q些信息Q所以我们就需要修改下Jasperreport的源?br />
q成的报表面的源码中我们可以看到Jasperreport是利?lt;a name="JR_PAGE_ANCHOR_?_?"></a>来区分页数的我们可以扑ֈpackage net.sf.jasperreports.engine.export 下的JRHtmlExporter.java 扑ֈ代码中的exportReportToWriter Ҏ里的如下片段
writer.write("<a name=\"" + JR_PAGE_ANCHOR_PREFIX + reportIndex + "_" + (pageIndex + 1) + "\"></a>\n");
在这D代码之后加?/font>
writer.write("<div id='page"+ (pageIndex + 1)+"'>\n");
然后扑ֈ源码中的
exportPage(page);
在他之后加上div的结束标?/font>
writer.write("</div>\n");
以上代码蓝色部分为后d的内?/font>
修改之后的代码如?/font>
writer.write("<a name=\"" + JR_PAGE_ANCHOR_PREFIX + reportIndex + "_" + (pageIndex + 1) + "\"></a>\n");
writer.write("<div id='page"+ (pageIndex + 1)+"'>\n");
/* */
exportPage(page);
writer.write("</div>\n");
修改完这些之后我们就?font color="#0000ff">jatoolsPrinter.cab 攑֜目中html.jsp
<OBJECT ID="jatoolsPrinter" CLASSID="CLSID:B43D3361-D975-4BE2-87FE-057188254255"
codebase="jatoolsPrinter.cab#version=5,3,0,0"></OBJECT>
codebase指定的位|这里指定的是和html.jsp同一路径
现在打开IE q行 demo
W一ơ运行会提示安装jatoolsprinter控g 选择安装ActiveX控g
点击安装
点击打印预览效果 如下
到此可以在web面中直接打印Jasperreport 报表了?br />
]]> ?JOR)Q开源报表工?/title> http://www.aygfsteel.com/three-3/archive/2009/10/23/299451.html杨慕 杨慕 Fri, 23 Oct 2009 02:32:00 GMT http://www.aygfsteel.com/three-3/archive/2009/10/23/299451.html http://www.aygfsteel.com/three-3/comments/299451.html http://www.aygfsteel.com/three-3/archive/2009/10/23/299451.html#Feedback 8 http://www.aygfsteel.com/three-3/comments/commentRss/299451.html http://www.aygfsteel.com/three-3/services/trackbacks/299451.html 阅读全文 ]]> JAVA报表 http://www.aygfsteel.com/three-3/articles/228184.html杨慕 杨慕 Wed, 10 Sep 2008 08:36:00 GMT http://www.aygfsteel.com/three-3/articles/228184.html http://www.aygfsteel.com/three-3/comments/228184.html http://www.aygfsteel.com/three-3/articles/228184.html#Feedback 0 http://www.aygfsteel.com/three-3/comments/commentRss/228184.html http://www.aygfsteel.com/three-3/services/trackbacks/228184.html 最q一D|间一直在接触报表的制作,Ҏ杰表用户手册上的例子做了一些报表,下面LCZ?/span>有时候我们的报表需要对某一字段的数据用囄直观的表C出来,q个时候就需要用C天所涉及到的功能?br />
以上囄展示的是把金额的值和数据集中最大的值做比较之后得到的比例。根据需要也可以做成在所有数据中所占比重。这些就因需求自行设计。下面我们来看下做出此效果的具体步骤?br />
1 Q首先取得一个数据集?br />
2 Q在杰表设计器中对表单进行设计。添加一列写上需要显C的名称。此处ؓ金额比例
3 Q在修改的单元格内再加上一?/span>Label
标签 (Label) 对象的父对象Q是板( Panel Q,?/span>(Panel) 对象的父对象是行板( RowPanel Q,行板Q?/span>RowPanel Q的父对象是表( Table Q,表( Table Q的父对象是主?/span>(PagePanel) Q页M的父对象是页 (Page) 对象Q由此可知,报表对象之间是存在层ơ关pȝQ?/span>
4 Q这时候就需要在 Label 的打印前事gQ?/span>beforePrint Q加上以下代码这是本例的关键?/span>
me.width=((int)(100.0*$. 金额 /$.parent. 金额 .max()));
me.setWidth((int)(100.0 * $. 数量 / $.parent. 数量 .max()));
此处公式是金额和最大金额相除之后的比例?/span>
至于代码完全可以Ҏ自己的需要设定他们的q算关系Q在公式定义里杰表去除了很多语法U束Q让我们完全可以灉|的操作?/span>
me.width=100*(int)(0+$. 金额 )/(int)(0+$.parent. 金额 .sum())
q段公式表示的是金额和所有金额d的比例?/span>
然后保存模板可以预览到效果了?/span>
]]>[导入]Tomcat中Context容器配置详解 http://www.aygfsteel.com/three-3/articles/228281.html杨慕 杨慕 Tue, 02 Sep 2008 08:26:00 GMT http://www.aygfsteel.com/three-3/articles/228281.html http://www.aygfsteel.com/three-3/comments/228281.html http://www.aygfsteel.com/three-3/articles/228281.html#Feedback 0 http://www.aygfsteel.com/three-3/comments/commentRss/228281.html http://www.aygfsteel.com/three-3/services/trackbacks/228281.html Context元素代表一个web应用Q运行在某个特定的虚拟主Z。如Servlet Specification 2.2或以后版本中描述的那P每个web应用Z一个Web Application Archive(WAR)文gQ或者是一个目录,包含WAR文g解压后的内容。有关Web Application Archive的更多信息,可以参考Servlet Specification和Tomcat 应用E序开发者指南?
通过请求URI的最长可能前~与每个Context的context路径q行匚wQCatalina选择相应的web 应用处理HTTPh。一旦选定Q根据web application deployment descriptor 文g中定?/font> 阅读全文
cdQ?/b>Tomcat 查看评论 文章来源:http://hi.baidu.com/three%5Funcle/blog/item/a21b49ef93abcf30adafd504.html ]]> [导入]keep-generated-actionscript=true http://www.aygfsteel.com/three-3/articles/228282.html杨慕 杨慕 Wed, 06 Aug 2008 01:57:00 GMT http://www.aygfsteel.com/three-3/articles/228282.html http://www.aygfsteel.com/three-3/comments/228282.html http://www.aygfsteel.com/three-3/articles/228282.html#Feedback 0 http://www.aygfsteel.com/three-3/comments/commentRss/228282.html http://www.aygfsteel.com/three-3/services/trackbacks/228282.html 选择工程>属?然后在对话框左侧选择 Flex Complier,在additional compiler argument中加?---------Qkeep-generated-actionscript=true)
-locale en_US -keep-generated-actionscript=true友情提醒-locale en_US?keep-generated-actionscript=true中间有个I格。就q个I格害的我弄了一早上。。?/p>
cdQ?/b>Flex 查看评论 文章来源:http://hi.baidu.com/three%5Funcle/blog/item/3e82db82985beaa40df4d2cd.html ]]>
[导入]Flex中利用自定义Ҏ供源在ComboBox下拉菜单中显CZ同字体的例子 http://www.aygfsteel.com/three-3/articles/228283.html杨慕 杨慕 Wed, 06 Aug 2008 01:26:00 GMT http://www.aygfsteel.com/three-3/articles/228283.html http://www.aygfsteel.com/three-3/comments/228283.html http://www.aygfsteel.com/three-3/articles/228283.html#Feedback 0 http://www.aygfsteel.com/three-3/comments/commentRss/228283.html http://www.aygfsteel.com/three-3/services/trackbacks/228283.html
<? xml version = " 1.0 " encoding 阅读全文
cdQ?/b>Flex 查看评论 文章来源:http://hi.baidu.com/three%5Funcle/blog/item/142226c2f0c9e81d0ff477f0.html ]]> [导入]FLEX 拖放数据2 http://www.aygfsteel.com/three-3/articles/228284.html杨慕 杨慕 Wed, 30 Jul 2008 08:22:00 GMT http://www.aygfsteel.com/three-3/articles/228284.html http://www.aygfsteel.com/three-3/comments/228284.html http://www.aygfsteel.com/three-3/articles/228284.html#Feedback 0 http://www.aygfsteel.com/three-3/comments/commentRss/228284.html http://www.aygfsteel.com/three-3/services/trackbacks/228284.html <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml " layout="absolute ">
<mx:Script>
阅读全文
cdQ?/b>Flex 查看评论 文章来源:http://hi.baidu.com/three%5Funcle/blog/item/21a7111383f8e2866438db27.html ]]> [导入]FLEX 拖放数据 http://www.aygfsteel.com/three-3/articles/228285.html杨慕 杨慕 Wed, 30 Jul 2008 08:21:00 GMT http://www.aygfsteel.com/three-3/articles/228285.html http://www.aygfsteel.com/three-3/comments/228285.html http://www.aygfsteel.com/three-3/articles/228285.html#Feedback 0 http://www.aygfsteel.com/three-3/comments/commentRss/228285.html http://www.aygfsteel.com/three-3/services/trackbacks/228285.html <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml " layout="absolute ">
<mx:Script>
阅读全文
cdQ?/b>Flex 查看评论 文章来源:http://hi.baidu.com/three%5Funcle/blog/item/b4c91c2fe28c003e1e308926.html ]]> [导入]FLEX 树型xmld与删?/title> http://www.aygfsteel.com/three-3/articles/228286.html杨慕 杨慕 Wed, 30 Jul 2008 08:01:00 GMT http://www.aygfsteel.com/three-3/articles/228286.html http://www.aygfsteel.com/three-3/comments/228286.html http://www.aygfsteel.com/three-3/articles/228286.html#Feedback 0 http://www.aygfsteel.com/three-3/comments/commentRss/228286.html http://www.aygfsteel.com/three-3/services/trackbacks/228286.html <?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml " viewSourceURL="src/index.html ">
<mx:Script>
阅读全文
cdQ?/b>Flex 查看评论 文章来源:http://hi.baidu.com/three%5Funcle/blog/item/685b2964c13b50f6f6365455.html ]]>
վ֩ģ壺
|
|
ī |
|
|
IJ |
Ű |
|
Ӽ |
|
촨 |
ɽ |
˫ |
|
Զ |
|
|
|
|
ʤ |
|
|
|
º |
|
ʮ |
|
³ľ |
|
|
|
|
ͼ |
|
|
ƽ |
|
|
|
˴ |
Զ |