Foxpro print text file


















It's not much work to do this and it provides you with the ability to format the data. Assume this is your data inside myfile. If use this more than once - it is worth the few mintues to setup the report, create the cursor, and append the data. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework. The Tek-Tips staff will check this out and take appropriate action.

Click Here to join Tek-Tips and talk with other members! Already a Member? Join your peers on the Internet's largest technical computer professional community. It's easy to join and it's free. Register now while it's still free! Already a member?

Close this window and log in. Already a Member? Join your peers on the Internet's largest technical computer professional community. It's easy to join and it's free. Register now while it's still free! Already a member? Close this window and log in. Join Us Close. Join Tek-Tips Forums! Join Us! By joining you are opting in to receive e-mail. Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here. Currently, it will do some processing and print out a nice little report. In an effort to move toward a paperless office or, at least kill less that half a forest each month , I've been asked to make the report print to a file which will be stored on the network. The question is, how? I tried a set device to file report. I end up with a file that has a few records, none of the headings, and a whole lot of blank lines. I also noticed that a lot of stuff that looked like the report headers was being printed to the screen.

What's going on? The program currently prints using the following type of code: set device to printer set print on a,b SAY whatever It also uses? This is done in a separate program file. Does anyone have any ideas? Is there anything I should look for? Dave, Thanks for the response.

I tried your suggestion and, as a result, I'm making progress. I'm now getting all the records in the report. On the down side, I'm still getting the report headers printing to the screen.

The body of my report is generated by a file called snowbody. This part is working now. The report headers are generated by snowhead. But I also think it's useful to look at your tools and code based on a few basic goals not necessarily in this order : a readability b maintainability c functionality Readability can be, in my mind, very subjective.

Likewise a user-defined method named GetAccess seems more usable than p0acc. But if you have to read 25 lines of code to understand a procedure or if you have to read 5 lines, which would you prefer?

And I also would say that maintainability also comes from a code's readability factor. As part of the Code Analyst VFPX project, I'm really interested in finding ways of making suggestions to other developers on how to make their code more readable and more maintainable. Some of the default rules can be seen here. So join the discussion or take the poll and let me know - how maintainable is your code?

Garrett said…. If you need to read in a file of over a certain size, you need the LLFFs, which are about as wordy as the StreamReader. I hit this at work a while back -- I needed to append some text to the beginning of a file. October 30, at AM. Andrew MacNeill said…. Very true, Garrett - but in those cases, I would almost recommend creating a cursor or something along those lines to import the file into a table for faster processing. Also to point out that in VB, you can type: My.

October 30, at PM. Ooohh, I forgot about the My namespace stuff. I gotta remember to look at that while writing some of my new VB code. Thanks yag! November 2, at PM. Post a Comment. Popular posts from this blog. Well, that explains CodePlex



0コメント

  • 1000 / 1000