By using this website, you agree to our Terms of Use (click here)
I am trying to get serial numbers to print evenly over three columns on an invoice. I made the sub report no problem here.
My thought process was to try tabular but this does not work. Next I made a variable that fills up on every detail line with serial number, building a string:
=Iif(
Trim(Len([SOShipLineSplit.LotSerialNbr]))>1,
$SerialTotal
+ PadRight( Cstr([SOShipLineSplit.LotSerialNbr]), 25, '_' )
+
Iif(
InStr( Cstr( round( Cdec($LineNbr)/3,2) ),'.')>0,'','{br}' )
,$SerialTotal)
So I am adding the carriage return every third serial number to get them to line up instead of using the word wrap as that is making them go out of order.
But I cannot seem to see why, but on screen it is still looking uneven. First column is fine but second two columns look uneven. I changed font to Courier New and this makes them even.
Is there a better way?
Is the problem with Tabular that it won't flow to the next line after three columns?
You probably had to change fonts because you need a monospaced font to ensure that the whitespace is the same for each line.
Not sure if this idea is cleaner, but what about using the mod operator to put a formula like this in the VisibleExpr field on the section:
=$LineNbr % 3 = 0
That would divide the line number by 3 and check if the remainder is zero. By using the VisibleExpr field, you'd only be allowing the section to print every third row.
Then for the columns.
You could have three columns with a separate textbox for each column (to avoid whitespace issues) and use the Next function to get the values from the hidden rows:
Column 1:
[SOShipLineSplit.LotSerialNbr]
Column 2:
=Next([SOShipLineSplit.LotSerialNbr])
Column 3:
=Next(Next([SOShipLineSplit.LotSerialNbr]))
Nice workaround formula. Glad to hear that you got it working. Enjoy the holidays! I hope you get lots of quality time with family.
We are also a MYOB Advanced customer and Report Designer bundled with that includes mod operator.
Version I am running is 18.108.16.168.

