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

Align text relatively to another dynamic one


Kevin MIT

Recommended Posts

Hi there,

I seem to encounter a problem nobody had before with Jaspersoft Studio:
Let's say that you have many lines that display data like this:

label1 : value1
label2 : value2
...

Because labels are generated dynamically (depending on user's language), they don't have a fixed size.
I'd like to align every " : " depending on the largest label:

label1                  :
label2                  :
veryLongLabel3 :
...

It seems that there is litterally no option to do that trick.
Maybe I've missed a very simple option but which one? If not, how would you do to have this kind on alignment ?

Thanks for your help!

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi Kevin,

Please use separate labels/fields for your dynamic value and the static colon(:) text. That way your colon won't move, of course you need to keep the dynamic value's label/field to be long enough to contain the incoming values, hope that helps.

Thank you. 

Link to comment
Share on other sites

Thanks for your answer.

That's what I did until now to deal with the problem. But it doesn't solve it.
In this case, the static colon text may be very far from the largest label text:
veryLongLabel3           :

But it's supposed to be right after.

Link to comment
Share on other sites

Hi Kevin,

If you want the colon positioned right next to the values, that is not an issue since you can even append it to the incoming value (coming from your resultset). I reckon you want both,

- position of the colon next to each label, and

- colons vertically in-line with each other

I am afraid that won't be possible with variable sized incoming data. Please do correct me if I am wrong in the interpretation of your question.

Thanks.

 

Link to comment
Share on other sites

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...