****************************************************************
Tutorial 1
****************************************************************

	The first tutorial report simply lists the contents of the data
file ENROLL.DBF.  This data file contains the fields STUDENT_ID, CLASS_CODE,
and MARK.   

The report uses a title,
summary, page header, page footer, and one group header.   


****************************************************************
Starting the report 	
****************************************************************

Start the CodeReporter by beginning from the B: drive DOS prompt
 and type "WIN CREPDMDX.  The Report Retrieve dialog 
box appears -- prompting for the drive, path, and name of the report 
to be loaded.  Since this tutorial begins from scratch, there isn't a report to load. 

Select the 'New' report button. 

Select the top master data file 	

CodeReporter bases reports upon
a top master data file, and prompts for one as a new report is
initiated. 

Select ENROLL.DBF from the (enclosed on this disk) 
using the drive and path list boxes to
navigate to the correct directory.  Once ENROLL.DBF is displayed
in the 'Files' list box, select it and then select 'OK'. 

Once this initial setup is
completed, CodeReporter displays a blank report with all of its
default values intact.  A default group, 'Body', is created and
is set to 24 points in height.  The footer for the 'Body' group
is also created, but has a default height of 0, and as such, is
not displayed. 

****************************************************************
Defining the report areas 	
****************************************************************

The next step is to define the
various groups and areas for the report.   For this simple
report, only one group -- Body -- is necessary. The Title,
Summary, Page Header, and Page Footer areas, which  have a
default size of zero, are also used.  Since it is necessary to
add output objects to these areas, their sizes must be
increased.  

To modify these settings, select the Groups | Title, Headers,
Footers, Summary menu option.  Make the following changes and
select OK: Title:  36 points,  Summary:  36 points,  Page
Header:  24 points, and  Page Footer:  24 points. 

The report design screen now shows the Title, the Page Header,
the 'Body' header, the Page Footer, and the Summary.



****************************************************************
Creating the Output Objects 	
****************************************************************

Now that the areas of the report
have been defined, the necessary output objects can be created
and placed in the desired areas. 

The object in the title, for this report, is
simply a label output object. 

Create a new output object by clicking the right mouse button
in the title area (just below the Title bar, above the Body header),
 or by selecting the title area and pressing
the Insert key.  The 'Create Object' dialog box is invoked. 

The default type for an output object is a label.  Since this
title is a label object, no change is required.  The data in the
'Object Text' edit control (for a label object) is copied
directly into the report. 

Enter 'Sequiter Software School of Advanced Learning' (or some
other appropriate title) and select OK.  The new output object
is created and placed in the title of the report.  Center the
new object by dragging it to the center of the title. 

Repeat the above steps to create the label object in the
summary.  However, when the 'Create Object' dialog box is
displayed, enter '**** End of Report ****' in the 'Object Text'
edit control. Center the newly created label with the label in
the title area.  This can be done by "eye", or using the Align |
Center menu option.  Select both the title and the newly created
summary objects (holding the shift key and selecting each in
turn with the left mouse button), and then select the Align |
Center menu option.  The object in the summary area is centered
on the center of the title's object. 

Adding the fields 	

There are two ways to place the required
field output objects and their titles.  One is faster with less
flexibility, and the other is slower, but provides maximum
control. In order to weigh the benefits of both techniques, both
are discussed here.  Before creating any more output objects,
save the report. 

****************************************************************
Save the report in progress 	
****************************************************************

Select the Files | Save menu
option.  A Report Save dialog box prompts the name of the file
to be saved.   Type TUT1.REP and then press ENTER or select OK. 

****************************************************************
Creating the expression objects the "slow" way 	
****************************************************************

For this report, each data file field should have a 'title' above it
containing the name of the field.  These label output objects
can be created manually and positioned above the appropriate
data file field. Add each individual label object to the Page
header by clicking the right mouse button while the mouse
pointer is in the Page header area. The 'Create Object' dialog is
displayed with its default information.  Enter the name of the
fields in the 'Object Text' edit control and modify the
coordinates (in points) to the following: 



	Field Name 	Left Position 	Right Position 

	STUDENT_ID     0                 0 

	CLASS_CODE   108                 0 

	MARK         216                 0 



Once the titles for the fields are entered into the page
header, create the actual expression output objects for the data
file fields.  Add the new output objects to the 'Body' header
area.   For each data file field, create a new output object
using the right mouse button or the Insert key.  Once the
'Create Object' dialog box appears for each object, enter into
the 'Object Text' edit control the name of the data file fields
or use the 'Easy Expr.' button to invoke the 'Expression Entry'
dialog box.  Either way, the following field names should be
entered into the various 'Object Text' edit controls: 

ENROLL->STUDENT_ID, ENROLL->CLASS_CODE, ENROLL->MARK. 

Before returning to the report design screen from the Create Object
dialog, change the positions of the objects to match those of
the 'titles' created above using the 'Position from Left' and
'Position from Top' edit controls.  Use the values shown above.  Or, 
drag the object to the center using the mouse.


****************************************************************
Creating the expression objects the "fast" way 	
****************************************************************

A quicker method of placing the data file fields and their labels 
is to use the Report | Instant Layout menu option. First, load the 
previously saved report by selecting the Files | Open menu option and
selecting the TUT1.REP report file.  When CodeReporter asks
whether or not to save the current report, select NO, since
Instant Layout is going to be used to add the same output
objects. 

Once the report is loaded, select the Report | Instant Layout
menu option.  CodeReporter automatically creates not only the
expression output objects and places them in the 'Body' group
header, but also creates the fields' labels and places them in
the page header. 


The advantage of Instant Layout is that it is incredibly fast
to use.  The major drawback is that if anything other than the
default titles, styles, distances between objects, etc. are
used, it may take more time to make the custom changes than to
have manually created the objects in the first place. 

****************************************************************
Adding the DATE() 	
****************************************************************

DATE() is a dBASE function that is used to
retrieve the current date from  the system clock.  To display
this value, create an expression output object in the Page
header area.  When the 'Create Object' dialog appears, type
DATE() in the Object Text edit area, and select the Expression
radio button.  Do not select 'OK'. 

Changing the date format 	

Date output objects use the global setting's default
date format (MM/DD/YY).  In this report, however, the date should
look like "November 12, 1992". Select the Create Object dialog's
Format button and enter 'MMMMMMMM DD, CCYY'.  Specifying this
value in the date object's format does not change the global
setting of the date format, but does display this object in the
desired format. 

****************************************************************
Creating the page footer 	
****************************************************************

The page footer contains an expression
object that displays the current page number.  Create an
expression object in the page footer and select the 'Easy Expr.'
button.  The 'Functions' list box of the 'Expression Entry'
dialog contains the function PAGENO().  Double click on the
function to move it to the 'Expression' edit control.  Select
'OK' at both the 'Expression Entry' dialog and the 'Create
Object' dialog to complete the creation of the page number. 

****************************************************************
Viewing the report 	
****************************************************************

The design of the report is complete.  To
view the final report, select the Files | Display menu option. 



****************************************************************
Sorting the output 	
****************************************************************

While this report does what it was designed
to do -- list out the contents of the ENROLL.DBF -- it does not
promote a quick look up of either the student IDs, or the class
codes.  The report is displayed using the physical order of the
data file records on the disk.  The physical order of data files
is usually quite random and does not lend itself well to
reports. CodeReporter provides two ways of sorting a report: a
top master tag, and a sort expression.  The top master tag is
used in this tutorial, while the sort expression technique is
discussed in Tutorial 2. (TUT2.TXT)

Top master tag 	

A top master tag retrieves records from the data
file in the sort order stored in an index tag. This technique
is almost as fast as accessing the records in physical order,
since the sorted order is stored on disk in the tag. The top
master tag is selected using the 'Select Top Master Tag' dialog
box.  Choose the Database | Top Master Tag menu option to invoke
this dialog box. 


The ENROLL.DBF data file has an associated index file,
ENROLL.MDX.  Select the 'Open New Index' button and use the
'Directories' and 'Drives' list boxes to locate ENROLL.MDX provided
on this disk.  

Once ENROLL.MDX is displayed in the 'Files' list box, highlight it
and select 'OK'. The 'Index Tag' list box displays the tags
stored in ENROLL.MDX: ID and CODE.  Select ENROLL->ID and
display the report again.  The output is now sorted by the student's 
ID number.

****************************************************************
Saving the report 	
****************************************************************

This completed report is used as a basis for
the next tutorial, so save the report using the Files | Save
menu option.  The Report Save dialog box is not displayed, since
the name of the report file is known. 

****************************************************************
Overview 	
****************************************************************

This tutorial has explained the basic skills of:
      .  Sizing the page header, page footer, title, and summary areas,
      .  Placing and moving output objects, using the Position edit
           controls and also dragging the controls. 
      .  Creating Expressions objects using the Expression Entry dialog 
           box and typing the expression directly into the Object Text 
           edit control,
      .  Formatting a date output object, 
      .  Printing a report to the screen, and 
      .  Changing the order the records are outputted by changing the 
           top master tag. 






