Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list command problem in vfp6 1

Status
Not open for further replies.

NatureFocus

Programmer
Feb 8, 2005
4
0
0
US
Hi,
I have used foxpro 2.6 a lot for data conversion and data analysis and use the list command heavily for one-off reports. I have attempted to convert to VFP 6.0 several times, but the formatting of the data on the screen / printer makes it useless. It seems to pad out fields very wide, so the data wraps around into a confusing mess. I have poked around trying to fix it, but can't find the magic incantation. Is there a way to make it list like foxpro 2.6?

An example would be: 'LIST OFF fname,lnams,phone'. In 2.6 you get 3 nice columns, in vfp6 the fields are padded out and the lines wrap around.
I hope its just a "SET"ing that I am missing. Thanks.
-Eugene
 
Eugene,
At least three other possible solutions:
1) Change the screen and/or printer font to non-proportional "small" font. e.g Try Courier New 9
Code:
 -- Screen --
_screen.FontName="Courier New"
_screen.Fontsize=9

 -- Printer --
SET PRINTER FONT "Courier New", 9
In general:
SET PRINTER FONT cFontName [, cFontSize] [STYLE cFontStyle]
command to set the font to a smaller fixed width font (non-proportional). For a list of candidates
check out
2) Use the AFIELDS( ) Function to get the data, transfer it to a cursor, and create a simple report.
Adjust the columns as you'd like them.

3) Go to the UT ( download area and get one of the many free
utilities that will do this for you. LS - List structure is one that comes to mind.

Rick
 
In addition to Rick's suggestions, I wrote a piece in FoxPro Advisor about this exact problem. It's in the December '04 issue.

Tamar
 
Hi rgbean,
Thanks, it works. I have put off converting to vfp for a couple of years because the list did not work the way I needed it. Issuing the _screen command sets the default font and makes the display useful. I have little documention on VFP and the MSDN was hard to find an answer to my problem, so I had given up.

I can not use the report generator because of the nature of what I do; Fraud detection for a telephone system. I run a select from a huge Oracle DB into a cursor, Select from that, then write it to a file, suck it into foxpro (2.6a) and do all sorts of investigations on the data. I may index and view the data dozens of times and run mulitudes of programs against the data looking for fraud. Every case is differant, and I have to be very creative to detect differant patterns. Once a pattern is detected, I do new selects... to home in on the fraud.

Thanks again. -Eugene
 
If you're looking for good documentation on VFP, check out the books at
(Disclaimer: I'm a co-author of quite a few of them.)

You might be surprised by what you can do with the Report Designer, especially with the major enhancements in VFP 9.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top