jasperreport生成pdf_jasperreport 导出excel_jasperreport json(35)

电脑杂谈  发布时间:2017-02-04 10:28:36  来源:网络整理

Johnson Christine 589.54.52

Johnson Peter 546.85.95

Johnson Richard 125.49.56

Smith John 469.85.45

Smith Laura 459.86.54

Smith Denise 884.51.25

You might want to suppress the repeating "Family Name" values and print something like this:

The JasperReports Ultimate Guide

Page 47

Family Name First Name Phone

Johnson Adam 256.12.35

Christine 589.54.52

Peter 546.85.95

Richard 125.49.56

Smith John 469.85.45

Laura 459.86.54

Denise 884.51.25

You can do that, if for the text field that displays the family name, you set:

isPrintRepeatedValues="false"

The static text elements behave in the same way. As you would expect, their value always repeats and

in fact it never changes, until the end of the report. This is why we call them static texts. So, if you set

isPrintRepeatedValues="false" for one of your <staticText> elements, you should expect to

see it displayed only once, the first time, at the beginning of the report, and never again.

Now, what about graphic elements?

An image is considered to be repeating itself if its bytes are exactly the same from one occurrence to

the next. This could only happen if you choose to cache your images using the isUsingCache

attribute available in the <image> element and if the corresponding <imageExpression> returns the

same value from one iteration to the next (the same file name, the same URL, etc).

Lines and rectangles are always repeating themselves, because they are static elements, just like the

static texts we have seen above. So, when deciding to not display repeating values for a line or a


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-30468-35.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 马立宏
      马立宏

      文中不是提到我们有三艘军舰去白令海峡了

    • 潘景伟
      潘景伟

      这个新闻

    • 杜旟
      杜旟

      当年美苏也是这样在海上角逐了很久

    热点图片
    拼命载入中...