General information
Category:
Reports & Report designer
Title:
Changing _pcolno causes Carriage Return?
I was experimenting with printing printer control codes to a file yesterday using ??. I did the following:
set printer off
set printer to 'c:\temp\rodd.txt'
set printer on
? 'Column1' at 2
?? trim(prcodes.ulineon) && Ctrl code from table for turning underlining on
_pcolno = 9
?? 'Column2' at 15
?? trim(prcodes.ulineon) && Turns underline off
_pcolno = 22
...
(I reset the value of _pcolno so that the subsequent at's would work correctly. The printer ctrl codes increment the value of _pcolno and throw of positioning.) In this example, the underlining started from the left margin and ran through the end of Column2. It should've started at the beginning of Column2. We looked at a Hex dump of the file and realized that after changing _pcolno, a CR was inserted and Column2 was padded from the left margin ... thus, everything from the left margin over was underlined.
Our understanding is that a CR is only inserted when the column number at which you tell it to print is less than the value of _pcolno. In this case, that wasn't true. _pcolno was set to 9 (explicitly) and we were trying to print in column 15.
Does anyone understand why the CR was inserted or how it can be avoided.
Rodd
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only