************************************************************** INSTRUCTIONS ON RUNNING THE WORKING MODEL OF CODEREPORTER ************************************************************** This demo disk contains a working demonstration model of CodeReporter. Listed below is a description of how some of the features of CodeReporter can be utilized. It is important to note that the enclosed CodeReproter working demonstration model is the dBASE IV (.MDX) version. If you require the demonstration model compatible with dBASE III Plus, Clipper, or FoxPro contact Sequiter Software. The working demonstration model is limited to opening databases with a maximum of 400 records. CodeReporter is a Windows application. As such, Microsoft Windows 3.x must be properly installed and running before CodeReporter is initiated. ************************************************************** STARTING CODEREPORTER CodeReporter may be started from the DOS command line by typing WIN CREP_MDX from the CodeReporter root directory. However, since Windows applications are rarely initiated from the DOS command line, the following options are recommended. Once Windows has begun, invoke the File Manager utility by double clicking on its icon (usually found in the "Main" program group). Use File Manager to copy the contents of the demo diskette into a directory on your local hard drive. Once the file list for the CodeReporter directory is displayed, scroll through the list of files until the file CREP_MDX.EXE is located. CodeReporter is invoked by double clicking on this file name. CodeReporter may be invoked using the Windows Program Manager menu options. Select File | Run. Windows displays a dialog box in which you may enter the drive, path, and executable name for CodeReporter. Windows uses icons to give users rapid access to commonly used applications. The CodeReporter icon may be added to any existing group and may be executed, like any other Windows application, with a double click. This is the prefered method of invoking CodeReporter. Please see the Windows User's Guide for more information ************************************************************** CREATING A REPORT CodeReporter loads only one report at a time. As a result, when CodeReporter is invoked you must choose which existing report to load or create a new report. To retrieve an existing report use the Files, Directories, and Drives listboxes to select the filename of the report file. Then click on OK. To start a new report click on the New Report button. This brings up the Select Master Database dialog. Use the Files, Directories, and Drives listboxes to select the desired datafile. This datafile will serve as the report master datafile. When CodeReporter is running, a previously created report can be accessed by selecting Open from the File menu. A new report can be started by selecting File | New. To save a report select Save from the file menu. If the report is a new report which has not been given a name you are prompted for a name. If the report already has a name the report file is updated. To save a report under a new file name select Save As from the File menu. ************************************************************** REPORT OBJECTS The actual content of a report is made up of various output objects. The method for creating an output object is initially the same regardless of the object type; label, expression, or total. The simplest way to create an object is to position the mouse pointer at the position where you want the new object and click on the right mouse button. This brings up the Create Object dialog, which allows you to create a label, expression, or total. When the Create Object dialog initially appears, its default setting is for the creation of a label object. This is indicated by by the Label radiobutton. Enter the text for your label object by typing it into the Object Text edit box. To create an expression output object either select the Expression radiobutton and enter the expression into the Object Text edit box, or click on the Easy Expr. button and use the Expression Entry dialog to enter the expression. Creating a Total type output object varies slightly from creating and Expression or Label. In order to create the output object a total must first be defined. The Totals dialog will appear. In order to define a total the name must be specified, an expression must be provided, a reset group must be set, and the total type must be specified. To start the definition of a new total click on the Create button. A prompt appears asking for a name for the new total. When a name has been provided the Expression Entry dialog appears. The total expression is evaluated for each record and the resulting value is used in keeping the total current. The expression often consists simply of one of the fields in the datafile, but can be more complex and even be dependant on the contents of various fields. A total is associated with a reset group, and resets itself each time the reset group resets. To select a reset group for the total click on the desired group from the list of groups shown in the Reset Group listbox. Finally select the desired type from the Type listbox. Since the desired total is defined, the Total type output object can be created by clicking on the Total Lookup button, and selecting the desired total from the displayed list. Alternatively, the user could select the Total radiobutton and enter the name of the defined total into the Object Text edit box. More than one output object can use the same defined total, and a defined total can also be used in the expression for an expression object or another total. A calculation is similar to a total in that it must be defined before it can be used in an output object. Unlike a total there is no output object specifically for calculations. Instead a calculation is used as the expression, or part of the expression, for an expression type output object. ************************************************************** MODIFYING OBJECTS To modify an already created object place the mouse pointer on the object to be modified and click on the right hand mouse button. The Modify Object dialog will appear. This dialog is identical to the Create Object dialog, and allows you to change any of the characteristics of the object. To select an output object click on it with the left mouse button. ************************************************************** FORMATING OUTPUT CodeReporter provides facilities for formatting output objects in a variety of ways................. Your custom report can take advantage of the display capabilities of Windows through the use of styles. Each output object in a report can have a user defined style associated with it. A style contains information defining a font, font size, colour, and options such as bold, underline, italic, etc. By using various styles output objects such as summary data, or column headings can be emphasized. ************************************************************** STYLES To create a style select Styles from the main menu. The styles dialog box will appear. The currently created styles will be displayed in the Style Selected listbox, with the currently selected style hilighted. There will always be at least one style, Plain Text, defined. This style is created at the time of original report creation, and uses the system defaults. This style cannot be deleted, but may be modified to suit individual needs. To create a new style click on the Create button and enter a name for the new style. When a new style is created it is a copy of the currently selected style, it must then be modified to the desired appearance. To modify a style, make it the current style by selecting it in the Style Selected listbox. Next click on the modify button. The Fonts dialog will appear. Select the desired font, font size, color, etc. and click on OK. The style for a given object can be selected from within either the object creation dialog or the object edit dialog. ************************************************************** DOS REPORTING A report created with CodeReporter can also be printed or displayed from a DOS application through the use of the report functions in CodeBase 5.0. If a report is intended for use with DOS the various styles in the report may be defined for use with DOS. Styles defined for DOS only affect printed output of a report in DOS, screen output will be in plain text. A style for DOS is defined by specifying the printer escape codes to be sent to the printer. To define a style for DOS click on the For DOS button. Pre string control codes are sent to the printer before an objects contents and post string control codes are sent after an objects contents. The codes are entered in the format \xhh \xhh where hh represents a to digit hexadecimal number. For example: if the code for setting bold printing is ESC "G" it would be entered as \x1B \x47. Display Once is a flag which can be set for a given object. This allows the object to be associated with a group in the report so that it is only displayed when that group resets ( similar to the relation between a total and its reset group ). This option can be set from within the create object dialog or the edit object dialog. Object alignment actually falls into two different categories. The first is the alignment of the object contents within the objects area. The second is the alignment of various output objects with each other in the areas of the report. The internal alignment of an output objects' contents can be specified at the time of object creation, or can be set later by modifying the object. The Alignment listbox in the Create Object and Edit Object dialogs allows the user to set the alignment for the contents of the object. The alignment of objects within the various areas of a report definition is controlled by the choices in the Align menu. The members of the Align menu are: Left Justify, Right Justify, Center Justify, Vertical Movement, and Sensitivity. At various points in the creation of a report, CodeReporter requires the user to enter an expression. Expression entry is facilitated through the Expression Entry dialog. A demonstration report, DEMO.REP, has been included to give you an illustration of how a CodeReporter report may look. The included data and dBASE IV indexes where included to allow you experiment with the demonstration report. An expression can be typed directly into the edit area or entered through the use of the listboxes. The Fields list contains all the fields in all the datafiles in the reports relation. Functions contains a list of all the predefined CodeWindows functions and Operators contains the various operator symbols which can be used in creating an expression. Calculations and Totals contain any calculations and totals which the user has previously defined. To transfer data from the listboxes to the expression entry area simply double click on the selection in the listbox and it will be added to the new expression. As discussed in the concepts chapter CodeReporter allows the specification of queries and sort orders on the extended datafile produced by the reports relation. To specify a sort expression select Sort from the Database menu. The Enter Sort expression entry dialog will appear. Enter the sort expression as described in Expression Entry previously. To specify a query expression select Query from the main menu. When the Enter Query expression entry dialog appears enter the query expression. Developed with CodeBase 5.0, the LAUNCH_D.EXE is an example of a utility to run your report under DOS. Typing LAUNCH_D from the DOS prompt will give you an overview of the various paramaters that you can use with the utility. For example, typing in the command LAUNCH_D DEMO from the DOS prompt will show the contents of your report on your screen. The C source code for the LAUNCH_D program is also included.