Coder Social home page Coder Social logo

Comments (16)

allgood avatar allgood commented on June 19, 2024 1

@Rctnet ... found the problem here... I have marked HTML since it was the only way I was able to get all the content, correct is to use none instead.

Anyway, the problem still occurs for HTML.

And on a sidenote, looks like you are testing reportElement for isStretchWithOverflow when the correct is to test the TextField object ($this). You can also add the value that new version of JasperStudio uses. (I will submit a PR with this change in a few minutes).

Another thing is the isPrintWhenDetailOverflows... for me it haves a different meaning, like if the element should appear even if its contents extends the bounds of the parent element.

from jasperphp.

allgood avatar allgood commented on June 19, 2024 1

Had some satisfactory results changing the order of the fields on XML, every element placed after the stretching one gets its position affected. It doesn't respect the "relative to top" or "relative to bottom" property.

It is not optimal, but it will do what I need.

from jasperphp.

Rctnet avatar Rctnet commented on June 19, 2024

Try check if split type property is "stretch" ou "prevent" in both bands, when you be create bands in JasperSoft Studio, it´s create if split type property with null value

from jasperphp.

allgood avatar allgood commented on June 19, 2024

from jasperphp.

Rctnet avatar Rctnet commented on June 19, 2024

Hi, a few seconds ago post a possible solution, try update and test again.

from jasperphp.

Rctnet avatar Rctnet commented on June 19, 2024

remember to check stretch with overflow property in textfield

from jasperphp.

allgood avatar allgood commented on June 19, 2024

I'm having trouble on finding this property on Jasper Studio. Field is stretching only if I choose HTML, but there is no "Stretch with overflow" property here.

image

from jasperphp.

Rctnet avatar Rctnet commented on June 19, 2024

Here
image

from jasperphp.

allgood avatar allgood commented on June 19, 2024

Doesn't show here! Don't know if it is because of any other option, tried with a blank report!

image

from jasperphp.

allgood avatar allgood commented on June 19, 2024

Looks like it is the textAdjust option on my version, it have CutText, StretchHeight (I'm choosing this), and ScaleFont options!

from jasperphp.

allgood avatar allgood commented on June 19, 2024

This is how the code ends on the xml:

<textField textAdjust="StretchHeight">
	<reportElement x="0" y="0" width="180" height="18" uuid="5e2f0d45-410f-4627-964a-8f2d311dde90"/>
	<textElement textAlignment="Left" verticalAlignment="Top" markup="html"/>
	<textFieldExpression><![CDATA[$F{text}]]></textFieldExpression>
</textField>

from jasperphp.

Rctnet avatar Rctnet commented on June 19, 2024

image
ou

<textField isStretchWithOverflow="true">
				<reportElement x="2" y="4" width="547" height="11" isPrintWhenDetailOverflows="true" uuid="bceaac6a-262b-4b5d-a180-ec3751e5a755">
					<printWhenExpression><![CDATA[$V{total_receb} > 0]]></printWhenExpression>
				</reportElement>
				<textElement>
					<paragraph lineSpacing="Single"/>
				</textElement>
				<textFieldExpression><![CDATA["Recebemos do(a) Sr(a) "+$F{locatarios_nome}+" a importancia acima mencionada de R$"+$V{total_receb}.toString()+" ("+$V{total_receb}.numberToText()+" )"]]></textFieldExpression>
			</textField>

you can add isStretchWithOverflow ou isPrintWhenDetailOverflows, both be make stretch

from jasperphp.

allgood avatar allgood commented on June 19, 2024

Tool automatically changes edition of isStretchWithOverflow when saving... looks like the format is changed on my version.

Both with isPrintWhenDetailOverflows selected on jasperstudio and with isStretchWithOverflow added outside jasper studio the same problem happens.

Tomorrow I will try to make a proof of concept of the bug and post here.

from jasperphp.

allgood avatar allgood commented on June 19, 2024

Here is a proof of concept of the problem

https://drive.google.com/open?id=18M8PLgYcdLyzaz2lrhPxpf5XyTdJnJvh

from jasperphp.

allgood avatar allgood commented on June 19, 2024

Still some issues.

On the image attached the "Descrição" field have the textAdjust="StretchHeight" parameter.
The first field "Sequencia" ends being printed outside its box making the report confusing.

Will try to make another PoC later today so it can be debugged.

image

from jasperphp.

allgood avatar allgood commented on June 19, 2024

Just to keep this here:

any field declared AFTER a stretched field on the jrxml file gets its coordinates entirely unpredictable, so fields that are before or on the same line of it, or even fields that must have a fixed position must be declared before. all other fields will apply the offset of the stretched field... even if the field doesn't stretch.

I suppose it can be considered a bug because this is not the jasper reports behavior , but it is possible to work around it if only one field is stretchable and everything bellow it should move down. Things can get messy if two or more stretchable fields lies on the same page.

from jasperphp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.