09.03.2010, 20:18 | #1 |
Участник
|
Building an escape sequence in AX 3.0
Hi,
I have to print a barcode in Axapta 3 and for various reasons i have to use ann escape sequence to achieve this. I have written the report display items and methods etc, but my problem is that the escape sequence has 2 zero (null) values in it. Axapta (or windows?) filters these out so that they never make it to the printer. I have proved this by outputting this escape string to a file and the nulls are missing. So my question is how do i get axapta to allow zero values in an escape string? The code in the method is below. The string building is in two stages purely to keep the two escape sequences visibly separate in the source code. X++: display str empline1() { str myString; myString = num2char(27)+num2char(16)+num2Char(65)+num2char(8)+num2char(4)+num2char(0)+num2char(0)+num2char(3)+num2char(1)+num2char(1)+num2char(1)+num2char(1); myString = myString+num2char(27)+num2char(16)+num2char(66)+num2char(14)+num2char(65)+'1111-1234567'+num2char(103); element.setEscapeSequence(myString); return element.passThrough(myString); } |
|
09.03.2010, 21:30 | #2 |
Участник
|
Use Binary or BinData classes.
Binary example: WinAPI::getComputerName() BinData exampl: PDFViewer::writeBitmap() |
|
|
|