Adjusting size of cells in table to text

0

Hello I have an SQL query, which gives a lot of text in one row, and only a small string in another. Can I somehow adjust size of cells to the result of query? It is not looking good if I have big cells with only a few characters....

wszystkielogizajete's picture
Joined: Aug 10 2017 - 3:26am
Last seen: 1 year 3 months ago

1 Answer:

0

Hi wszystkielogizajete (lol keyboard smask user name)

This is a difficult one to achieve. 
I am not sure if your produce both long and short text return on report build, so it's hard to try and give you exact answer based on your requirements. 
If you either get long or short on reports request, you could put the 2 elements on top of eachother and use the "Print When Expression" 
So create another varable that would indicate of long of short, then add the condition in the "Print When Expression". 
So if long then the one text field will display if shor the other. 

Or you could put the 1 cell on top ot the other and have 1 pixel height, then ensure the short data writes to the short cell and long data writes to long cell. Also ensure the strech with overflow is enables and add stretch type (play around with different types). If the cells don't work, try mutiple subreports, one for long data and other for short data. 

Or you could add additional band and use one band for long data and other for short and use the print when epxression again. 

Or and end of day programmaticlly the only way would be to make use of the jasper java api, to create jrxml on request and set the height and w​dth at compile time.

Just throwing ideas out there, hope it helps.
If you come up with another solution please share. 
​​​​​​




 

joseng62's picture
732
Joined: Dec 5 2014 - 2:43am
Last seen: 6 days 1 hour ago
Feedback
randomness