neharon Posted February 1, 2019 Share Posted February 1, 2019 Hi!In this example:<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 --><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_1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isFloatColumnFooter="true" isIgnorePagination="true" uuid="4cec75f3-8198-4738-adb0-9e9e38e97df4"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <queryString><![CDATA[]]></queryString> <columnHeader> <band height="19" splitType="Stretch"> <staticText> <reportElement x="30" y="0" width="161" height="19" uuid="946fa381-bf2f-4587-93e6-708792519cf1"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <text><![CDATA[Cloumn header]]></text> </staticText> </band> </columnHeader> <detail> <band height="40" splitType="Stretch"> <textField isStretchWithOverflow="true"> <reportElement positionType="Float" stretchType="ContainerHeight" x="60" y="0" width="71" height="40" uuid="877d54d6-86cd-438a-9e6f-80c41b0f7796"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textFieldExpression> <![CDATA["Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 Text Field1 "]]> </textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement stretchType="ContainerHeight" x="131" y="0" width="81" height="20" uuid="632d8ae1-3e27-4ab3-8955-ce1434588f0e"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textFieldExpression><![CDATA["Text Field2"]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement positionType="Float" stretchType="ContainerHeight" x="131" y="20" width="81" height="20" uuid="bb73df80-4366-482c-a6d9-d09534609fde"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textFieldExpression><![CDATA["Text Field3"]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="19" splitType="Stretch"> <staticText> <reportElement x="30" y="0" width="161" height="19" uuid="f51a8322-4a36-4982-9a6d-ea241368c65c"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <text><![CDATA[Column footer]]></text> </staticText> </band> </columnFooter></jasperReport>[/code]I try to set Text Field2 height to 50% of stretched Text Field1. I try some combination of isStretchWithOverflow, stretchType and positionType, but result is:How to set Text Field2 and Text Field3 height to 50% of Text Field1 and put 2 & 3 fields to top and bottom of container? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now