gpt4 book ai didi

jasper-reports - 如何正确拉伸(stretch)非细节带的溢出

转载 作者:行者123 更新时间:2023-12-04 16:34:16 24 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Stretch a row with data overflow while having multiple rows in a single band

(3 个回答)


3年前关闭。




我在标题和页眉中有多行的字段。我希望它们垂直拉伸(stretch),但问题是拉伸(stretch)字段下方的字段丢失。我还使用框架对它们进行了分组。

我设置的属性:

Position Type : Float
Stretch Type : Relative to Tallest Object
Stretch With Overflow : True

请看下面的屏幕截图。
enter image description here

最佳答案

您可以尝试这些文本属性:-

对于标题带的第一个字段(收银员姓名),请使用此属性:-

Position Type-         Fix Relative to Top

Stretch Type- Relative to Band Height

Stretch With Overflow - true

对于第二个字段(日期)设置这些属性
Position Type-         Fix Relative to Bottom

Stretch Type- No stretch

Stretch With Overflow- false

如果您在 ireport 中使用示例 HSQL 数据库运行报告,则在此报告中您可以看到属性:-
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ward utilization" pageWidth="300" pageHeight="300" orientation="Landscape" columnWidth="280" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" uuid="85476864-df43-454c-83dd-9c1b475ec223">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<queryString>
<![CDATA[select * from orders]]>
</queryString>
<field name="ORDERID" class="java.lang.Integer"/>
<field name="CUSTOMERID" class="java.lang.String"/>
<field name="EMPLOYEEID" class="java.lang.Integer"/>
<field name="ORDERDATE" class="java.sql.Timestamp"/>
<field name="REQUIREDDATE" class="java.sql.Timestamp"/>
<field name="SHIPPEDDATE" class="java.sql.Timestamp"/>
<field name="SHIPVIA" class="java.lang.Integer"/>
<field name="FREIGHT" class="java.math.BigDecimal"/>
<field name="SHIPNAME" class="java.lang.String"/>
<field name="SHIPADDRESS" class="java.lang.String"/>
<field name="SHIPCITY" class="java.lang.String"/>
<field name="SHIPREGION" class="java.lang.String"/>
<field name="SHIPPOSTALCODE" class="java.lang.String"/>
<field name="SHIPCOUNTRY" class="java.lang.String"/>
<group name="bed"/>
<title>
<band height="42">
<textField isStretchWithOverflow="true">
<reportElement uuid="c438eefe-5415-409e-8e7c-c763a7305ae2" stretchType="RelativeToBandHeight" x="87" y="0" width="24" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{SHIPNAME}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="83c8a0d7-af5f-43ec-88dd-7d923a5b2a28" positionType="FixRelativeToBottom" x="87" y="21" width="24" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$F{SHIPCITY}]]></textFieldExpression>
</textField>
</band>
</title>

关于jasper-reports - 如何正确拉伸(stretch)非细节带的溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24445831/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com