Ive tried various configurations using centre, left, justified and the | symbol but i cant get the order name to stay aligned when the quantity change from single, double, triple digits.
eg
1x Order Name
10x Order Name
100x Order Name
What i want is the Order Name to all be aligned, an added complication is that i have a headed above the orders that say:
Qty Item Description Price
Now i can get my Price to align to the right edge so that is always under the header price, but if the quantities change the Orders also do not align under the header Item Description and i dont know if it is possible to change that as I have just types those headers in (there might be some Samba tags i could use instead i dont know?)
Here is an example of a receipt that shows things not aligning (except for price i did that lol)
Spaces dont work they just take the item descriotion column out of alignment, this is what happens:
Having one pipe aligns everything to the left of the pipe to the left edge and everything on the right of the pipe to the right edge this would be perfect if i just had to columns
When i insert a second pipe to make three column this is what happens:
First column qty correctly aligns to the left
Third column price correctly aligns to the right
Second column item description also aligns to the right, i want this to align to the left instead so it is next to qty and not to the far right of the receipt next to price
It seems that every pipe that is added after the first aligns everything to the right if that column, is there a way to align to the left?
Spaces do not work they simply move the description closer to the left but as each description is a different length these added spaces cause the alignment to be completely messed up and theres only so many spaces you can do before you exceed the line count of the printer and you get an error message saying this when a receipt tries to print. Adding spaces just seems to act like your adding additional characters to the item description so doesnt help alignment
What im looking for is:
1x Crisps £0.50
That is how it appears if there is only one pipe that is placed before price and it looks perfect until quantity changes from single digits to double or triple digits as quanity and item are in the same column
If i do this and add a pipe inbetween qty and item i get this
1x Crisps£0.50
Item aligns far right next to price, how can i get it to align to the left of its column? Spaces after the item move it left but its still aligning to the right so different item descriptions lengths are still out of alignment as below
1x Crisps £0.50
1x Chocolate bar £0.70
Spaces separate item from price but item description is still aligned right and not left
Any ideas?
EDIT it appears my spaces in my examples dont show and when i submit my post the spaces have been taken out so it doesnt illustrate my point when i get time ill upload copies of receipts to show what happens on each format
when i put another pipe where you suggested before so its formatted as | at the start this makes the other pipes in the line actually print and they do not behave as pipes to separate columns as shown in the screen shot below
if it use formatting as {QUANTITY}x |{NAME}|£{TOTAL AMOUNT} i get:
I didnt mean copy it exact. Meant for you to play with it and try different spacing. Notice top of my ticket where OP# is etc… those are aligned with | as well.
spacings dont work as they act like printed characters if I add spaces to align my first line with Dry Roasted Peanuts i need a different number of spaces to align Frazzles as the descriptions are different lengths
This is how I had it setup like yours, but if you try and do 3 items the first as quantity 1 then second as 10 and the third as 100 yours wont line up either
Using the exact same setting if you have different quantities of single, double and triple digits the rest comes out of alignment as qty and product name are in the same column as below
Ok I understand what your wanting now. I think @emre would have to come up with a new tag for that… or open up a new way to use | with Justified. You can line it up with character counts etc… but you cant do it from both sides of pipe at same time.
You can pad numbers with F function. For example [=F('{QUANTITY}','{0,2}')] will pad quantity value right with 2 spaces. You can pad it to left with negative values. I know that won’t work flexible as justify feature but it might look better at least for double digit numbers. <J> tag will align first column to left and other columns to right as we generally use it for or values. I’ll try to improve that on next releases.