如何在非细节区域溢出时正确拉伸 [英] How to properly stretch with overflow for non-detail band

查看:143
本文介绍了如何在非细节区域溢出时正确拉伸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题和页面标题中有多行字段.我希望它们垂直伸展,但是问题是伸展的田野下面的田野丢失了.我还使用框架将它们分组.

I have fields in title and page header that have multiple lines. I want them to stretch vertically but the problem is the field below the stretched field is missing. I also grouped them using a frame.

我设置的属性:

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

请参见下面的屏幕截图.

Please see below screen shot.

推荐答案

您可以尝试以下文本属性:-

You can try these properties of text : -

对于标题栏的第一个字段(收银台名称),请使用以下属性:-

For first field (Cashier Name) of title band use this properties :-

Position Type-         Fix Relative to Top

Stretch Type-          Relative to Band Height

Stretch With Overflow -    true

在第二个字段(日期)中设置这些属性

For the second field (Date) set these properties

Position Type-         Fix Relative to Bottom

Stretch Type-          No stretch

Stretch With Overflow-     false

在此报告中,如果您在ireport中使用Sample HSQL数据库运行该报告,则可以看到属性:-

In this report you can see the properties if you run the report with Sample HSQL database in ireport :-

<?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>

这篇关于如何在非细节区域溢出时正确拉伸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆