简体   繁体   English

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

[英]How to Freeze the column header in iReport / Jasper Reports

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>

here is your solution the report x axis less than the <staticText> field x axis ..ie x="1410" y="0" in your code snippet. 这是您的解决方案,报告x轴小于<staticText>字段x轴..ie代码片段中的x =“ 1410” y =“ 0”。 Reduce the x axis value to your requirement x="10" y ="3". 将x轴值减小到您的要求x =“ 10” y =“ 3”。 The text will show in column header 文本将显示在列标题中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM