Barcode - centering text and memoViews
Due to forcing EAN128 barcode to act as GS1-128 in my project, there is a little problem with barcode description (human-readable text {HRT} below the code).
Description string {HRT} should be different than code data, but there seems to not be possible using any properties. I wrote few functions in PascalScript and they do the proper job with data, special chars, parentheses etc.
E.g. barcode data should be:
2401234&1;101234
but {HRT} should be printed as:
(240)1234(10)1234
Simple (and ugly) solution is to put "memoView" below the code and set "showText" property of barcode to false. But there is another problem - exact centering text with code of variable length. You may think, there is nothing easier than set memoView.Width := Barcode.Width in PascalScript. But during report execution, barcode.width property, readed by PascalScript, has always the same, independed of code length value, which is equal to initial width in design time (FR bug?).
Does anyone have any solution to proper center this text with barcode? And the most important condition - solution must be independent of application source code.
Description string {HRT} should be different than code data, but there seems to not be possible using any properties. I wrote few functions in PascalScript and they do the proper job with data, special chars, parentheses etc.
E.g. barcode data should be:
2401234&1;101234
but {HRT} should be printed as:
(240)1234(10)1234
Simple (and ugly) solution is to put "memoView" below the code and set "showText" property of barcode to false. But there is another problem - exact centering text with code of variable length. You may think, there is nothing easier than set memoView.Width := Barcode.Width in PascalScript. But during report execution, barcode.width property, readed by PascalScript, has always the same, independed of code length value, which is equal to initial width in design time (FR bug?).
Does anyone have any solution to proper center this text with barcode? And the most important condition - solution must be independent of application source code.
Comments
THX gpi. I was afraid of this. Dependency of this kind is unacceptable this time.
Incidentally, FR is great tool, but why functionality like separate {HRT} of barcode data is not so obvious for FR team?