- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是新来的 iReport
.所以我想根据数据做一个简单的报告。
我的问题是,当我的行小于细节带的大小时,整个表会在细节带中重复,我不想再重复了。如果我的行大约是 5,那么同一个表会在详细信息带中复制 4 次,不仅是表,而且是我放在详细信息带中的每一件事。它会不断重复,直到细节带限制到来。
所以我是不是犯了一些错误,或者我必须在 iReport
中设置细节带的一些属性?
请帮助我的 friend 。提前致谢。
这是生成的结果:
这是我的 jrxml 代码:
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport language="groovy" bottomMargin="20" topMargin="20" rightMargin="20" leftMargin="20" columnWidth="555"
whenNoDataType="AllSectionsNoDetail" pageHeight="842" pageWidth="595" name="test"
xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jasperreports.sourceforge.net/jasperreports">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="table">
<box>
<pen lineColor="#000000" lineWidth="1.0"/>
</box>
</style>
<style name="table_TH" backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table_CH" backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table_TD" backcolor="#FFFFFF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 1">
<box>
<pen lineColor="#000000" lineWidth="1.0"/>
</box>
</style>
<style name="table 1_TH" backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 1_CH" backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 1_TD" backcolor="#FFFFFF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 2">
<box>
<pen lineColor="#000000" lineWidth="1.0"/>
</box>
</style>
<style name="table 2_TH" backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 2_CH" backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 2_TD" backcolor="#FFFFFF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 3">
<box>
<pen lineColor="#000000" lineWidth="1.0"/>
</box>
</style>
<style name="table 3_TH" backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 3_CH" backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 3_TD" backcolor="#FFFFFF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 4">
<box>
<pen lineColor="#000000" lineWidth="1.0"/>
</box>
</style>
<style name="table 4_TH" backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 4_CH" backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 4_TD" backcolor="#FFFFFF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 5">
<box>
<pen lineColor="#000000" lineWidth="1.0"/>
</box>
</style>
<style name="table 5_TH" backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 5_CH" backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<style name="table 5_TD" backcolor="#FFFFFF" mode="Opaque">
<box>
<pen lineColor="#000000" lineWidth="0.5"/>
</box>
</style>
<subDataset name="a">
<parameter name="sem" class="java.lang.String">
<defaultValueExpression>
<![CDATA[]]>
</defaultValueExpression>
</parameter>
<queryString>
<![CDATA[select final."M" as "ENROLLMENT",sem_batch.sem,sem_batch.batch,final."N" as "TTL_WKDY",final."O" as "PRESENT",round(((100*"O")/"N"),2) as "PERCENTAGE" from sem_batch, (select m."Std_id" as "M",l."Batch" as "L",l."Btch" as "N",m."Std" as "O" from (select count(b.batch_id) as "Btch",b.batch_id as "Batch" from batch_wkday b where b.batch_id like $P{sem} group by batch_id) l, (select count(a.std_id) as "Std",a.std_id as "Std_id",s.batch_id as "Batch" from attendance a,student_detail s where a.std_id=s.std_id and s.batch_id like $P{sem} group by a.std_id,s.batch_id) m where l."Batch"=m."Batch") final where final."L"=sem_batch.batch_id]]>
</queryString>
<field name="ENROLLMENT" class="java.math.BigDecimal"/>
<field name="SEM" class="java.math.BigDecimal"/>
<field name="BATCH" class="java.lang.String"/>
<field name="TTL_WKDY" class="java.math.BigDecimal"/>
<field name="PRESENT" class="java.math.BigDecimal"/>
<field name="PERCENTAGE" class="java.math.BigDecimal"/>
<group name="ENROLLMENT">
<groupExpression>
<![CDATA[$F{ENROLLMENT}]]>
</groupExpression>
</group>
</subDataset>
<parameter name="SEM" class="java.lang.String"/>
<queryString>
<![CDATA[select * from sem_batch]]>
</queryString>
<field name="SEM" class="java.math.BigDecimal"/>
<field name="BATCH" class="java.lang.String"/>
<field name="BATCH_ID" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band splitType="Stretch" height="69">
<staticText>
<reportElement height="53" width="421" y="0" x="68"/>
<textElement markup="none" textAlignment="Center">
<font size="22"/>
</textElement>
<text>
<![CDATA[ATTENDANCE - CLASS ]]>
</text>
</staticText>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band splitType="Stretch" height="61">
<staticText>
<reportElement height="20" width="53" y="0" x="0"/>
<textElement>
<font size="12"/>
</textElement>
<text>
<![CDATA[SEM]]>
</text>
</staticText>
<staticText>
<reportElement height="20" width="53" y="20" x="0"/>
<textElement>
<font size="12"/>
</textElement>
<text>
<![CDATA[DATE]]>
</text>
</staticText>
<staticText>
<reportElement height="20" width="10" y="0" x="58"/>
<textElement/>
<text>
<![CDATA[:]]>
</text>
</staticText>
<staticText>
<reportElement height="20" width="10" y="20" x="58"/>
<textElement/>
<text>
<![CDATA[:]]>
</text>
</staticText>
<textField pattern="dd/MM/yyyy">
<reportElement height="20" width="100" y="20" x="68"/>
<textElement/>
<textFieldExpression>
<![CDATA[new java.util.Date()]]>
</textFieldExpression>
</textField>
<textField>
<reportElement height="20" width="100" y="0" x="68"/>
<textElement/>
<textFieldExpression>
<![CDATA[$P{SEM}]]>
</textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band splitType="Stretch" height="125">
<componentElement>
<reportElement height="50" width="360" y="0" x="35" style="table 5" key="table 5"/>
<jr:table
xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"
xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components">
<datasetRun subDataset="a">
<datasetParameter name="sem">
<datasetParameterExpression>
<![CDATA[$P{SEM}+'%']]>
</datasetParameterExpression>
</datasetParameter>
<connectionExpression>
<![CDATA[$P{REPORT_CONNECTION}]]>
</connectionExpression>
</datasetRun>
<jr:column width="118">
<jr:columnHeader height="23" style="table 5_CH" rowSpan="1">
<staticText>
<reportElement height="20" width="118" y="0" x="0"/>
<textElement textAlignment="Center">
<font size="14" isBold="false"/>
</textElement>
<text>
<![CDATA[ENROLLMENT]]>
</text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="20" style="table 5_TD" rowSpan="1">
<textField>
<reportElement height="20" width="118" y="0" x="0"/>
<textElement textAlignment="Center">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression>
<![CDATA[$F{ENROLLMENT}]]>
</textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90">
<jr:columnHeader height="23" style="table 5_CH" rowSpan="1">
<staticText>
<reportElement height="20" width="90" y="0" x="0"/>
<textElement textAlignment="Center">
<font size="14"/>
</textElement>
<text>
<![CDATA[SEM]]>
</text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="20" style="table 5_TD" rowSpan="1">
<textField>
<reportElement height="20" width="90" y="0" x="0"/>
<textElement textAlignment="Center">
<font size="10"/>
</textElement>
<textFieldExpression>
<![CDATA[$F{SEM}]]>
</textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90">
<jr:columnHeader height="23" style="table 5_CH" rowSpan="1">
<staticText>
<reportElement height="20" width="90" y="0" x="0"/>
<textElement textAlignment="Center">
<font size="14"/>
</textElement>
<text>
<![CDATA[BATCH]]>
</text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="20" style="table 5_TD" rowSpan="1">
<textField>
<reportElement height="20" width="90" y="0" x="0"/>
<textElement textAlignment="Center"/>
<textFieldExpression>
<![CDATA[$F{BATCH}]]>
</textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90">
<jr:columnHeader height="23" style="table 5_CH" rowSpan="1">
<staticText>
<reportElement height="20" width="90" y="0" x="0"/>
<textElement textAlignment="Center">
<font size="14"/>
</textElement>
<text>
<![CDATA[PRESENT]]>
</text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="20" style="table 5_TD" rowSpan="1">
<textField>
<reportElement height="20" width="90" y="0" x="0"/>
<textElement textAlignment="Center"/>
<textFieldExpression>
<![CDATA[$F{PRESENT}]]>
</textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90">
<jr:columnHeader height="23" style="table 5_CH" rowSpan="1">
<staticText>
<reportElement height="20" width="90" y="0" x="0"/>
<textElement textAlignment="Center">
<font size="14"/>
</textElement>
<text>
<![CDATA[PERCENTAGE]]>
</text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="20" style="table 5_TD" rowSpan="1">
<textField>
<reportElement height="20" width="90" y="0" x="0"/>
<textElement textAlignment="Center"/>
<textFieldExpression>
<![CDATA[$F{PERCENTAGE}]]>
</textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band splitType="Stretch" height="54">
<textField>
<reportElement height="20" width="100" y="16" x="227"/>
<textElement textAlignment="Center"/>
<textFieldExpression>
<![CDATA[$V{PAGE_NUMBER}]]>
</textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band splitType="Stretch" height="42"/>
</summary>
</jasperReport>
最佳答案
你应该把 table
组件进入 Title
频带(或进入 Summary
频带,例如)。不进 Detail
乐队。
关于jasper-reports - iReport:在详细信息带中获取表的多个副本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9815780/
目录 进程 其他相关概念 创建线程的两种方式 为什么使用start()方法而不直接使用run()方法 start()方法底层
CURL状态码列表 状态码 状态原因 解释 0 正常访问
ODBC连接类函数 odbc_connect函数:打开一个ODBC连接 odbc_close函数:关闭一个已经打开的ODBC连接 odbc_close_all函数:关闭所有已经打开的ODBC连
作为标题,如何计算从纪元1900到现在使用boost的持续时间? 编辑:很抱歉以前的问题太短。我将再次描述我的问题。 我有关于将生日另存为整数的问题。我创建了四个函数,用法如下: ptime转换为整数
前言 在Java中,有一个常被忽略 但 非常重要的关键字Synchronized今天,我将详细讲解 Java关键字Synchronized的所有知识,希望你们会喜欢 目录 1. 定义 J
详细 JVM 垃圾收集日志的时间戳是收集的开始还是结束? 2016-08-09T21:04:19.756-0400: 224890.317: [GC Desired survivor size 167
我在“Master-Detail”概念上苦苦挣扎,除了一点点(但很重要)的细微差别外,几乎所有东西都按预期工作。我应该在 Storyboard上更改什么以在详细信息 View (屏幕截图底部的右上角)
我希望能够显示表格的详细 View ,但不推送新屏幕,而只显示表格所在的详细 View 。 设置它的最佳方式是什么......如果真的可行的话? ---------------------------
我在我的博客中为我的帖子使用了详细 View ,每篇帖子都有评论,所以我想对它们进行分页,但我不知道该怎么做,因为我请求了帖子模型。我知道如何在功能 View 中执行此操作,但不知道如何在详细 Vie
在下面的代码中,与 pm 对齐,该行是否会 move 整个内存并将其分配给 pm,或者它只会 move p 指向的内存而不是整个数组? int main() { int*
1·下载 https://dev.mysql.com/downloads/mysql/ 2·安装服务 1)管理员运行cmd 2)D: 3)cd D:\mysql
今天以前一直用的SQL Server 2005做开发,偶尔也用MySQL,现入手公司项目,用到SQL Server 2008,于是乎必须安装它,免得出现其他很纠结的小问题,现将自己安装图解分享如下:
1. crontab命令选项 复制代码 代码如下: #crontab -u <-l, -r, -e> -u指定一个用
我们有一个 WPF 应用程序,它有一个主窗口/详细信息窗口,两者都是 WPF 数据网格。当您在上部数据网格中选择一行时,详细信息将显示在下部数据网格中。我想知道从 UI 的角度来看是否有任何关于如何处
在可视化 Perforce 客户端 (p4v) 中有一个选项: 显示文件操作的 p4 命令输出 启用后,在日志 Pane 中,我可以看到这样的详细日志记录: p4 sync /Users/az/ftp
在其他服务器上设置测试环境后,在几个API调用中出现错误。 99%肯定这是MySQL的事情,但是返回的错误根本没有帮助: global name 'sys' is not defined" 我已经导入
我正在维护一个通用的 iOS 应用程序,其开发已开始于 iOS 6。我正在为 iOS 7 更新 UI。现在我遇到了应用程序的 iPad 部分的奇怪问题。这部分遵循使用 UISplitViewContr
我希望我能正确描述这种情况。当它发生时很容易在屏幕上看到,但很难用语言解释,但我会尽力而为。 我有一个带有固定主视图 (UITableView) 和两个详细 View 之一的 UISplitViewC
我尝试在 eclipse 和 intelliJ 参数中使用垃圾收集记录器来配置简单的测试程序。尝试了不同类型的配置,但尚未创建日志文件。 -XX:+PrintGCDetails -XX:+PrintG
正如您所知,.cap 文件中的 java 小程序的输出文件格式必须通过智能卡读卡器/写卡器(如 ACR122 或任何其他读卡器)部署到 java 卡,而且我相信 java 卡与 java 卡之间的部署
我是一名优秀的程序员,十分优秀!