Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print with certain font
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00139536
Message ID:
00149055
Views:
36
Tim,

I received the sample file you'd sent, and after running some tests have pinpointed the cause of the problem. The file appears to stop printing entirely, but in fact it's truncating the last line in the file. The reason appers to be that this line in particular is 1254 characters long, and VFP's type command apparently has a limit of 255 characters per line. This would occur no matter where the line was in the file. If there were another line after this one, it would still print after the truncated line.

Ok, having determined the problem, the solution is fairly simple. Instead of writing the memo to a text file, then TYPEing the file to the printer; you could use the following code:
Set Print On
set memowidth to 80
? recipe.contents      && the memo field
set print off
Another alternative, would be to manually edit the affected records and insert carriage returns.

In your e-mail, you'd asked how to handle the formatting of the printed output. The solution here would be to simply use a report to print the data rather than the direct output to the printer. Is there a reason you're not using this approach? If not, this would appear to be the best solution to your problem.

>The active window shouldn't make a difference that I'm aware of. Just how large is this file? Is is consistant in that any memo file over a certain size has this problem? If possible, and the file is not extremely large, feel free to e-mail a sample problem file, and I'll see if I get the same results.
>
>>>Have you checked the file to make sure that it's contents are complete? Are there any odd characters in the file that may be causing this behavior?
>>I've checked. It happens on multiple records(memo fields). Does it have something to do with the active window at the moment of printing?
>>-TB
>>
>>
>>
>>>>Ken, My project has 1 last glitch. When I issue the following
>>>>
>>>>{copy memo contents to pfile. addit
>>>>SET PRINTER FONT 'courier', 12
>>>>type pfile. to prin}
>>>>
>>>>On larger print jobs, the whole memo(pfile) does not print, it just leaves off halfway thru.
>>>>Any clues? thank you.
>>>>-TB
>
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform