在Jasperreports中,如何在具有背景颜色的页面上设置边距?

时间:2017-01-10 11:47:12

标签: background jasper-reports margin

我正在使用JasperReports生成报告,我的.jrxml看起来像这样设置背景颜色。

问题是我需要在页面上留一个边距,但边距显示为白色。我已经尝试添加一个带填充的框到背景,这不起作用,因为它是背景

<background>
        <band splitType="Stretch" height="842">
            <staticText>
                <reportElement mode="Opaque" x="0" y="0" width="595" height="842" backcolor="#DEEBF9" />
                <box topPadding="20" leftPadding="20" rightPadding="20">
                </box>
                <textElement/>
                <text><![CDATA[]]></text>
            </staticText>
        </band>
    </background>

编辑图片已被请求。

当我尝试创造正确的时候,我正在看左边。边距不包括背景颜色,因为我需要减小背景带的宽度。否则我会得到“保证金和背景超出页面大小”的例外情况。如何在边距中着色或创建某种影响除背景之外的整个页面的填充? enter image description here

0 个答案:

没有答案