Растяжение поля ниже другого поля растяжения в той же группе нижнего колонтитула - PullRequest
0 голосов
/ 09 мая 2018

Фон

У меня есть отчет, где завершенные анализы должны отображаться ниже выдающейся работы. У меня были законченные анализы, установленные для плавания

enter image description here

Если выполнено много выполненных работ, поле кажется растянутым, но не печатает информацию

enter image description here

Я изменил это поле завершенных анализов, чтобы оно было зафиксировано относительно вершины, и теперь оно печатает всю информацию, но перекрывается, если поле Выдающиеся расширяется

enter image description here

Заранее спасибо всем, кто может помочь.

SQL

create table analyses (ID int not null IDENTITY PRIMARY KEY, info1 varchar(max), info2 varchar(max))

insert into analyses values ('short string', 'short string')
insert into analyses values ('Extremely long string which is so long that I don''t know how I can carry on thinking of things to write so I will just keep writing things like this until I get bored and eventually it will be long enough I think, well probably, not entirely sure','Extremely long string which is so long that I don''t know how I can carry on thinking of things to write so I will just keep writing things like this until I get bored and eventually it will be long enough I think, well probably, not entirely sure')
insert into analyses values ('another short string', 'another short string')

JRXML

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.3.final using JasperReports Library version 5.0.1  -->
<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="Blank_A4_3" pageWidth="400" pageHeight="842" columnWidth="360" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="7f2b0070-ae21-43b8-aed2-2d97e01f5788">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
    <property name="com.jaspersoft.studio.unit." value="pixel"/>
    <queryString>
        <![CDATA[select * from analyses]]>
    </queryString>
    <field name="ID" class="java.lang.Integer"/>
    <field name="Info1" class="java.lang.String"/>
    <field name="Info2" class="java.lang.String"/>
    <group name="Group1">
        <groupExpression><![CDATA[$F{ID}]]></groupExpression>
        <groupHeader>
            <band height="24">
                <staticText>
                    <reportElement x="188" y="0" width="62" height="24" uuid="c63aa7bc-0916-4bc4-b00a-2b2f7e0ecdc1">
                        <property name="com.jaspersoft.studio.unit.height" value="px"/>
                        <property name="com.jaspersoft.studio.unit.y" value="px"/>
                    </reportElement>
                    <text><![CDATA[Info 1   +]]></text>
                </staticText>
                <staticText>
                    <reportElement x="251" y="0" width="68" height="24" forecolor="#EB3431" uuid="4915813a-f96b-4bd4-a278-5d51378419f5">
                        <property name="com.jaspersoft.studio.unit.height" value="px"/>
                        <property name="com.jaspersoft.studio.unit.y" value="px"/>
                    </reportElement>
                    <text><![CDATA[Info 2]]></text>
                </staticText>
                <staticText>
                    <reportElement x="0" y="0" width="188" height="24" uuid="94aa55be-e050-4488-933d-d29497fe1adb">
                        <property name="com.jaspersoft.studio.unit.height" value="px"/>
                        <property name="com.jaspersoft.studio.unit.y" value="px"/>
                    </reportElement>
                    <text><![CDATA[ID]]></text>
                </staticText>
            </band>
        </groupHeader>
        <groupFooter>
            <band height="24">
                <property name="com.jaspersoft.studio.unit.height" value="px"/>
                <textField>
                    <reportElement x="0" y="0" width="185" height="12" uuid="5b4f1d89-0191-4607-bca5-715d3828bbaa">
                        <property name="com.jaspersoft.studio.unit.height" value="px"/>
                    </reportElement>
                    <textElement>
                        <font size="8"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement x="185" y="0" width="135" height="12" uuid="ac96f759-7c22-4877-afb1-a7529d61a067">
                        <property name="com.jaspersoft.studio.unit.height" value="px"/>
                        <property name="com.jaspersoft.studio.unit.width" value="px"/>
                    </reportElement>
                    <textElement>
                        <font size="8"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{Info1}]]></textFieldExpression>
                </textField>
                <textField isStretchWithOverflow="true">
                    <reportElement positionType="Float" x="185" y="12" width="135" height="12" forecolor="#EB221E" uuid="44747f9d-582d-4b46-a729-104a0f5c7eaa">
                        <property name="com.jaspersoft.studio.unit.height" value="px"/>
                        <property name="com.jaspersoft.studio.unit.width" value="px"/>
                    </reportElement>
                    <textElement>
                        <font size="8"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{Info2}]]></textFieldExpression>
                </textField>
            </band>
        </groupFooter>
    </group>
    <background>
        <band splitType="Stretch"/>
    </background>
</jasperReport>

1 Ответ

0 голосов
/ 10 мая 2018

Для текстового поля «Завершено»:

  • выберите тип позиции = 'Float'
  • выберите тип растяжки = 'Без растяжения'
  • убедитесь, что опция 'Растянуть с переливом' отмечена (true)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...