1

我最近一直在玩 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 来解决这个问题吗?

4

1 回答 1

2

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

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

于 2011-11-05T07:29:26.077 回答