Barcode object align center when building report

On my report I have a shape within this shape a barcode object. Because the user can select which type barcode he/she wants and the barcode number are every time different, I need to align the barcode within the shape.

I have tried a lot but it doens't work very good.

I use this code:

bar_Product1.Left := shp_Barcode1.Left + ((shp_Barcode1.Width - bar_Product1.Width) / 2);



I have tried this code in the OnBeforePrint of the page, in the OnBeforePrint of the masterdata and in the script of the barcode.

But no one is good.

How do I solve this problem?

Comments

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.