×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Line Wrapping at 50 when PRINTER set to file

Line Wrapping at 50 when PRINTER set to file

Line Wrapping at 50 when PRINTER set to file

(OP)
I have a VFP9 program which is long running and while it runs I log messages to the screen using "?" output. I also wanted to keep a record of the messages so I used

CODE -->

SET PRINTER TO LOGFILE.LOG ADDITIVE
SET PRINTER ON 
in order to output everything to a file. Been running this way for years.

When looking through this log file I often noticed that sometimes it would record a line just fine and sometimes it would start "wrapping" all lines over a certain, very small, length.
Sometimes in the middle of a series of messages it would start wrapping and continue that way to the end.
Here's an example of the same message type one day fine and another day wrapped.

CODE -->

AAA AAAA Order #: 2770730386 UPS Tracking #: 1Z0V36E90341443786 AAA Order #: 590114 COULD NOT BE UPDATED! Shipping notification email has already been sent for this receipt. 

CODE -->

AAA AAAA Order #: 2799032209 UPS Tracking #:
1Z19EY030340824261 AAA Order #: 592945 COULD NOT
BE UPDATED! Shipping notification email has
already been sent for this receipt. 

You can see that this is not even 80 characters, which I would have expected an old time Foxpro "default" width to be set at, but looks to be 50.
I have searched through here (and any other Google responses) and I cannot find any way to set the character width of the "default" printer and certainly not when using SET PRINTER TO filename.

Anyone have any ideas what a solution might be?

RE: Line Wrapping at 50 when PRINTER set to file

Hi,

Did you read topic "SET MEMOWIDTH Command" in VFP Help?

mJindrova

RE: Line Wrapping at 50 when PRINTER set to file

To create text files with fixed width columns you have other options, too.

An SDF type ouput is like that, and can be done with a tble or cursor, well, in short a workarea as source with COPY TO.

Chriss

RE: Line Wrapping at 50 when PRINTER set to file

(OP)
@mJindrova No I did not. Was not aware MEMOWIDTH affected PRINT TO FILE output.

@Chris Miller Thanks, good "outside the box" idea.

RE: Line Wrapping at 50 when PRINTER set to file

What about using ALTERNATE instead?

SET ALTERNATE TO 'FILENAME.LOG'
SET ALTERNATE ON

* Run program

SET ALTERNATE OFF
SET ALTERNATE TO

RE: Line Wrapping at 50 when PRINTER set to file

By the way, you missed the code tags just by one on the icon bar, you can edit your code and replace the word spoiler with code to get it as intended.

Chriss

RE: Line Wrapping at 50 when PRINTER set to file

(OP)
@Chris Miller Doh! Thanks.

RE: Line Wrapping at 50 when PRINTER set to file

(OP)
@Dan Olsson Thanks. I forgot about that (at least I think I knew it once!).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close