Skip to main content

I’m in the Report Designer. I have a barcode. How do I integrate the value of the barcode into the barcode as shown below. It doesn’t have to be nested into the code as shown below, underneath is fine too.

My issue is that barcodes are variable in length and they completely ignore text alignment, so I can’t center the Item Number (my value) under the barcode. The barcode is always left justified making for some very ugly labels.
 

Thanks!

Could you share your RPX file and/or the barcode type you are using. 

 

Thanks


 

That is my current Barcode setup. The only thing under STYLE is a center alignment on the text that doesn’t seem to do much. I have tried swapping to other barcode formats, still nothing I can find to center the barcode with the Item Number. Below is my output:

 

 


Alright, here is an idea.  If the barcode width is, in theory, directly correlated to the length of the value it represents, in this case inventory CD, would it be possible to left align the value and add padding of empty space based on the length of the inventory CD.  
 

I’ll see if I can work up an example.   There could also be something we are missing to help with barcode alignment I am just not aware of what that would be. 


Here is an example you can build upon.  The solid line in the image represents the length of both the Barcode Image Object and the Text Box for the description. 

 

To center the text based on the length of the barcode value + a static offset amount.

=PadLeft(eInventoryItem.InventoryCD],Len(LInventoryItem.InventoryCD])+6, ' ')

 

To center the text based on the length of the barcode value + a dynamic offset amount based on the length of the barcode value.

=PadLeft(LInventoryItem.InventoryCD],Len(,InventoryItem.InventoryCD])+CInt(Len((InventoryItem.InventoryCD])/2), ' ')

 

 


That’s not the “right” answer, but it’ll do perfectly since we can’t embed the values or get the barcodes to recognize the alignment setting! Thank you for posting this fix, it’s very simple to execute.


@Michael Hansen 

Glad this worked for your use case.  I would agree, it might be worth creating an Acumatica Idea to allow for centering barcode image based on text alignment values which would be most ideal. 

 


@Mica Mitchell @Robert Sternberg Did you come across a different solution/configuration for the Barcode than adding padding. Please advise. 


Reply