Jump to content
We've recently updated our Privacy Statement, available here ×

Floating text fields


2004 IR Help

Recommended Posts

By: Bogdan - cecenu

Floating text fields

2005-04-18 23:54

Hello!!!

I am using jasperReports v6.4 and I have some problems regarding the alignment of text fields.

Exemple

If I have something that looks like this:

------------- --------------

| cell 11 | | cell 12 |

------------- --------------

------------- --------------

| cell 21 | | cell 22 |

------------- --------------

after filling the report the "cell 11" and only it doubles it's height. Of course the "cells" are set as float but it results something like this:

------------- --------------

| | | cell 12 |

| cell 11| --------------

| | --------------

------------- | cell 22 |

------------- --------------

| cell 21 |

-------------

As you can see only the "cell 21" modifies his coordinates. Of course my question is what can I do to keep cells 21 and 22 at the same relative line even when the above cells grow in height?

Thank you!

 

 

 

 

By: C-Box - c-box

RE: Floating text fields

2005-04-19 01:09

Well that is just possible with a little trick.

 

put an "invisible" line (make its foregroundcolor to the backgroundcolor of the underlying band), set its with to the sum of width of cell11 and cell12 and set its position type also to float... now the cell 21 and cell 22 will be at the same line level when cell 11 stretches itself to double height. Voilá´hats all!:-)

 

hth

C-Box

 

 

 

 

By: Bogdan - cecenu

RE: Floating text fields

2005-04-19 01:26

Interesting and good solution. Tks C-Box!!

But I think it would be nice that future versions of Jasper Reports will have the suport for linking together elements that must be on the same relative line no mather how much they float.

 

 

 

 

By: C-Box - c-box

RE: Floating text fields

2005-04-19 01:39

Yes ... we discussed that already in another thread... it must be possible to define kind of "stretchFrame" where multiple elements can stretch horizontally and vertically but not more than that frame (or the wohle frame stretches at least downwards) all elements beyound float then downwards.

 

That should be possible... perhaps even with the already existing JRElementGroup... but that is something Teodor must decide.

 

till then you must be creative and use some tricks to achieve the wanted output.

 

C-Box

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...