jasperreport生成pdf_jasperreport 导出excel_jasperreport json(37)

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

This blank space also appears if a text field displays only blank characters or an empty text.

There is a way to eliminate this unwanted blank space, on the vertical axis, only if some conditions are

met.

The JasperReports Ultimate Guide

Page 48

For example, if you have three successive text fields, one on top of the other like this:

TextField1

TextField2

TextField3

If the second one has an empty string as its value, or contains a repeated value that you chose to

suppress, the output would look like this:

TextField1

TextField3

In order to eliminate the gap between the first text field and the third, you have to set

isRemoveLineWhenBlank="true" for your second text field. You would obtain something like this:

TextField1

TextField3

But there are certain conditions that have to be met in order for this functionality to work. The blank

space will not be removed, if your second text field shares some vertical space with other report

elements that are printed even this second text fields of your does not print.

For example, you might have some vertical lines on the sides of your report section like this:

| TextField1 |

| |

| TextField3 |

or you might have a rectangle that draws a box around your text fields:

------------------

| TextField1 |

| |

| TextField3 |

------------------

or even other text elements that are placed on the same horizontal with your second text field:

Label1 TextField1

Label2

Label3 TextField3

In all those situations, the blank space between the first and the third text field cannot be remove,


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

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

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