Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: 2 Columns of Data  (Read 10457 times)
Paul M.
Posts: 31


« on: July 27, 2017, 03:50:19 pm »

Hi,

Version 2.50 Genero

Printing 2 columns of data with 6 rows in each col.
In the attached file Col1 the yellow & green areas are my two columns. I am printing 6 rows in each, the yellow  area is fine but in the green area the date that is printed beside "Inspected By" is actually printed beside "Date" in my design and I am guessing that is because there is no data in the 3 rows printed before this.
So how do I pad out each row if there is no data(this time) so that "27/07/2017" lines up beside "Date".

Simple I am sure but it eludes me.
Thanks.

Col2.jpg is my layout




* Col2.jpg (93.16 KB, 369x329 - viewed 2359 times.)

* Col1.jpg (63.09 KB, 947x171 - viewed 2388 times.)
Alex G.
Four Js
Posts: 155


« Reply #1 on: July 27, 2017, 04:20:11 pm »

Hi Paul,

When a value in a WORDBOXWRAPBOX is the empty string it is does not occupy any vertical space to that in a vertical box things move up into the empty space.
To prevent this from happening you can either use a WORDBOX instead or change the RTL expression slightly from {{pr.reference.ref_is2}} to {{pr.reference.ref_is2.length()==0?" ":pr.reference.ref_is2}}.

I hope that this helps.

Kind regards,

Alex
Paul M.
Posts: 31


« Reply #2 on: July 27, 2017, 04:26:10 pm »

Alex,

Wordbox sorted it. I dont need it to be a WordWrapBox.
Never knew that about the wordwrapbox not taking up space.
I knew it would be simple.

Thank you.
Reuben B.
Four Js
Posts: 1119


« Reply #3 on: July 28, 2017, 12:18:39 am »

With regard to Alex's answer, I think you should focus on the X-size, Y-size property of the WORDBOX and WORDWRAPBOX.  Ask yourself, if you don't explicitly define a X-size Y-size value, what is the value of this property. 

With regards to your form design, two alternative suggestions.

You have gone the approach of one HBox with two VBox as children.  I normally go the other way round, one Vbox with 6 Hbox as children.  Each HBox then contains the label and matching value.   Your question will then be, how do you get the columns to align.  Control-select the 6 label fields and in one go set their X-size property to a value e.g. 2cm, or width("longest label"), or max(width("field1"),width("field2")...)

I have also seen Table object been used in similar circumstances.  Delete the body element, clear the border/rule properties, leaving just a header with 2 column and 6 rows.

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines