Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Issue with stretch text field if calling the report from APEX using jasper Integration #20

#1

When I called reports from my Oracle APEX application, if the text longer than the text field width , I found the text cute and not stretched vertically down.

When I ran same report from the jasper studio , I found the field stretched vertically without any problem.

I tried to change report format when I call the report from APEX but still same problem

  • replies 4
  • views 2.2K
  • likes 0
#2

Please provide more details:

  • Screenshot of the problem
  • Simple test case - based on a simple query without database objects, e.g.
    select '... this is long text ...' my_text from dual;
  • Upload the .jrxml file for this testcase
  • Version of the jasper reports integration and the included Jasper libraries
  • Version of JasperStudio used for testing

Thanks

Hi
The Version of the jasper reports integration and the included Jasper libraries is : Version 2.4.0
Version of JasperStudio is : 6.12.0
Oracle APEX version : 20.1.0.00.13
Design Mode.png
Preview in Jasper Studio.png
Result from Oracle APEX.png
Jasper report integration version.png
Jasper report Studio version.png

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.12.0.final using JasperReports Library version 6.12.1-ac0eebdb29e4c0985457bab279a6db744d661530  -->
<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" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="7de5944e-f8c9-4dfe-b9f8-4a8c0d6b070e">
	<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
	<property name="com.jaspersoft.studio.data.defaultdataadapter" value="CARIRS CLOUD"/>
	<queryString language="SQL">
		<![CDATA[select 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' LONG_TEXT ,'ABC' SHORT_TEXT FROM DUAL]]>
	</queryString>
	<field name="LONG_TEXT" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.label" value="LONG_TEXT"/>
	</field>
	<field name="SHORT_TEXT" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.label" value="SHORT_TEXT"/>
	</field>
	<background>
		<band splitType="Stretch"/>
	</background>
	<columnHeader>
		<band height="33" splitType="Stretch">
			<frame>
				<reportElement x="0" y="0" width="555" height="30" uuid="5c82a434-c3cb-4db5-94f4-b65705bfce49"/>
				<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>
				<staticText>
					<reportElement x="0" y="0" width="100" height="30" uuid="84f76772-adc9-4581-af76-93ad742d26f0"/>
					<textElement textAlignment="Center" verticalAlignment="Middle"/>
					<text><![CDATA[Long text]]></text>
				</staticText>
				<staticText>
					<reportElement x="142" y="0" width="100" height="30" uuid="684684ff-07db-4c88-bd64-8be4352f9e62"/>
					<textElement textAlignment="Center" verticalAlignment="Middle"/>
					<text><![CDATA[Short text]]></text>
				</staticText>
				<line>
					<reportElement x="119" y="0" width="1" height="30" uuid="f6358854-8358-4641-8bd4-2dfdc486ec22">
						<property name="com.jaspersoft.studio.unit.width" value="px"/>
					</reportElement>
				</line>
			</frame>
		</band>
	</columnHeader>
	<detail>
		<band height="28" splitType="Stretch">
			<frame>
				<reportElement x="0" y="0" width="555" height="27" uuid="70f7ada0-b82d-4f28-b511-79a7626cc538"/>
				<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>
				<textField textAdjust="StretchHeight">
					<reportElement stretchType="ElementGroupHeight" x="0" y="0" width="100" height="27" uuid="53921d25-a074-4bc8-9986-8bde0bcfd7f4"/>
					<box>
						<pen lineColor="#F7130F"/>
						<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#F7130F"/>
						<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#F7130F"/>
						<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#F7130F"/>
						<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#F7130F"/>
					</box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" size="12" isBold="true"/>
					</textElement>
					<textFieldExpression><![CDATA[$F{LONG_TEXT}]]></textFieldExpression>
				</textField>
				<line>
					<reportElement stretchType="ElementGroupHeight" x="119" y="0" width="1" height="27" uuid="0991e870-b04d-4d4e-bdec-45e48b08a08f">
						<property name="com.jaspersoft.studio.unit.width" value="px"/>
					</reportElement>
				</line>
				<textField textAdjust="StretchHeight">
					<reportElement stretchType="ElementGroupHeight" x="142" y="0" width="100" height="27" uuid="d1a05b63-bb57-4a08-830e-4ada0b8df5d5"/>
					<box>
						<pen lineColor="#F7130F"/>
						<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#F7130F"/>
						<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#F7130F"/>
						<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#F7130F"/>
						<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#F7130F"/>
					</box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" size="12" isBold="true"/>
					</textElement>
					<textFieldExpression><![CDATA[$F{SHORT_TEXT}]]></textFieldExpression>
				</textField>
			</frame>
		</band>
	</detail>
</jasperReport>
#5

Thank you for the detailed explanation! I will have a look at it.

#6

Hi @mohamedhattab,

I have checked it and it works with my setup on the latest versions:

  • JasperSoftStudio 6.16.0
  • JRI version jri-2.7.0-jasper-6.16.0
Greenshot 2021-01-25 15.39.21.png

it seems like the .jasper file created with JasperSoftStudio 6.12.0 is incompatible with the runtime version 6.4.1 which is included in your JasperReportsIntegration version 2.4.0.

You could use JasperSoftStudio 6.4.1 to create the .jasper file or upgrade to jri-2.7.0-jasper-6.16.0: https://github.com/daust/JasperReportsIntegration/releases

This new release also has some nice new features, specifically that the .jrxml file is enough ... the .jasper file will be recompiled on-the-fly for you.

Best
~Dietmar.