Auto resize field

Whether you're using the Standard or Professional Edition of Quartam Reports, this is the place to ask general questions about using this industry-level reporting tool for LiveCode.
Locked
NingImport
Posts: 87
Joined: Sun Jul 18, 2010 5:23 pm

Auto resize field

Post by NingImport » Sun Jul 18, 2010 7:37 pm

Auto resize field

Posted by Josep M on January 29, 2010 at 8:58pm

Hi,

I need show a field if this have any value and resize itself relative to the amount of data. I mean that if the data have many lines, the field grown to show all the data.

My idea is to put this field in the second line into the detail zone.

Salut,
Josep

=====

Reply by Jan Schenkel on February 1, 2010 at 9:28pm

Hi Josep,

Put the field where you want it to go, then open the Properties inspector, switch to the 'Size & Position" tab, and change the "Dynamic resizing" radio button to "Stretch the field vertically to fit the content." Note that the size of your data field will be considered the 'minimum' size - so if the data field is empty, things will not shift upwards.
If you have any items in your band 'below' that field, you may want to change their "Relative position" to "Fixed distance from the bottom border of the band" - this way, they will be shifted downwards as your field grows.

HTH,

Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com

=====

Reply by Josep M on February 1, 2010 at 10:11pm

Hi Jan,

So if I put a minimum size to 3 pixels, and I have one line of data, the field will be resize to show the data or the data will be show truncated?

Maybe will be nice to have some propertie for a fields that is they are empty don't be showed.

Salut,
Josep

=====

Reply by Jan Schenkel on February 2, 2010 at 6:41am

Hi Josep,

If your data field is 3 pixels high, and is set to stretch to fit the content, then the actual size of the data field on the report will be minimum 3 pixels (if the data expression returns empty) and extend to fit the content (splitting long data over multiple pages if need be). And if you want to hide a field if the data expression returns empty (e.g. if the field has its border set) you can always use a printing condition to suppress the item.
Other reporting libraries may offer a "Remove line when blank" feature, but I've always found the implementation to be a bit ambiguous: if another item in the layout has a bottom or top edge that interferes with the 'remove-when-blank' item 'line' then the line cannot be removed; and you always end up with superfluous whitespace unless you place the items right next to one another.

Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com
===== The above post was imported from the old forum hosted at quartam.ning.com =====

Locked