Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing _pcolno causes Carriage Return?
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00513724
Message ID:
00513815
Views:
10
Rodd,

According to FPD 2.6 help ' Assigning a value to _PCOLNO has the same effect as using the AT clause of the ? command'. I guess it answers your question why it generates CR code.

>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
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform