如何冻结 iReport / Jasper Reports 中的列标题

发布于 2024-12-27 20:59:47 字数 1571 浏览 1 评论 0原文

我想冻结列标题带中的列标题并使详细信息带(显示实际数据的位置)可滚动。

这是列标题代码片段

<columnHeader>
    <band height="36" splitType="Stretch">
        <staticText>
            <reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="1410" y="0" width="113" height="34" isRemoveLineWhenBlank="true" forecolor="#404040" backcolor="#BBD7EF"/>
            <textElement>
                <font fontName="Trebuchet MS" size="13" isBold="true"/>
            </textElement>
            <text><![CDATA[Extra Hrs Amount]]></text>
        </staticText>
        <staticText>
            <reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="1616" y="0" width="90" height="34" isRemoveLineWhenBlank="true" forecolor="#404040" backcolor="#BBD7EF"/>
            <textElement>
                <font fontName="Trebuchet MS" size="13" isBold="true"/>
            </textElement>
            <text><![CDATA[Parking Fees]]></text>
        </staticText>
        <staticText>
            <reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="1798" y="0" width="92" height="34" isRemoveLineWhenBlank="true" forecolor="#404040" backcolor="#BBD7EF"/>
            <textElement>
                <font fontName="Trebuchet MS" size="13" isBold="true"/>
            </textElement>
            <text><![CDATA[Net Payment]]></text>
        </staticText>
    </band>
</columnHeader>

I have column headings in column header band which I want to freeze and make details band (where actual data is displayed) to be scrollable.

Here is the Column Header code snippet

<columnHeader>
    <band height="36" splitType="Stretch">
        <staticText>
            <reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="1410" y="0" width="113" height="34" isRemoveLineWhenBlank="true" forecolor="#404040" backcolor="#BBD7EF"/>
            <textElement>
                <font fontName="Trebuchet MS" size="13" isBold="true"/>
            </textElement>
            <text><![CDATA[Extra Hrs Amount]]></text>
        </staticText>
        <staticText>
            <reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="1616" y="0" width="90" height="34" isRemoveLineWhenBlank="true" forecolor="#404040" backcolor="#BBD7EF"/>
            <textElement>
                <font fontName="Trebuchet MS" size="13" isBold="true"/>
            </textElement>
            <text><![CDATA[Parking Fees]]></text>
        </staticText>
        <staticText>
            <reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="1798" y="0" width="92" height="34" isRemoveLineWhenBlank="true" forecolor="#404040" backcolor="#BBD7EF"/>
            <textElement>
                <font fontName="Trebuchet MS" size="13" isBold="true"/>
            </textElement>
            <text><![CDATA[Net Payment]]></text>
        </staticText>
    </band>
</columnHeader>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不交电费瞎发啥光 2025-01-03 20:59:47

这是您的解决方案,报告 x 轴小于 字段
x 轴..即代码片段中的 x="1410" y="0" 。将 x 轴值减小到您的要求 x="10" y ="3"。文本将显示在列标题中

here is your solution the report x axis less than the <staticText> field
x axis ..i.e x="1410" y="0" in your code snippet. Reduce the x axis value to your requirement x="10" y ="3". The text will show in column header

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文