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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP General Report creation help.

Status
Not open for further replies.

Labell

Programmer
May 9, 2012
9
US
I was brought in on an older program, as a fairly new programmer, I have little to no experience with VFP. I have upgraded the application from VFP7 to VFP9 by adding the line 'SET ENGINGBEHAVIOR 70' to allow this program to run. I am trying to add a report and form to choose what information from the DB to display on the report. I would like to know how to reference information in the database in the form, i.e. how to choose say a 'location' in the DB and show all items at that location. The database is a DBC file within the same directory as the program.

Also within the form, how best to go about generating the list of 'locations' into a drop-down box on the form.
 
For all new VFP programmers I recommend that they take a few minutes and look over the free on-line VFP tutorials at:

Of particular note (based on your original question) might be:
Basic Reporting - Pt. 1
Basic Reporting - Pt. 2

I have upgraded the application from VFP7 to VFP9 by adding the line 'SET ENGINGBEHAVIOR 70'

I assume that this was a typo or something because you cannot upgrade an application from VFP7 to VFP9 by merely changing the ENGINEBEHAVIOR setting.

I guess that your question is still too general for me to answer precisely. Perhaps, once you look at the tutorials, it will become more clear to you.

Feel free to come back with a more specific question.

Good Luck,
JRB-Bldr
 
jrbbldr said:
I assume that this was a typo or something because you cannot upgrade an application from VFP7 to VFP9 by merely changing the ENGINEBEHAVIOR setting.

If Labell opened the VFP7 project in VFP9, added that line and recompiled, that would be an upgrade fixing most of the problems you could get with SQL.

Additional to that there would be SET REPORTBEHAVIOR 80, but maybe you don't have any reports yet and start doing some, then the new report engine of VFP9 should not be disabled, of course.

This also isn't answering most of your questions, Labell, but feel welcome, this is no unreasnable step to take into moving to VFP9 or into VFP overall.

One step after the other. I second jrbbldr, in that the video lessions will show you the basics of reporting, which would be a first step.

Bye, Olaf.
 
Labell - If you're more of a reader than a viewer (that is, you'll learn from reading than from watching videos), consider ordering the book "The Fundamentals" from Hentzenwerke Publishing. I think at this point, it's only available as an e-book, but it's still a book.


Just to give you some basics, the DBC file you mentioned is a Visual FoxPro database, but it doesn't actually contain the data. Instead, it's a kind of catalog of the tables in the database. The actual tables are stored in files with a DBF extension. Any given table may have an additional FPT file, to store freeform text data from memo fields, and a CDX file containing index information. You'll probably find all the data files in the same folder as the DBC.

To help figure out what to tell you next, do you have experience with SQL? Can you write a simple query? If so, you'll be glad to know that VFP supports a SQL subset, and the easiest way to organize data for a report is to use a query.

Tamar
 
I appreciate all the information and replies. I am however a visual learner. I will watch these videos and reference them for future questions. If I have a further questions, I will be sure to report back here. Thank you everyone. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top