在表Jasper报表上的最后一行时打印 [英] Print when last row on table Jasper report

查看:61
本文介绍了在表Jasper报表上的最后一行时打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个报告,该报告只需要在每页表格的最后一行中打印一张图像. 如何在表达时创建打印文件?

I have a report that needs to have an image printed only in the last row of the table of each page. How can I create my print when expression?

对不起,我的可怜的例子.

Sorry for my poor exemple.

直到现在,我创建了这个变量

until now, i created this variable

<variable name="rowsOnPage" class="java.lang.Integer">
        <variableExpression><![CDATA[$V{rowsOnPage} + 1]]></variableExpression>
        <initialValueExpression><![CDATA[0]]></initialValueExpression>
</variable>

我在表达时尝试使用此打印件:

and i try this print when expression:

$V{rowsOnPage} == $V{REPORT_COUNT}

但是此表达式会在表格的每一行中打印图像.

But this expression print the image in each row of table.

推荐答案

如Petter所说,提供一个示例说明您尝试过的内容以及到目前为止所获得的距离将很有帮助.

As Petter says, providing an example of what you've tried and how close you've got so far would be helpful.

同时,我的建议是您向SQL添加最大行计数值,并将其作为JRXML中的字段返回,例如maxRowNum.这样,您就可以在$V{REPORT_COUNT} == $F{maxRowNum}

In the meantime my suggestion is that you add a max rowcount value to your SQL and return this as field in your JRXML as e.g. maxRowNum. With this you could then use a printWhen at the point when $V{REPORT_COUNT} == $F{maxRowNum}

这假定您有权访问代码的SQL部分,并且可以使用它.

This assumes you have access to the SQL part of your code and can play with this.

这篇关于在表Jasper报表上的最后一行时打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆