dBASE onLine Training
The Hands-on Project

Michael Nuwer
November 11, 2002

Session 1
Getting Started

The Hands-on Project must be setup on your computer, much like the Tutorial needs to be setup. You can obtain the compressed archive file named HandsOnProject_src.zip and unpack it to a location on your hard drive.

Use this link to download HandsOnProject_src.zip

I suggest you unzip this archive to "\Pets" on any available drive.

After you have unpacked the files, \Pets will contain a three new folders and 6 files.
\Final
\Source
\Tables

A sample version of the application is in "Final". Use Windows Explorer to change folders (\pets\final) and, run the executable named PetsPlus.exe.


Note: The code in this folder is modified so that the application will run without a database alias. This code is not a good sample of how your finished application will look.

The folder named "Source" contains the source code for all the objects used in the Hands-on Project. You are encouraged to refer to these files when (should I say "if") you get stuck.

The third folder created by the archive is called "Tables". This folder contains the database that will be used in the Hands-on Project. Unlike the Tutorial project, in the Hands-on Project we will not create the table from scratch.

The Hands-on Project is not a set of step-by-step instructions. Rather it is an opportunity for you to apply the techniques you learned in the Tutorial to another application. Hopefully you will also find a few new techniques.

So look at the source code for help if you get stuck with coding this application. (Also ask questions in the Newsgroups at dbase.com)

An overview of the Pet Clinic Application

You start the application by double clicking \Pets\Final\PetsPlus.exe. The application will open with a menu at the top.

In this application the "File" menu is similar to its counterpart in the Tutorial application. However, the "Edit" and "Data" are new additions in this project.

Under the "Forms" menu you will find two items. Select "Customers". The form that opens is for editing Customers and their Pets. Although this form has obvious differences from the forms used in the Tutorial application (for example a notebook is used instead of a tabbox), this form is built very much like the Tutorial forms (Click the Edit button to edit a Customer; Click the "Add Pet" button to call a dialog form).

We will investigate how this is done as we progress through the course.

Next open the "Visit Entry" form. This form appears similar to the Customers and Pets form but it is unlike the forms that you will build in the Tutorial. For example, select the "Find Visits" tab. In this form finding a record is handled with a filter rather than an incremental seeker. This is yet another new thing covered in this project.

Another new feature you will learn when we build this form is how to get a child form to return data to a parent form. On the "Enter Visits" page, click the "New" button. The "Pet Select" dialog form pops up. With this form your can find a pet by name or by customer. When you select a pet and click the OK button, the PetID is returned to the parent form so that the ID can be added to the Visits table.

Yet another new feature in this application is the "Data" menu. Cancel the New record and select the data menu. The items are enabled and permit you to navigate the active form's rowset.

When you close the forms (File | Close All) you should see the items in the Data menu are now disabled.

There are five items in the "Reports" menu. We are going to build two of these five reports. Select the "Pet Information" report. A dialog form opens. This is an Item Mover control. Move "Adam" from the left listbox to right list box. Then scroll down, find "Margo" and move that Pet to the right list box.

When you click the "Print Report(s)" button, Pet Information forms will be rendered for these two animals.

We are also going to create the "Daily Visits" report. This is a summary report and offers a few new elements. In addition this report is printed for a user defined data range.

The remaining menu items are the same as they are in the Tutorial application. To exit the Pet Clinic application, select File|Exit.


Proceed to the next part of the Hands-on Project
Go to the Table of Contents

The Legal Stuff: This document is part of the dBASE onLine Training Program created by Michael J. Nuwer. This material is copyright © 2001-2002, by Michael J. Nuwer. dBASE, dBASE Plus, dBASE SE and dB2K are copyrighted, trademarked, etc., by dBASE, Inc., the BDE (Borland Database Engine) and BDE Administrator are copyrighted, trademarked and all that by Borland Software. This document may not be posted elsewhere without the explicit permission of the author, who retains all rights to the document.