PHPJasper / phpjasper

A PHP report generator
MIT License
469 stars 162 forks source link

cvc-complex-type.3.2.2: Attribute 'textAdjust' is not allowed to appear in element 'textField'. #300

Open AdeSupriyadi opened 3 years ago

AdeSupriyadi commented 3 years ago

I want make textField when its content overflow its wraped image

If I preview in JasperStudio it's running OK

But when it's execute via PhpJasper its fail.

Describe the bug lineNumber: 169; columnNumber: 42; cvc-complex-type.3.2.2: Attribute 'textAdjust' is not allowed to appear in element 'textField'.

jrxml at line 169

<textField textAdjust="StretchHeight">
                <reportElement positionType="Float" x="10" y="105" width="546" height="22" uuid="8b465be7-9f55-423a-b71f-d3986bdff5a6"/>
                <box topPadding="2" leftPadding="4" bottomPadding="2" rightPadding="4">
                    <pen lineWidth="0.5"/>
                    <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>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Arial" isBold="true" isItalic="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{terbilang}]]></textFieldExpression>
            </textField>

Env

cadufavaro commented 2 years ago

I have the same problem, did you manage to solve it?

Xint0-elab commented 2 years ago

I believe the problem is that PHPJasper 3.3.1 uses JasperStarter 3.51 which uses an old version of the JasperReports library.

I have pull request #311 to upgrade JasperStarter to version 3.6.2 which uses JasperReports library 6.18. You can try it out using my fork and setting the version to the dev branch of the PR. See my comment in issue #299 for suggested changes in your composer.json.

cadufavaro commented 2 years ago

My version is 3.7.0 and the error happens, I tried to use your version 3.6.2 and it still persists

Xint0-elab commented 2 years ago

It seems the PHP code is still using an old version of jasperstarter. Please execute jasperstarter from the command line with the -V option from your PHP project root folder:

./vendor/geekcom/phpjasper/bin/jasperstarter/bin/jasperstarter -V

It should print out JasperStarter 3.6.2 and JasperReports 6.18.1.

cadufavaro commented 2 years ago

It seems the PHP code is still using an old version of jasperstarter. Please execute jasperstarter from the command line with the -V option from your PHP project root folder:

./vendor/geekcom/phpjasper/bin/jasperstarter/bin/jasperstarter -V

It should print out JasperStarter 3.6.2 and JasperReports 6.18.1.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yea! really was in the old version. I updated via composer, and there was a line break

Congratulations and thank you