- 浏览: 1271706 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (896)
- spring4 (14)
- hibernate3 (26)
- spring2 (35)
- struts2 (55)
- struts1 (15)
- 设计模式 (15)
- java (172)
- mybatis3 (11)
- sql (17)
- mysql (13)
- jbpm (10)
- J2EE (45)
- tools (29)
- js (83)
- 数据结构 (13)
- Html (26)
- web (22)
- flex (33)
- Oracle (57)
- linux (49)
- 算法 (6)
- 其它 (12)
- easyui (1)
- bootstrap (13)
- xml (2)
- tomcat (1)
- redis (10)
- activemq (2)
- webservice (11)
- maven (2)
- springboot (1)
- ubuntu (1)
- python (14)
- rocketmq (1)
- springcloud (10)
- opencv (1)
最新评论
-
mike_eclipse:
Hashtable是线程不安全的吗?好像是线程安全的吧?
多线程之集合类 -
July01:
推荐用StratoIO打印控件,浏览器和系统的兼容性都很好,而 ...
lodop打印控件 -
xingcxb:
经过测试,假的,依旧会出现中文乱码!!!!store方法里面采 ...
java 读写Properties文件,不会出现中文乱码 -
tiger20111989:
...
Spring注解方式管理事务 -
zw7534313:
...
js 文字上下滚动 无间断循环显示
交叉报表crosstab:ireport3.0.0右键点击切换到交叉表设计页,首先增加一个dataset,查询sql如下:
select user_id_atte, to_char(attendance_time,'yyyy-mm-dd') attendance_time from t_attendance_time t where
t.ATTENDANCE_AVALID='Y'
and t.ATTENDANCE_TIME > to_date('2010-9-10','yyyy-mm-dd')
一个交叉报表实例:test.jrxml:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
name="crosstab2"
columnCount="1"
printOrder="Vertical"
orientation="Portrait"
pageWidth="595"
pageHeight="842"
columnWidth="535"
columnSpacing="0"
leftMargin="20"
rightMargin="20"
topMargin="20"
bottomMargin="20"
whenNoDataType="NoPages"
isTitleNewPage="false"
isSummaryNewPage="false">
<property name="ireport.scriptlethandling" value="0" />
<property name="ireport.encoding" value="UTF-8" />
<import value="java.util.*" />
<import value="net.sf.jasperreports.engine.*" />
<import value="net.sf.jasperreports.engine.data.*" />
<style
name="Crosstab Data Text"
isDefault="false"
hAlign="Center"
>
</style>
<subDataset name="dataset1" >
<queryString><![CDATA[select user_id_atte, to_char(attendance_time,'yyyy-mm-dd') attendance_time from
t_attendance_time t where t.ATTENDANCE_AVALID='Y'
and t.ATTENDANCE_TIME > to_date('2010-9-10','yyyy-mm-dd')]]></queryString>
<field name="USER_ID_ATTE" class="java.math.BigDecimal"/>
<field name="ATTENDANCE_TIME" class="java.lang.String"/>
</subDataset>
<queryString><![CDATA[select user_id,username from t_user]]></queryString>
<field name="USER_ID" class="java.math.BigDecimal"/>
<field name="USERNAME" class="java.lang.String"/>
<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="79" isSplitAllowed="true" >
<staticText>
<reportElement
x="232"
y="28"
width="100"
height="20"
key="staticText"/>
<box></box>
<textElement>
<font/>
</textElement>
<text><![CDATA[Static text]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="0" isSplitAllowed="true" >
</band>
</pageHeader>
<columnHeader>
<band height="0" isSplitAllowed="true" >
</band>
</columnHeader>
<detail>
<band height="0" isSplitAllowed="true" >
</band>
</detail>
<columnFooter>
<band height="0" isSplitAllowed="true" >
</band>
</columnFooter>
<pageFooter>
<band height="50" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now"
hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="232"
y="12"
width="80"
height="20"
key="textField"/>
<box></box>
<textElement textAlignment="Right">
<font/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+"
of"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report"
hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="312"
y="12"
width="40"
height="20"
key="textField"/>
<box></box>
<textElement>
<font/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]
></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="802" isSplitAllowed="true" >
<crosstab >
<reportElement
x="0"
y="0"
width="555"
height="802"
key="crosstab"/>
<crosstabDataset>
<dataset >
<datasetRun subDataset="dataset1">
<connectionExpression><![CDATA[$P
{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
</dataset>
</crosstabDataset>
<crosstabHeaderCell>
<cellContents mode="Transparent">
<box></box>
<rectangle>
<reportElement
x="0"
y="0"
width="70"
height="30"
key="rectangle-1"/>
<graphicElement stretchType="NoStretch"/>
</rectangle>
<line direction="TopDown">
<reportElement
x="0"
y="1"
width="70"
height="28"
key="line-1"/>
<graphicElement stretchType="NoStretch"/>
</line>
<staticText>
<reportElement
x="45"
y="3"
width="22"
height="12"
key="staticText-1"/>
<box></box>
<textElement>
<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[日期]]></text>
</staticText>
<staticText>
<reportElement
x="2"
y="16"
width="27"
height="11"
key="staticText-1"/>
<box></box>
<textElement>
<font pdfFontName="Helvetica-Bold" size="8" isBold="true"/>
</textElement>
<text><![CDATA[用户 id]]></text>
</staticText>
</cellContents>
</crosstabHeaderCell> <rowGroup
name="USER_ID_ATTE" width="70" totalPosition="End">
<bucket>
<bucketExpression class="java.math.BigDecimal"><![CDATA[$F
{USER_ID_ATTE}]]></bucketExpression>
</bucket>
<crosstabRowHeader>
<cellContents backcolor="#F0F8FF" mode="Opaque">
<box> <pen lineWidth="0.5"
lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now"
hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
style="Crosstab Data Text"
x="0"
y="0"
width="70"
height="25"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{USER_ID_ATTE}]]
></textFieldExpression>
</textField>
</cellContents>
</crosstabRowHeader>
<crosstabTotalRowHeader>
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box> <pen lineWidth="0.5"
lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<staticText>
<reportElement
x="0"
y="0"
width="70"
height="25"
key="staticText"/>
<box></box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font/>
</textElement>
<text><![CDATA[Total USER_ID_ATTE]]></text>
</staticText>
</cellContents>
</crosstabTotalRowHeader>
</rowGroup>
<columnGroup name="ATTENDANCE_TIME" height="30" totalPosition="End"
headerPosition="Center">
<bucket>
<bucketExpression class="java.lang.String"><![CDATA[$F
{ATTENDANCE_TIME}]]></bucketExpression>
</bucket>
<crosstabColumnHeader>
<cellContents backcolor="#F0F8FF" mode="Opaque">
<box> <pen lineWidth="0.5"
lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now"
hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
style="Crosstab Data Text"
x="0"
y="0"
width="67"
height="30"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$V{ATTENDANCE_TIME}]]
></textFieldExpression>
</textField>
</cellContents>
</crosstabColumnHeader>
<crosstabTotalColumnHeader>
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box> <pen lineWidth="0.5"
lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<staticText>
<reportElement
x="0"
y="0"
width="72"
height="30"
key="staticText"/>
<box></box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font/>
</textElement>
<text><![CDATA[Total ]]></text>
</staticText>
</cellContents>
</crosstabTotalColumnHeader>
</columnGroup>
<measure name="USER_ID_ATTEMeasure" class="java.math.BigDecimal"
calculation="Count">
<measureExpression><![CDATA[$F{USER_ID_ATTE}]]
></measureExpression>
</measure>
<crosstabCell width="68" height="25">
<cellContents mode="Transparent">
<box> <pen lineWidth="0.5"
lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now"
hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
style="Crosstab Data Text"
x="0"
y="0"
width="67"
height="25"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V
{USER_ID_ATTEMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="68" height="25" rowTotalGroup="USER_ID_ATTE">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box> <pen lineWidth="0.5"
lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now"
hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
style="Crosstab Data Text"
x="0"
y="0"
width="67"
height="25"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V
{USER_ID_ATTEMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="73" height="25" columnTotalGroup="ATTENDANCE_TIME">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box> <pen lineWidth="0.5"
lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now"
hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
style="Crosstab Data Text"
x="0"
y="0"
width="72"
height="25"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V
{USER_ID_ATTEMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="73" height="25" rowTotalGroup="USER_ID_ATTE"
columnTotalGroup="ATTENDANCE_TIME">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box> <pen lineWidth="0.5"
lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now"
hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
style="Crosstab Data Text"
x="0"
y="0"
width="72"
height="25"
key="textField"/>
<box></box>
<textElement verticalAlignment="Middle">
<font/>
</textElement>
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V
{USER_ID_ATTEMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<whenNoDataCell>
<cellContents mode="Transparent">
<box> <pen lineWidth="0.5"
lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
</cellContents>
</whenNoDataCell> </crosstab>
</band>
</summary>
</jasperReport>
发表评论
-
powerdesiner 12.5 的使用
2011-05-25 16:38 1387使用powerdesigner,首先,CDM中使用Entit ... -
eclipse 常用快捷键
2011-05-17 23:05 13991.ctrl+shift+/ 多行注释2.ctrl+/ ... -
ireport注意事项
2010-09-27 15:42 2127iReport 软件的版本号和Ja ... -
ireport Variable 变量的使用
2010-09-26 15:03 3534在ireport3.0.0设计中使用变量Variable: ... -
四个强大的在线Excel
2010-09-19 09:07 1986EditGrid在线excel,很强大的查看地址:http:/ ... -
FLV在线播放器插件
2010-09-01 14:27 1179在线播放器插件 http://fxz-2008.iteye.c ... -
sun IT认证
2010-07-29 10:56 927http://shop58987196.taobao.com/ ... -
网上很好的安装软件
2010-06-24 09:38 1050http://www.xp155.com/xp/2505.ht ... -
条形码字体
2010-05-20 13:13 1369条形码字体:这个文件拷贝到 C:\windows\fonts目 ... -
推荐十几款Firefox web开发插件
2010-02-05 16:38 921http://www.cnblogs.com/psunny/a ... -
myeclipse console没有显示
2010-01-29 09:56 1680将Console中的“Open Console”切换成“Jav ... -
powerdesigner (2)
2010-01-27 14:11 1053在powerdesigner里生成java的getter/se ... -
powerdesigner 与 Oracle
2010-01-27 13:47 996alter table T_WORDS add const ... -
powerdesigner
2010-01-24 15:56 1281在PowerDesigner的Physical Model d ... -
Sothink SWF Decompiler 反编译swf
2009-11-18 09:55 1598http://www.baihh.cn/ruanjian/fb ... -
iWebOffice
2009-11-02 10:28 1641浏览器窗口中直接编辑Word、Excel、PowerPoint ... -
如何让IE浏览器提示下载文件,而不是直接打开Excel文件
2009-09-25 11:34 3452http://hi.baidu.com/yaoyaopijia ... -
px 改变图片大小
2009-09-25 09:52 1352http://blog.sina.com.cn/s/blog_ ... -
ps 8.0免激活
2009-09-24 18:05 1042http://www.it.com.cn/f/edu/051/ ... -
Google Maps API编程资源大全
2009-09-24 12:47 922http://hi.baidu.com/ls%5Fmcx/bl ...
相关推荐
将iReport.jar拷贝到ireport3.0安装目录的lib下面。重启ireport3.0
这个是最新iReport3.0开源报表的整理好的汉化文件库,基本上是全汉化了,由于上传限制分卷压缩的,这个是分卷1,请下载完成后下载分卷2,解压后把这个文件的iReport.jar放到iReport\lib替换原文件就可以了,原程序...
iReport3.0使用说明,PDF打印设置
使用IREPORT3.0产生二维码 可以用于JAVA技术
ireport实现普通报表、交叉报表、分组报表,数据源使用jdbc方式
ireport3.0安装文件,ireport3.0安装文件,ireport3.0安装文件
iReport报表设计器,是一个能够设计复杂报表的开源项目。它就基于LGPL协议提交的,它100%使用Java语言编写。是目前全球最为流行的开源报表设计器。 以下是iReport一些比较突出的功能: 拖拽式,所见即所得的报表编辑...
ireport 3.0 中文教材,包含开源报表工具的使用,和开发指南
这个是iReport3.0开源报表的整理好的汉化文件库,基本上是全汉化了,由于上传限制分卷压缩的,这个是分卷2,请下载分卷1的继续下载这个包,解压后把这个文件的iReport.jar放到iReport\lib替换原文件就可以了,希望对...
在做交叉报表时,使用crosstab控件,可是一般都是按照id或其他描述进行排序,如果想把“合计”放最下面就遇到麻烦了。
关于ireport交叉报表的一些信息,里面描述了用ireport 怎样制作交叉报表。
Ireport3.0最新中文版图文教程(一).pdf
iReport 和 Jasperreport整合开发web报表向导
ireport开发crosstab从基础到进阶详细教程。 包含本人报表项目实践经验总结。 尤其对于开发HTML显示的交叉报表大有用处。
非常好用的一款报表设计软件,解压就可以直接使用 分4部分
Ireport 用子报表调用交叉报表,有问题可留言!
ireport交叉报表.doc
使用iReport创建新Report的手顺。
iReport 报表、子报表、主从报表、合计、实例解析1. 开发使用步骤(iReport4.1)... 2 4.1. JasperReport 和iReport的介绍... 2 4.1.1. JasperReport 简介... 3 4.1.2. iReport 简介... 3 4.1.2.1. iReport几个重要...
iReport-3.0.0,用来制作报表的开发工具,希望对你们有用