【问题标题】:Can DynamicJasper place the column Title in the detail section?DynamicJasper 可以将列标题放在详细信息部分吗?
【发布时间】:2011-11-03 21:46:54
【问题描述】:

我最近一直在玩 DynamicJasper,印象非常深刻。我唯一的问题是我创建的一些报告更像是打印的表格,在数据字段的左侧会有标签(技术上是列标题)。在 iReport 中绘制报告时,这不是问题。您只需将它们放在字段旁边的详细信息部分即可。

看起来:

jrxml 将是:

<detail>
        <band height="125" splitType="Stretch">
            <textField>
                <reportElement x="56" y="0" width="76" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$F{Column 1}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="0" y="0" width="56" height="20"/>
                <textElement/>
                <text><![CDATA[Column 1:]]></text>
            </staticText>
            <textField>
                <reportElement x="189" y="0" width="71" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$F{Column 2}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="132" y="0" width="57" height="20"/>
                <textElement/>
                <text><![CDATA[Column 2:]]></text>
            </staticText>
            <textField>
                <reportElement x="318" y="0" width="73" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$F{Column 3}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="260" y="0" width="58" height="20"/>
                <textElement/>
                <text><![CDATA[Column 3:    ]]></text>
            </staticText>
            <textField>
                <reportElement x="451" y="0" width="100" height="20"/>
                <textElement/>
                <textFieldExpression><![CDATA[$F{Column 4}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement x="391" y="0" width="60" height="20"/>
                <textElement/>
                <text><![CDATA[Column 4]]></text>
            </staticText>
        </band>
    </detail>

知道如何仅使用 Dynamic Jasper 实现这一目标吗?

【问题讨论】:

    标签: java dynamic-jasper


    【解决方案1】:

    目前在 DynamicJasper 中这是不可行的。需要一个新的LayoutManager 实现。

    Dj 旨在仅解决基于列的报告。

    【讨论】:

    • 这是我想的,但找不到任何确定的东西。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-14
    • 1970-01-01
    • 2023-03-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多