在Jasper报表中添加页面边框

4

我看了一些有关 "在Jasper报告中添加页面边框" 的帖子,但没有太大帮助。请有人详细告诉我如何添加页面边框?


你想在边框内放置哪些带? - Alex K
@Alex K 我想要放置细节、组头、页头、标题等等... - Punky
可能是设置具有标题和详细带的Jasper子报表的边框的重复问题。 - Emmanuel Angelo.R
2个回答

10
我通过为报告添加背景色来实现这一点,例如:
<background>
    <band height="802" splitType="Stretch">
        <rectangle>
            <reportElement key="rectangle-2" x="0" y="76" width="535" height="726"/>
            <graphicElement>
                <pen lineWidth="0.5" lineStyle="Solid"/>
            </graphicElement>
        </rectangle>
    </band>
</background>

它在docx导出器上无法正常工作(跳过背景)。有什么解决方法吗? - jonny

0
谢谢,对我有用。我根据我的需求进行了修改,为A4报告添加了边框。
<background>
    <band height="802" splitType="Stretch">
        <rectangle>
            <reportElement key="rectangle-2" x="0" y="2" width="554" 
    height="800" uuid="ac366ac4-d847-416c-94a7-38a4b2a049da"/>
            <graphicElement>
                <pen lineWidth="0.5" lineStyle="Solid"/>
            </graphicElement>
        </rectangle>
    </band></background>

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接