Показать сообщение отдельно
Старый 09.03.2010, 20:18   #1  
Damon is offline
Damon
Участник
 
8 / 10 (1) +
Регистрация: 11.01.2010
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);

}
thanks in advance.