jamesatollefson Posted February 16, 2022 Share Posted February 16, 2022 I have tried every cobination of positionType and stretchType and evaluation time. Nothing has worked. I even made sure the print order is vertical. I used jasper version 6.11 and even upgraded to 6.17. No success. Whenever the dynamic text from the variable is longer than the text field and takes up a second line, it only shows the first line.Here is my simple text field:<textField textAdjust="StretchHeight" evaluationTime="Auto"> <reportElement positionType="Float" stretchType="ContainerHeight" x="0" y="80" width="190" height="16" uuid="939ca8a9-5c57-445a-8992-54babc9c7302"/> <textFieldExpression><![CDATA[$V{signedInfo}.getSignedComments()]]></textFieldExpression></textField>I also attached my full jasper report Link to comment Share on other sites More sharing options...
bigalex Posted February 16, 2022 Share Posted February 16, 2022 Try to change the Reset type for $V{signedInfo} , I am not sure if it is appropriate for your reportPlease see the example below where variable Reset Type is set to None insted of Report<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.16.0.final using JasperReports Library version 6.16.0-48579d909b7943b64690c65c71e07e0b80981928 --><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_2" pageWidth="595" pageHeight="400" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b736cbc8-581d-4f10-985f-78b77784ea4c"> <style name="Table_TH" mode="Opaque" backcolor="#F0F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="Table_CH" mode="Opaque" backcolor="#BFE1FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <parameter name="signedInfo" class="java.lang.String"> <defaultValueExpression><![CDATA["I have tried every cobination of positionType and stretchType and evaluation time. Nothing has worked. I even made sure the print order is vertical. I used jasper version 6.11 and even upgraded to 6.17. No success. Whenever the dynamic text from the variable is longer than the text field and takes up a second line, it only shows the first line."]]></defaultValueExpression> </parameter> <queryString> <![CDATA[]]> </queryString> <variable name="signedInfo" class="java.lang.String" resetType="None"> <variableExpression><![CDATA[$P{signedInfo}]]></variableExpression> </variable> <variable name="signedInfo_1" class="java.lang.String"> <variableExpression><![CDATA[$P{signedInfo}]]></variableExpression> </variable> <pageHeader> <band height="43" splitType="Prevent"> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/> <textField textAdjust="StretchHeight" evaluationTime="Auto"> <reportElement positionType="Float" stretchType="ContainerHeight" x="110" y="0" width="120" height="16" uuid="939ca8a9-5c57-445a-8992-54babc9c7302"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <textFieldExpression><![CDATA[$V{signedInfo}]]></textFieldExpression> </textField> <textField textAdjust="StretchHeight" evaluationTime="Auto"> <reportElement positionType="Float" stretchType="ContainerHeight" x="360" y="0" width="190" height="16" uuid="1548eef7-f54a-4b53-945f-29552fcb6bee"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <textFieldExpression><![CDATA[$V{signedInfo_1}]]></textFieldExpression> </textField> <staticText> <reportElement x="0" y="0" width="100" height="16" uuid="fb7b2e39-2bdf-4ddc-ab71-2bae725aa85b"/> <text><![CDATA[Reset Type =None]]></text> </staticText> <staticText> <reportElement x="250" y="0" width="100" height="16" uuid="288d8362-f38c-4d8b-b023-046cbc9883ac"/> <text><![CDATA[Reset Type =Report]]></text> </staticText> </band> </pageHeader></jasperReport> 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