英文:
How to set background color of a column in Jasper Report
问题
<staticText>
<reportElement x="100" y="0" width="100" height="25" backcolor="#A6A6A6" />
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[Nom]]></text>
</staticText>
需要更改背景颜色,我尝试了属性 backcolor="#A6A6A6"
但它不起作用!
英文:
<staticText>
<reportElement x="100" y="0" width="100" height="25" backcolor="#A6A6A6" />
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[Nom]]></text>
</staticText>
I need to change the background color, i tried the attribute " backcolor="#A6A6A6" " but it it doesn't work!
答案1
得分: 1
你还需要设置 mode="Opaque"
。
英文:
You also need to set mode="Opaque"
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论