Anda di halaman 1dari 218

7.

2 Help
Released: 14. January 2010

Table of Contents
Help File ......................................................................................................................................... 1 Help on Help ................................................................................................................................. 1 Quick Start.................................................................................................................................... 2 Starting DataEase ......................................................................................................................... 2 Opening a DataEase Application ........................................................................................................ 3 What's in the Application? ............................................................................................................... 3 Working with Forms....................................................................................................................... 3 Creating an Application .................................................................................................................. 5 Creating a Form ........................................................................................................................... 6 Designing a Form .......................................................................................................................... 6 Defining Relationships .................................................................................................................... 8 Creating a Multiform ..................................................................................................................... 9 Creating a Form over an Existing DataEase Table .................................................................................... 9 Importing Data into a DataEase Table.................................................................................................. 9 Using a Report ............................................................................................................................ 10 Using the DataEase Query Language (DQL) ........................................................................................... 11 Creating a Multi-table Report .......................................................................................................... 12 Adding Summary Variables to Headers and Footers ................................................................................. 12 Manipulating Data Using DQL ........................................................................................................... 13 Graphing Data in a Report .............................................................................................................. 13 Locking Strategies .......................................................................................................................... 13 Locking Strategies ....................................................................................................................... 13 Menus and Toolbars ........................................................................................................................ 16 DataEase Menus .......................................................................................................................... 16 The Toolbars .............................................................................................................................. 16 Custom Toolbars ......................................................................................................................... 16 Applications ................................................................................................................................. 18 Open/Close Catalog ..................................................................................................................... 18 Application Status........................................................................................................................ 18 Application>>Preferences ............................................................................................................... 19 Elements Options ........................................................................................................................ 20 Visual Options ............................................................................................................................ 21 Undo Options ............................................................................................................................. 21 Grid and Ruler Options .................................................................................................................. 21 Workstation Preferences ................................................................................................................ 29 Application Paths ........................................................................................................................ 30 Sorting Options ........................................................................................................................... 32 Application>>Relationships ............................................................................................................. 33 Window>>Arrange Icons ................................................................................................................. 36 Application>>Utilities>>Backup Application .......................................................................................... 36 View>>Data-Entry Form ................................................................................................................. 37 View>>Table .............................................................................................................................. 37 View>>Form............................................................................................................................... 38 File>>Close ................................................................................................................................ 38 File>>Exit ................................................................................................................................. 38 Application>>Custom Functions ........................................................................................................ 38 Application>>Users....................................................................................................................... 40 File>>Delete .............................................................................................................................. 41 Document>>Properties .................................................................................................................. 41 Document>>Security ..................................................................................................................... 43

iii

Printed Documentation

View>>Zoom .............................................................................................................................. 44 Document>>Print Options ............................................................................................................... 44 Opening a Document .................................................................................................................... 45 The Open a Document Dialog........................................................................................................... 45 The Login Failure Dialog ................................................................................................................ 46 How to Open a Document ............................................................................................................... 46 Application>>Utilities>>Reorganize Form ............................................................................................. 46 Application>>Utilities>>Restore Application ......................................................................................... 46 The Restore Dialog ....................................................................................................................... 46 Document>>Default Tab Order ......................................................................................................... 47 File>>Save As ............................................................................................................................. 47 Forms ......................................................................................................................................... 49 Customizing Table View ................................................................................................................. 49 File>>New>>Form ........................................................................................................................ 50 Open a Related Form .................................................................................................................... 51 Printing a Document Layout ............................................................................................................ 51 Setting Links .............................................................................................................................. 51 Tab Order ................................................................................................................................. 53 User Menus .................................................................................................................................. 54 Menus and Custom Menus ............................................................................................................... 54 Custom Menus ............................................................................................................................ 54 How to Add a Pull-down Menu Option ................................................................................................. 56 How to Copy a Document's Pull-down Menus to Another Document .............................................................. 56 How to Create a Custom Pull-down Menu for an Application's Opening Screen ................................................. 56 Create a Menu ............................................................................................................................ 56 How to Create a Pull-down Menu ...................................................................................................... 57 How to Delete a Pull-down Menu or Option .......................................................................................... 57 How to Rearrange a Pull-down Menu .................................................................................................. 57 How to Restore the Default User View Pull-down Menus ........................................................................... 57 Record Entry ................................................................................................................................ 57 Abandon a Field Value................................................................................................................... 57 Abandon a New Record .................................................................................................................. 57 Abandon Changes to a Record .......................................................................................................... 57 Copy a Field Value to another Record................................................................................................. 58 Copy all Data from one Record to another ........................................................................................... 58 Copy/Move objects between Documents ............................................................................................. 58 Copying data from Multiple Fields ..................................................................................................... 58 Copying Data from Multiple Records .................................................................................................. 58 Create a New Record using previous Data ............................................................................................ 58 Deleting Records ......................................................................................................................... 59 Display a Blank Record .................................................................................................................. 59 Entering New Records ................................................................................................................... 60 Erasing Field Values ..................................................................................................................... 60 Modifying Records........................................................................................................................ 60 Columns and Rows ....................................................................................................................... 61 How to Change the Height of All Rows in Table View ............................................................................... 61 How to Move a Column in Table View ................................................................................................. 61 Pasting Values between Documents ................................................................................................... 61 Perform a Lookup ........................................................................................................................ 61 Recovering Deleted Records ............................................................................................................ 62 Return Data from a Related Form ..................................................................................................... 62 Moving between Related Forms ........................................................................................................ 62

iv

Table of Contents

QBF Reports (Query by Form) ............................................................................................................. 62 Query by Form ............................................................................................................................ 62 Clear QBF Criteria........................................................................................................................ 63 Using a Data Filter ....................................................................................................................... 63 Locating a partly-known Record ....................................................................................................... 65 Locating Records based on Sound...................................................................................................... 65 Locating Specific Records ............................................................................................................... 66 Print Records in a Form ................................................................................................................. 66 Printing Selected Records............................................................................................................... 66 Selecting Records ........................................................................................................................ 66 View/Modify Selection Criteria ........................................................................................................ 67 QBM Reports (Query by Model) ........................................................................................................... 68 Query by Model ........................................................................................................................... 68 The QBM Dialog box...................................................................................................................... 68 How to Group Records Using QBM ..................................................................................................... 71 Create a Report .......................................................................................................................... 71 Page and Running Totals ................................................................................................................ 72 QBM Grouping and Statistics............................................................................................................ 72 Printing a QBM Report ................................................................................................................... 72 Printing Selected Records............................................................................................................... 73 How to Print Selected Pages of a Document ......................................................................................... 73 Selecting Records ........................................................................................................................ 73 Sorting Records ........................................................................................................................... 74 Sorting to improve performance ....................................................................................................... 75 Selecting and Sorting .................................................................................................................... 75 Selection Filter on/off .................................................................................................................. 76 Using DQL Selection Criteria in QBM................................................................................................... 76 Modifying Selection Criteria ............................................................................................................ 76 DQL Reports (Procedures) ................................................................................................................. 76 How to Add Group Totals and Grand Totals to a Report ............................................................................ 76 How to Avoid Deadlock by Duplicating the Order in Which Tables are Accessed in Multiple Scripts ......................... 76 How to Avoid Redundant Processing in a DQL Procedure ........................................................................... 77 How to Calculate a Percentage ........................................................................................................ 77 How to Choose the Primary Table in a Multi-Table Procedure..................................................................... 78 How to Combine Multiple Selection Criteria using and and or ..................................................................... 79 How to Combine Ordering and Grouping Commands in a Script ................................................................... 79 How to Control Transactions in a DQL Procedure.................................................................................... 80 How to Count the Number of Groups in a Report .................................................................................... 80 How to Count the Number of Items in a Group ...................................................................................... 81 How to Create an Accounts Receivable Aging Report ............................................................................... 82 How to Find and List Duplicate Records .............................................................................................. 83 How to Detect Deadlocks ............................................................................................................... 84 How to Improve Performance by Avoiding Inconvertible DQL Expressions ....................................................... 85 How to Improve Processing Speed by Creating a View from Which to Query the Data ......................................... 86 How to Insert an ASCII Text File into a DQL Script .................................................................................. 86 How to Join Tables in a DQL Script .................................................................................................... 87 How to Join Tables Stored on Different Engines ..................................................................................... 87 How to Join Two Independent One-to-Many Relationships ......................................................................... 87 How to List Detail Information from a Related Table ............................................................................... 88 How to List the First Few Records in a Table ........................................................................................ 88 How to Organize the Commands in a Simple Script ................................................................................. 89 How to Post Totals to Another Table .................................................................................................. 89

Printed Documentation

How to Prevent Deadlocks .............................................................................................................. 90 How to Produce Multiple Printouts of Each Record in a Report ................................................................... 91 How to Replace DQL Explicit Table and Field Locking Commands in a Procedure by Creating a Semaphore ............... 91 Reformatting a Report Output ......................................................................................................... 92 How to Save a DQL Script as ASCII Text ............................................................................................... 93 How to Sort the Values in a Choice Field ............................................................................................. 93 How to Specify an Explicit Inner Join in a DQL Procedure ......................................................................... 93 How to Use Indexes to Improve DQL Processing Speed ............................................................................. 93 How to Use Stored Procedures in a DQL Script....................................................................................... 95 External Data................................................................................................................................ 95 Objects>>OLE ............................................................................................................................. 95 Create an OLE Object ................................................................................................................... 96 Working with Links ....................................................................................................................... 97 Change the Format of Inserted Data .................................................................................................. 98 Client Server Terms...................................................................................................................... 98 Using predefined Imports ............................................................................................................... 99 How to Create and Run a Predefined Import ......................................................................................... 99 Installation Command Files ............................................................................................................ 100 DataEase Forms and Tables ............................................................................................................ 101 Delete Permission ....................................................................................................................... 102 Displaying SQL Commands ............................................................................................................. 103 Exporting Data........................................................................................................................... 103 How DataEase Security Levels Affect Record Entry ................................................................................ 104 How Field Characteristics Affect Record Entry ..................................................................................... 104 Importing Data into a Table ........................................................................................................... 105 Install a Single Document .............................................................................................................. 105 Database Links .......................................................................................................................... 105 Link a Document to other applications .............................................................................................. 107 Database Links Dialog .................................................................................................................. 107 Opening an Application ................................................................................................................ 108 Record Entry ............................................................................................................................. 108 Multi-User Options ...................................................................................................................... 109 Select Permission ....................................................................................................................... 110 Server Enforced Referential Integrity ................................................................................................ 110 Update Permission ...................................................................................................................... 110 User Privileges and Permissions ....................................................................................................... 111 OLE DB ...................................................................................................................................... 111 Introduction to OLE DB ................................................................................................................. 111 Consumer and Provider................................................................................................................. 113 Using the Consumer..................................................................................................................... 113 Using the Provider ...................................................................................................................... 117 OLE DB Notes ............................................................................................................................ 120 Document Objects ......................................................................................................................... 121 Objects>>Subform ...................................................................................................................... 121 Align Objects ............................................................................................................................ 123 Objects>>Style>>Apply ................................................................................................................. 123 Action..................................................................................................................................... 123 Changing Styles.......................................................................................................................... 128 Color ...................................................................................................................................... 128 Font ....................................................................................................................................... 129 Deleting Objects ........................................................................................................................ 130 How to Create a Document Object ................................................................................................... 130

vi

Table of Contents

Objects>>Style>>Create................................................................................................................ 131 Objects>>Button ........................................................................................................................ 131 Objects>>Custom Field>>Check Box .................................................................................................. 132 Choice Fields ............................................................................................................................ 132 Define Custom Colors ................................................................................................................... 133 Objects>>Ellipse ........................................................................................................................ 133 Objects>>Field .......................................................................................................................... 133 Objects>>Custom Field>>Image ....................................................................................................... 134 Objects>>Custom Field>>List Box ..................................................................................................... 135 Objects>>Line ........................................................................................................................... 135 Define on OLE Object .................................................................................................................. 136 Objects>>Picture ........................................................................................................................ 138 Objects>>Rectangle .................................................................................................................... 140 Objects>>Custom Field>>Radio Box .................................................................................................. 140 Define a Summary Field ................................................................................................................ 140 Objects>>Custom Field>>Spin Button ................................................................................................ 141 Objects>>Text ........................................................................................................................... 141 Objects>>Variable ...................................................................................................................... 141 Defining a Variable ..................................................................................................................... 142 Objects>>Style>>Delete ................................................................................................................ 143 Display a Hidden Object's Borders .................................................................................................... 143 Drawing Symmetrical graphics ........................................................................................................ 143 Validation Formula...................................................................................................................... 143 The Field Definition Dialog ............................................................................................................ 145 Field Help ................................................................................................................................ 148 Type ...................................................................................................................................... 148 Make Objects same size ................................................................................................................ 152 Modifying Text objects ................................................................................................................. 152 How to Move an Object ................................................................................................................ 153 Pasting Objects between Documents................................................................................................. 153 Printing Graphic Objects ............................................................................................................... 153 Removing a Subform .................................................................................................................... 153 Selecting Objects ....................................................................................................................... 154 The Display Attributes Dialog ......................................................................................................... 154 How to Size an Object .................................................................................................................. 155 Layout .................................................................................................................................... 155 Objects>>Summary ..................................................................................................................... 155 Tab Control .............................................................................................................................. 157 Objects>>Style>>Update ............................................................................................................... 159 Derivation Formula ..................................................................................................................... 159 Sample Applications ....................................................................................................................... 161 Sample Applications - Introduction ................................................................................................... 161 Membership Application................................................................................................................ 162 Self Tester Application ................................................................................................................. 166 Deadline Manager Application ......................................................................................................... 173 Bill of Materials Application ........................................................................................................... 181 Product Enhancement Application .................................................................................................... 188 Time Billing Application ................................................................................................................ 197 Index ........................................................................................................................................... 207

vii

Help File

DataEase Help

DataEase International LTD Rosemore Heaton Grange Road Romford Essex RM2 5PP

Help on Help
At the top of the Help Screen, you will see a number of Icons. Their purpose and function is shown below.

Print Whole Topic:If you want to print out an entire topic, just select the Print Tab. Print Part Topic: If you want to print out just part of a topic, then highlight the section you want (by holding the lefthand mouse button down and dragging the mouse across the desired area) then select Edit>>Copy from the Menu at the top of your screen. You can now Paste the selected area into another package, such as WordPad or Word, and either save or print it out. Store a Topic: Use Edit>>Copy to copy the current topic into your clipboard. You can then transfer this information (by Pasting it) into another package.

Printed Documentation

Annotate: You can annotate (add text to) any topic. Just click Edit>>Annotate, and you're presented with a small clipboard area into which you can type text. Ideal for adding extra notes to a topic! When you Annotate a topic, a small green paperclip icon appears at the top of topic. Click on the paperclip to read/modify/delete the annotation. Picture Too large?: If one of the screen illustrations is too large to display on your screen, try clicking the Help Topics tab. This will hide the Contents List on the left of your screen, leaving more room to display the illustration. Click the Help Topics tab again to retrieve your Contents List. Bookmarks: If you need to return again and again to some interesting part(s) of the Help File, just click Bookmark>>Define to place a bookmark in the relevant topic(s). You can then click on the Bookmark tab to quickly return to the marked sections. Jumps and Popups: A word shown in green and underlined with a solid line is a jump, which takes you to a new topic. A word shown in green and underlined with a dotted line is a Popup. Click on these words to see what they do. Jump. Popup.

Contacting DataEase
DataEase International LTD Rosemore Heaton Grange Road Romford RM2 5PP Sales phone +44 (0) 208 123 7 365

Useful Web Links


The DataEase Website Visit the DataEase Website and see whats there Training, Consultancy, Special Offers, New Releases, News Items, so on and so forth.

Quick Start
Starting DataEase
To begin, we'll start DataEase and open a sample application.

Help File

The examples in this book refer to the sample application, Club ParaDEASE. The Club ParaDEASE application is based on a well-known travel industry organization that runs resort clubs in exotic locations around the world. The application contains documents that store data about each club, such as members, reservations, vacation prices, and employees.

How to Start DataEase


1. 2. Start Microsoft Windows. Double-click the DataEase icon on your Windows desktop. DataEase displays the desktop window.

NOTE: DataEase provides a standard Windows setup program to install DataEase on your hard disk. The setup program lets you copy the Club ParaDEASE sample application to your hard disk.

Opening a DataEase Application


An application is a collection of database tables and documents related to a particular business task, such as inventory management or employee payroll. DataEase lets you create an application, or open an application and use it to retrieve and store data. A document is a tool you use to view, enter, and manipulate data. A DataEase application can contain the following types of documents: forms, reports, menus, and procedures.

How to Open an Application


1. 2. 3. 4. Choose File>>Open Application. DataEase displays the Open Application dialog. Double-click on a directory name. DataEase displays the names of the applications stored in the directory. Double-click on the name of an application. DataEase displays the Application Security dialog. Enter your User Name in the Name box, and enter your password (if any) in the Password box. Then, click OK. DataEase opens the application.

What's in the Application?


Like all DataEase applications, the Club ParaDEASE application contains documents (forms, reports, menus, and procedures) and data (information in each record of a form). When you open an application, DataEase displays the Application Catalog. The Application Catalog is a list of all the documents in the current application. In the Application Catalog, each type of document is represented by an icon. If you want to display the list of document names, you can double-click the icon and double-click again to collapse the list of documents. If you want to open a document from the Application Catalog, you can double-click the document's name.

Working with Forms


In DataEase, a form serves the same basic purpose as a paper business form; it separates information (data) into categories, which helps you collect and store it in an organized manner. In DataEase, you use forms to view, enter, modify, delete, and save data in an application. When you view a form it looks like a single entity, but it actually consists of two parts: a form definition and a database table. The form definition determines the layout and characteristics of fields. A field is the smallest complete unit of information in the application. All the fields on a form together make up a record. The database table stores the data that you enter into the fields on a form.

Opening a Form
A form provides an easy way to access one record of data quickly. For example, the EMPLOYEES form shown below displays information about one employee, such as his or her name, department, title, and salary.

How to Open a Form in User View


1. 2. Click once on the form name, EMPLOYEES, in the Application Catalog to highlight it. Click the User View button on the Toolbar. DataEase opens the form in User View.

Viewing Records in Form View DataEase can display only one record at a time in Form View. To display a record in a form press F3. In Form View, DataEase gives you a few ways to browse through records.

How to View Records in Form View


1. 2. Choose one of the options from the Goto menu. or... Click one of the Goto buttons on the Toolbar. or...

Printed Documentation

3.

Press F3 to display the next record and Shift + F3 to display the previous record.

Viewing Records in Table View DataEase stores the data that you enter in a form in an underlying table. A table lets you view multiple records in a row and column format resembling a spreadsheet.

How to View Records in Table View


1. 2. 3. Choose View>>Table, or click the Table button on the Toolbar. DataEase displays records in a row and column format. You can press Tab and Shift + Tab or use the scroll bars to view columns that are beyond the right edge of the screen. Choose View>>Form, or click the Form button on the Toolbar to return to Form View.

Finding Specific Records (Query By Form) Suppose you want to locate the records for each employee that earns a salary of $25,000. DataEase lets you search for specific records in a form using Query by Form (QBF). QBF lets you enter sample values, or selection criteria, into one or more fields on a form. DataEase then searches the data and displays the records that match your selection criteria.

How to Find Specific Records in a Form


1. 2. 3. 4. 5. Choose Query>>Select Records, or click the QBF Select Records button on the Toolbar. Press Tab or use the mouse to position the cursor in the SALARY field. Type >25000 in the SALARY field. Choose Goto>>Next Record or press F3. DataEase displays only records with a salary greater than $25,000. To continue viewing the matching records, choose Goto>>Next Record or press F3. When you are finished viewing the records, choose Edit>>Clear or press F5.

Focusing a Search You can focus your search by entering selection criteria in more than one field. For example, if you want to locate the records for each employee that earns $25,000 and whose hire date was February 14, 1989, you choose Query>>Select Records, enter 25000 in the SALARY field, enter 02/14/89 in the HIRE DATE field, and press F3. DataEase displays only records that meet all your criteria. Viewing Matching Records Since more than one employee meets your selection criteria, switch to Table View to view all the records that match your criteria. To switch to Table View, choose View>>Table, or click the Table button on the Toolbar. Sorting Records DataEase lets you sort records according to the value in any field(s) on a form, in either ascending (A-Z, or 1-9) or descending (Z-A, or 9-1) order.

How to Sort Records


1. 2. 3. 4. 5. Choose Query>>Sort Records or click the QBF Sort button on the Toolbar. DataEase clears the data from the screen and displays a blank row. Choose Query>>Descending to sort the records in descending order. Click once on the LAST NAME field. DataEase marks the field with the number one. Choose Goto>>Next Record, or press F3. DataEase sorts records in descending order by last name. Scroll the table to view the sorted records.

How to Clear the Sort Order


1. 2. 3. 4. Clear the sort order from memory by choosing Query>>Sort Records. Choose Edit>>Clear Form or press F5. When you choose Goto>>Next Record, or press F3. DataEase displays the unsorted records. Switch to Form view by choosing View>>Form, or by clicking the Form button on the Toolbar.

Entering a Record DataEase gives you several ways to move the cursor's location in a form. You can click the mouse in a field, move the cursor left and right using the arrow keys, or advance the cursor from field to field by pressing Tab or Shift + Tab. When a new employee joins Club ParaDEASE, his or her name and other information must be entered into the EMPLOYEES form.

Help File

How to Enter a Record


1. 2. 3. 4. Choose Edit>>Clear Form, or press F5 to clear the form. To enter a new record, just type the values in the blank fields on the form. Enter yourself as a new employee. To save the record, click the Save button, or choose File>>Save. To enter another record, click the New button on the EMPLOYEES form, or choose Edit>>Clear Form. Now, enter a few records using the names and data of some of your friends or coworkers.

Modifying and Deleting a Record Because you frequently need to update information stored in your application, such as an employee's salary, DataEase lets you modify a record. You can modify a record by entering new data in an empty field, or by editing data in an existing field. To modify data in a field, click in the field and type the change. DataEase also lets you delete unnecessary records.

How to Modify a Record


1. 2. 3. 4. Go to the record using the Goto buttons on the Toolbar, or by pressing Shift + F3 until you find it. Tab to the TITLE field. Choose Edit>>Clear Field or press F6. Change the title from Accts Payable Administrator to Accts Receivable Administrator by choosing Accts Receivable Administrator from the TITLE field choice list. Choose File>>Save or press F8. DataEase saves the record.

How to Delete a Record


1. 2. 3. Go to the record using the Goto buttons on the Toolbar, or by pressing Shift + F3 until you find it. Choose Edit>>Delete Record or press F7. DataEase displays the Delete Record dialog. Click OK. DataEase deletes the record.

Printing the Current Record When you choose File>>Print, DataEase displays the Print dialog, which lets you specify the print quality for your document. DataEase lets you print a document as: Text for quick printing with letter quality output that includes only data and document text. Draft for letter quality output that also includes image outlines, lines, rectangles, and ellipses printed in a uniform shade. WYSIWYG (What You See Is What You Get) for a representation of your document that includes multiple fonts, images, and other graphical elements. The steps below show you how to print the current record in WYSIWYG quality. The printed representation of the record includes text, and any graphics elements, such as lines and images.

How to Print the Current Record


1. 2. 3. 4. 5. To print the current record, choose File>>Print. DataEase displays the Print dialog. Choose Printer as the Print Destination. Choose WYSIWYG as the Print Detail. Choose Current Record as the Print Range. Click OK. DataEase prints the current record.

Closing a Document After you finish viewing or modifying a document, you can save the changes and close the document.

How to Close a Document


1. 2. To close a document, choose File>>Close or double-click the Control Menu box in the document's upper left corner. If you have not saved your changes, DataEase displays the Data Changes dialog. Click Yes to save changes and click OK.

Creating an Application
If you're familiar with DataEase and want to create your own application instead of working with the sample application, you can follow the steps below. If you need to learn more about DataEase, skip to the next topic, Opening An Application, and we'll show you how to work with an existing application. How to Create an Application

Printed Documentation

1. 2. 3. 4. 5. 6.

Before you start DataEase, create a directory for your application. Start DataEase by double-clicking the DataEase icon on your Windows desktop. Choose File>>New Application. DataEase displays the New Application dialog. In the Directories list box, double-click on the directory in which you want to store the application. In the Application Name text box, enter a name of up to 20 characters that describes your application and then click OK. DataEase displays the New Name and Password dialog. Enter the name and password you will use to sign on to the application.

If you do not enter a name or password in this dialog, you will be able to open the application without entering a name or password.

Creating a Form
DataEase lets you create a form and database table (at the same time), or create a form attached to an existing database table. When you create a form, you decide on the layout and characteristics of the fields that make up each record, where data fields are placed, and what kind of data belongs in each field. The steps below show you how to create a form and table for the Club ParaDEASE application. The new form tracks each Club ParaDEASE employee's salary history.

How to Create a Form and Table


1. 2. 3. 4. If necessary, open the Club ParaDEASE application. Choose File>>New>>Form. DataEase displays the New Document dialog. Select the Club ParaDEASE Style Sheet from the Style Sheet list box, double-click <New Table> from the Select a Database Table list box, and click OK. DataEase displays the New Table dialog. Type SALARY HISTORY as the name for the form and table. Click OK. DataEase displays a blank form in Designer View.

Designing a Form
To design a form, you place objects, such as text, fields, buttons, and graphic images, on the form. In Designer View, DataEase gives you all the tools you need to design a form on the pull-down menus, Toolbar, and Object Palette: The pull-down menus appear at the top of the window and provide access to the commands you need to edit objects, view parts of the document, place objects on a form, and set document properties. The Toolbar is the row of buttons DataEase displays directly under the menu bar. You can click a button on the Toolbar to access frequently used menu options. The Object Palette is a tool window that gives you quick access to all the commands on the Objects Menu. You can use the Object Palette to quickly create objects such as fields, buttons, and text. Using Object Express Menus In addition to the pull-down menus, Toolbar, and Object Palette, DataEase gives you a set of special object-oriented pop-up menus that provide a quick way to define or modify the key properties of a Form, Record, Field, or other object. These menus quickly access dialogs that let you change the appearance of objects on a document, such as setting colors, changing fonts, and assigning an action to a button or image.

To display a pop-up menu for an object, you select the object and click the right mouse button. DataEase displays the pop-up menu for the object you selected.

How to Display an Object Express Menu


1. 2. 3. Click on the blank form. DataEase selects the Record Object. Click the right mouse button. DataEase displays the Object Express Menu for the Record object. You can select Layout or Display to display the corresponding Object Properties dialog.

Creating a Text Object In DataEase, a Text object is a block of text that you can use in a form as a heading or as a label for a Field object. The Text objects in a form appear the same in every record. DataEase lets you determine the font, size, and color of a Text object.

How to Create and Modify a Text Object


1. 2. 3. 4. 5. Choose Objects>>Text or click the Text button on the Object Palette. DataEase displays the text cursor. Position the text cursor at the top left edge of the form and click. DataEase displays the blinking text cursor inside the Text object. Type SALARY HISTORY in all capitals, then press Enter. DataEase displays handles around the object's edges. To change the font of the Text Object, click the Font button on the Toolbar. DataEase displays the Font dialog. To change the Text object to the Arial font, 22 point, and bold, choose Arial from the Font Name list, Bold from the Font Style box, and 22 from the Size box.

Help File

6. 7.

Click OK. DataEase displays the Text object with the attributes you selected. Add the remaining Text objects to the form as they appear in the figure below: Employee ID, Date, Last Name, Status, and Increase Amount. To add the Text objects to the form, choose the Text object from the Object Palette, click on the form where you want the text to appear, type the text, and press Enter. You do not need to change the font, style, or size of these Text objects.

Creating a Field Object


The field is the most important object on a form. Fields are the blank areas on a form layout that are used to accept and display data during record entry. When you place a field on a form, DataEase automatically creates a table for storing the form's data. To insert a field on a form, you choose Objects>>Field, position the field cursor on the form where you want the upper left corner of the field to appear, and click. DataEase displays the Field Definition dialog. The Field Definition dialog lets you specify characteristics for the field such as the field name, field type, and field length. Some different types of fields are text, number, numeric string, and date.

How to Define a Field Object


1. 2. Choose Objects>>Field, or click the Field button on the Object Palette. DataEase displays the field cursor. Position the field cursor to the right of the Employee ID Text object and click. DataEase creates a Field object and displays the Field Definition dialog which lets you define characteristics for the field.

Defining Field Characteristics The Field Definition dialog lets you determine the characteristics of the Field object. The steps below show you how to create a Sequenced ID field. A Sequenced ID field stores and displays an automatically incremented value. DataEase lets you determine the starting value for the sequence. When entering records, DataEase automatically increments the value in the Sequenced ID field by one for each new record.

How to Define Field Characteristics


1. 2. 3. In the Field Definition dialog, enter EMP ID in the Field Name box. DataEase adds a corresponding EMP ID column to the form's database table. Choose Sequenced ID from the Data Type drop-down list. The Sequenced ID options appear at the center of the dialog. Enter 6 in the length box, and enter 1 in the Starting Value box. In the Field Data box, choose Prevent Entry, Indexed, and Unique. This tells DataEase to prevent users from entering data in the field during record entry, to index the field for quicker sorting and searching, and to make the field unique, which ensures that no two records will have the same value in this field. Click OK. DataEase closes the Field Definition dialog and displays the field on the form. DataEase displays the Sequenced ID field on the form. During Record Entry, DataEase automatically generates the number in the Sequenced ID field.

4.

Defining Different Types of Fields In addition to the EMP ID field, the SALARY HISTORY form contains other types of fields including a date field, text field, choice list field, and currency field. A date field stores and displays a calendar date. A text field stores and displays descriptive information such as names and addresses. A choice list field ensures fast and accurate data entry by letting users choose one value from a list. A currency field store and displays a monetary amount that can be used in a calculation. To define the remaining Field objects for the SALARY HISTORY form (DATE, LASTNAME, STATUS, and INCREASE AMOUNT) ,enter the field characteristics listed in the table below in the Field Definition dialog. Place each Field object to the right of the corresponding Text object. The figure beneath the table shows you the SALARY HISTORY form with Text and Field objects. Creating a Button Object A button is an object that performs an action when you click it in User View. Buttons give users an efficient way of performing frequently used actions. You can create a button that executes a menu option, such as saving the current record.

How to Create a Button Object


1. 2. 3. Choose Objects>>Button, or click the Button object on the Object Palette. Position the cursor on the form to the right of the rectangle that surrounds the fields and click. DataEase displays a button using the default button size. Press Del several times to clear the button's existing text, type Save as the name for the button, and press Enter.

Printed Documentation

4. 5. 6. 7.

To assign an action to the button, click the Action button on the Toolbar, or click the right mouse button, and choose Action. DataEase displays the Action Selection dialog. To display the list of actions, click the button to the right of the Action list box. DataEase displays the list of actions. To assign an action to the button, choose Record Save from the Action Selection list box and click OK. DataEase assigns the action to the button. Use this procedure to place two buttons below the Save button. Name one button New and assign it the action, Clear Form. Name the other button Delete and assign it the action, Delete Record.

Changing a Document's Style Sheet When you choose Document>>Properties, DataEase displays the Document Properties dialog, which lets you view attributes created with a document, such as the name of the document's Style Sheet. DataEase lets you use a Style Sheet to set the display attributes of all the objects on a form automatically. A style is a set of predefined display attributes that can be applied to an object in one step. A Style Sheet contains a group of styles that are used within the same document. In the Document Properties dialog, the Style Sheet dropdown list box displays the name of the document's current Style Sheet. You can easily change the Style Sheet associated with your document by selecting a different Style Sheet from the list. The steps below show you how to change a document's Style Sheet.

How to Change a Document's Style Sheet


1. 2. 3. Choose Document>>Properties. DataEase displays the Document Properties dialog. Choose the Normal Style Sheet from the Style Sheet drop-down list. Click OK to close the dialog. DataEase displays the new styles in the Style Sheet drop-down list. Objects with the same style name in the new Style Sheet switch to the new attributes. Any object with a style name not in the new Style Sheet becomes an unstyled object that retains its original style's attributes.

Defining Relationships
DataEase is a relational database. A relational database lets you define links (called relationships) between the database tables in the application. To create a relationship between database tables in a DataEase application, you enter a record in the Relationships Form (shown below), which is a System Form provided by DataEase. In DataEase you use System Forms to define relationships and perform other administration functions. A relationship specifies two table names and at least one pair of match fields. A match field links a specific record in one form with a record or set of records in the other form. The steps below show you how to create a relationship between two database tables.

How to Define a Relationship


1. 2. Choose Application>>Relationships. DataEase displays the Relationships form. Enter the names of the database tables to be related. Click on the drop-down arrow in the field beneath "Records in," click EMPLOYEES, and press Tab. Click the drop-down arrow beside the next field, click SALARY HISTORY, and press Tab. Enter the Match field(s) on which to base the relationship. Click the drop-down arrow, choose EMP ID , and press Tab. Click the drop-down arrow, choose EMP ID. Click the Save button to save the relationship record, and then click Done to close the form.

3. 4. 5. 6.

NOTE: DataEase lets you create an unlimited number of relationships for an application. You can also create more than one relationship between the same two tables.

Using the Relationship


After you define a relationship between two database tables, DataEase lets you create a field on one form that automatically looks up and displays a value from another table. You also can use the relationship between two tables to combine data from both tables into a form, report, or procedure. The steps below show you how to create a lookup field on the SALARY HISTORY form that looks up the employee's last name from the EMPLOYEES form. After you create the lookup field, DataEase automatically looks up the value from the EMPLOYEES form and inserts it in the SALARY HISTORY form during record entry.

How to Define a Lookup Field


1. Open the SALARY HISTORY form and double-click on the LAST NAME field object. DataEase displays the Field Definition dialog.

Help File

2. 3. 4. 5. 6. 7.

Choose Virtual from the Field Data box. To tell DataEase where to find the value, create a derivation formula for the field. Click the Derivation radio button. DataEase displays the Derivation Formula options. Double-click lookup in the Functions scroll box. Choose a related table from which to look up data. Double-click EMPLOYEES in the Relationships box. This is the related table from which to look up data. Double-click LAST NAME in the Columns scroll box. This is the data column of the field you want to look up. Click OK to exit the dialog. DataEase will look up the last name from the EMPLOYEES form and place it in the SALARY HISTORY form during record entry.

Testing the Lookup Field To test the lookup field, switch to User View by clicking the User View button on the Toolbar. Enter a new record in the SALARY HISTORY form using 000001 as the EMP ID. When you enter the EMP ID, DataEase automatically enters the value in the LAST NAME field. Now, define another lookup field called NEW SALARY that looks up the employee's salary from the EMPLOYEES form and adds the increase amount from the SALARY HISTORY form to calculate the new salary. Create the new field with the following characteristics: Data Type = Number, Digits = 6, Decimals = 2, Field Data Option = Prevent Entry, Derivation = lookup "EMPLOYEES" "Salary" + Increase Amount.

Creating a Multiform
DataEase lets you create a Multiform using related tables. A Multiform is a set of two or more related forms that appear on the screen at the same time as if they were a single form. A Multiform is made up of a Main form and one or more Subforms. Multiforms make entering and searching for data easy because you can view, enter, modify, and delete data from two or more related forms simultaneously. The steps below show you how to create a Multiform with EMPLOYEES as the Main form, and SALARY HISTORY as the Subform.

How to Create a Multiform


1. 2. Open the EMPLOYEES form and choose Objects>>Subform. Position the cursor beneath the last field on the EMPLOYEES form. Then, click and drag down and to the right to draw a box for the Subform. DataEase displays the Form Definition dialog, which lists the tables related to EMPLOYEES. Choose the SALARY HISTORY table from the Relationships list. Click OK. DataEase displays the Layout Options dialog. Choose the Table layout option in the Field and Record Layout box (it may already be selected). Click OK. DataEase displays the EMPLOYEES form with SALARY HISTORY as a Subform. Delete the EMPLOYEE ID, LAST NAME, and STATUS fields from the Subform because these fields appear in the Main form. (To delete an object, select the object and press Del.) Choose File>>Save to save the changes. Choose File>>User View to switch to User View, and press F3 to view data in the Multiform.

3. 4. 5. 6.

7. 8.

Creating a Form over an Existing DataEase Table


DataEase lets you create a form that uses an existing DataEase database table. When you create a form that uses a table, DataEase creates the new form by viewing some or all the columns in the selected table. Then, you can customize the form for a specific group of users. For example, if you do not want a group of users to view the SALARY field in the EMPLOYEES form, you could create a form over the existing EMPLOYEES table, and delete the SALARY field. When you create a form that uses an existing table you can choose a layout option from the Layout Options dialog to determine the placement of the fields on the form. DataEase lets you keep the existing form layout by choosing the Original Form layout option, or choose another layout option such as Table or Custom. When you choose the Custom layout option you can manually arrange the fields in a layout that you design.

How to Create a Form over a DataEase Table


1. 2. 3. 4. 5. Choose File>>New>>Form. DataEase displays the New Document dialog. Choose the Club ParaDEASE Style Sheet from the Style Sheet list box, and double-click EMPLOYEES in the Select a Database Table list box. Type Emp_View, as the name for the form, and click OK. DataEase displays the Layout Options dialog. Choose Original Form from the Field Layout options and click OK. DataEase displays a view of the EMPLOYEES form. Click on the SALARY field to display its handles. Delete the field by pressing Del. Choose File>>Save.

Importing Data into a DataEase Table

Printed Documentation

DataEase lets you import data from other versions of DataEase and from other DOS and Windows programs, such as Lotus 1-2-3 and dBASE. You can import data into any database table that has columns defined to match the size and data type of the incoming data. DataEase lets you import data once or create a predefined import that you save and use to import data repeatedly. When you choose File>>Import, DataEase displays the Import Data dialog which lets you specify the data to import.

How to Import Data into a DataEase Table


1. 2. 3. 4. Open the SALARY HISTORY form in User View. Choose File>>Import. DataEase displays the Import Data dialog. Choose the Import file format. Specify the path and filename of the source file. If the source file is stored in the application directory, you do not need to specify a path. You can click Browse to search for the source file. Specify whether the source data is organized by Field Name or Field Order. If the source file includes field names in the first record, accept Field Name (the default). If the first record contains data values, select Field Order. When you import records organized by Field Order, fields in the source file must appear in the same sequence as in the destination table. Specify which characters are used as field and record separators (for Variable Text format only). To specify the character used to separate fields or records, choose the appropriate character from the Field Separator or Record Separator dropdown list in the Import Data dialog. If the appropriate character does not appear on the list, select Other, then type the character in the edit box. Click Run. DataEase closes the Import Data dialog, and imports the records.

5. 6.

7. 8.

9.

NOTE: After you click Run, you cannot cancel or abort an import.

Using a Report
Although it's easy to list data from a form, you have greater control over the content and appearance of your output when you create a DataEase report. A report is a document that lets you retrieve a specific set of records from one or more database tables and display (or print) that data in the layout you specify. For example, you may want to list only some fields in one form along with additional fields from a related form. A report also can perform calculations and generate summary statistics about your data. A report is similar to a record entry form because it can contain all the objects that make up a form, including Form and Record objects, data fields, Text objects, and graphics. You can create a form using the same tools and techniques that you use to create a form.

Creating a Report Using Query By Model


DataEase lets you create a report using Query by Model (QBM). QBM lets you create a reusable Query and custom layout by entering selection criteria in the Query By Model dialog. You can create a custom format for the report output, or have DataEase automatically generate a predefined format for the report output.

How to Create a Report Using Query By Model


1. 2. 3. 4. 5. 6. 7. Choose File>>New>>Report. DataEase displays the New Document dialog. In the New Document dialog, choose the EMPLOYEES database table. Click Query. DataEase displays the Query By Model dialog and displays the EMPLOYEES database table. Double-click the columns to use as fields in the report document. Use the Query By Model dialog to add tables, select columns from tables, select records, and group, sort, and summarize report data: Double-click DEPARTMENT in the EMPLOYEES table, then click the Group by check box to group records by department. In the GROUP: Department table, double-click LASTNAME, then click the Sort by button, then choose Ascending to sort the records alphabetically by last name. Click Summarize button and choose count to display a statistic in the report that counts Then, double-click, FIRSTNAME, HIRE DATE, and SALARY in the GROUP: Department table to include those fields in the report document. Click Salary do sum statistic Click OK. DataEase displays the Layout Options dialog. Choose Table as the Field Layout option and click OK. DataEase displays the report in Designer View.

8. 9.

10. To save the report, choose File>>Save, name the report SALARYREPORT, and click OK. 11. To run the report, choose File>>User View or click the User View button on the Toolbar. DataEase displays the Print dialog. 12. Choose Window as the Print Destination and click OK. DataEase displays the report data according to the specifications you entered in the Query By Model dialog.

10

Help File

NOTE: To print the report, choose Printer as the Print Destination instead of Window as the Print Destination.

Trying a Different Report Layout


DataEase lets you quickly change a report's layout using the Layout Options dialog. To change a report's layout in Designer View, select the Record object, click the right mouse button, and choose Layout. DataEase displays the Layout Options dialog, which lets you choose from six Field Layouts including: Original Form, Field/Line, Table, Table Across, Mailing Label, or Movie Credits. Creating Labels DataEase lets you easily create a report that generates mailing labels or name tags using the Mailing Label Field Layout option. Follow the steps below to create name tags for the Club ParaDEASE employees to wear at their next seminar.

How to Create Labels


1. 2. 3. 4. 5. 6. 7. Choose File>>New>>Report. DataEase displays the New Document dialog. In the New Document dialog, choose the EMPLOYEES database table. Click Query. DataEase displays the Query By Model dialog and displays the EMPLOYEES database table. In the EMPLOYEES table, double-click the columns to use as fields in the report document: Double-click FIRSTNAME, LASTNAME, and DEPARTMENT. Highlight LAST NAME, click the Sort by button, and click Ascending to sort the records in order by last name. Click OK. DataEase displays the Layout Options dialog. Choose Mailing Labels as the Field Layout option. Under Record Size, in the Label box, choose 4160-Avery: name badge as the label size, and click OK. DataEase displays the report in Designer View. To customize the appearance of the mailing labels, move the LASTNAME field beside the FIRST NAME field, and move the DEPARTMENT field underneath the FIRSTNAME field. Choose File>>Save to save the report, and name the report Labels.

8. 9.

10. Choose File>>User View to switch to User View. DataEase displays the Print dialog. Choose Window as the Print Destination and click OK to display the records on the screen.

Using the DataEase Query Language (DQL)


The language used to define and manipulate data in the DataEase native engine format is called the DataEase Query Language (DQL). DQL is a programming language that lets you use a series of commands to create a script for a procedure document in DataEase. A script is a series of instructions that tell DataEase to perform a task(s) such as generating a printed report. Creating a DQL Procedure DataEase gives you three ways to create a script. You can: Create a script using the Script Editor. Convert a QBM Report into a DQL Procedure. DataEase automatically writes the script for you. Modify an existing script or copy portions of one script to another. To create a script and procedure in DataEase, choose File>>New>>Procedure. DataEase displays the New Document dialog. Click OK. DataEase displays the DQL Script Editor which lets you write a script, or set of DQL instructions that DataEase executes when you open the procedure. Converting a QBM Report into a DQL Procedure Although a QBM Report lets you list records from multiple tables, you cannot add, modify, or delete data using the Query By Model facility. If you want to update, manipulate, or delete data selected by QBM, DataEase lets you convert the QBM Report into a DQL Procedure. For example, suppose you want to print all the salary history information for employees that started work after January 1, 1990, and increase their salaries by five percent. A QBM Report can list the salary information for employees who started work after January 1, 1990, but it cannot automatically increase the selected salary records by five percent. A DQL Procedure can do both. When you convert a report into a DQL Procedure, DataEase displays the query as a set of DQL statements in the DQL Script Editor. The steps on the next page show you how to convert the QBM Report into a DQL Procedure. NOTE: After you convert a QBM Report into a DQL Procedure, it cannot be converted back into a QBM Report, therefore, you may want to create a copy of the QBM Report before you convert it. To create a copy of the report, open the report in Designer View, and choose File>>Save As. Then, save the report with a new name.

How to Convert a QBM Report into a DQL Procedure


1. 2. Open the SALARYREPORT report in Designer View. Choose File>>Save As (to make a copy of the report so the original remains intact). DataEase displays the Save As dialog.

11

Printed Documentation

3. 4. 5. 6. 7. 8. 9.

Enter SALARYDQL as the new name for the report and click OK. DataEase saves the report with a new name. The original report remains intact. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Click Convert to DQL. DataEase displays the Convert to DQL dialog, which displays the DQL Procedure. To convert the QBM Report into a DQL Procedure click Yes. When you click Yes, DataEase automatically creates the script for the query and displays it in the DQL Script Editor. Before you can run the Procedure, you must compile the script to check for errors. To compile the script, choose Script>>Compile. DataEase checks the script for spelling and syntax errors, then compiles the script and displays the Layout Options dialog. In the Layout Options dialog, choose Table as the Field Layout option and click OK. DataEase displays the Procedure in Designer View.

10. Choose File>>Save. DataEase displays the Save As dialog. Enter SALARYDQL as the name for the Procedure and click OK. To run the DQL Procedure, switch to User View. DataEase runs the Procedure and displays the output. NOTE: After you convert a QBM Report into a DQL Procedure, it cannot be converted back into a QBM Report.

Creating a Multi-table Report


DataEase lets you create a multi-table report, which is a report that displays records from one or more tables. You can create a multi-table report when you need to display data from several forms in a custom layout. The steps below show you how to create a multi-table report using the EMPLOYEES and SALARY HISTORY forms.

How to Create a Multi-table Report


1. 2. 3. 4. 5. 6. 7. 8. 9. Choose File>>New>>Report. DataEase displays the New Document dialog. In the New Document dialog choose the EMPLOYEES database table. Click the Query button. DataEase displays the Query By Model dialog and displays the EMPLOYEES database table. Use the Query By Model dialog to add tables, select columns from tables, select records, and group, sort, and summarize report data. In the EMPLOYEES table, double-click LAST NAME, FIRST NAME, and HIRE DATE. To include data from the SALARY HISTORY table in your report, double-click SALARY HISTORY in the Related Tables box. DataEase displays the SALARY HISTORY table to the right of the EMPLOYEES table. In the SALARY HISTORY table, double-click DATE and INCREASE AMOUNT. Click OK. DataEase displays the Layout Options dialog. Choose Table as the Field Layout option and click OK. DataEase displays the report in Designer View. To save the report, choose File>>Save. In the Save dialog, enter MULTITABLE as the name for the report, and click OK.

10. To run the report, switch to User View by choosing File>>User View, or by clicking the User View button on the Toolbar. DataEase displays the Print dialog. 11. Choose Window as the Print Destination and click OK. DataEase displays the report data according to the specifications built using the Query By Model dialog.

Adding Summary Variables to Headers and Footers


DataEase lets you add two types of page headers and footers to every page of a printed report. For a report, you can create a Page Header and Page Footer and a Summary Page Header and Footer. A Page Header or Footer can include text, drawn objects (boxes and lines), and images and can also display an application variable such as a page number, date, or time. A Summary Header or Footer displays summary information, such as statistics, based on the data printed in the body of the document. You can use a Summary Header or Footer to display an application variable or summary variable. A summary variable can compute the sum, mean, or count of values on a page, and display the first and last values printed on a page.

How to Add Summary Variables to Summary Headers and Summary Footers


1. 2. 3. 4. 5. 6. Open the MULTITABLE report in Designer View. Choose View>>Summary Header. DataEase displays the Summary Header window. Click the Summary Variable Object on the Object Palette. DataEase displays the summary variable cursor. Position the cursor on the top, right side of the Summary Header and click. DataEase displays the Summary Variables dialog. Use the Summary Variables dialog to Select the Table, Fields, Summary Type, and Compute options. In the Used Tables box, click SALARY HISTORY. In the Used Fields box, click Increase Amount. In the Summary Type box, click Mean.

12

Help File

7.

From the Compute summaries from choice list, choose Page Start, from the Compute when choice list choose Page Ends, and from the Display as choice list choose Text. These options tell DataEase to display the mean of the increase amount for each page. Click OK. DataEase displays the Summary Variable in the Summary Header window. The Summary Header uses a summary variable to display the average of the salary increase amounts on a page. Add a Text object in front of the Summary variable that describes the value: Click the Text object on the Object Palette and place the Text object to the left of the Summary Variable object. Type Average Increase Amount and press Enter. When you print the report, at the top of each page, DataEase displays the average of the increase amounts for the values on the page.

8. 9.

10. Choose File>>Save to save the report. 11. Choose File>>User View to switch to User View. DataEase displays the Print dialog. Choose Printer as the Print Destination and click OK. DataEase prints the report and displays the Summary Header information at the top of each page.

Manipulating Data Using DQL


Like a DataEase form or report, a DQL Procedure can process and display information stored in your database. A DQL (DataEase Query Language) Procedure is a special type of document that executes a series of instructions when opened in User View. You can use a procedure to perform sophisticated data processing and reporting tasks that are not possible with a standard DataEase form or report. For example, a DQL Procedure can prompt you for selection criteria before generating a report, automatically enter, update, or delete an entire set of records in one step, process new records differently depending on the data they contain, and chain together menus, forms, and reports into a single procedure. The steps below show you how to run a simple procedure that lists, then modifies the records in the EMPLOYEES form. When you run the procedure, DataEase modifies the records with the instructions written in the DQL Script. This procedure modifies records in the EMPLOYEES form by increasing each employee's salary by 5%. This is the annual Club ParaDEASE cost of living salary increase.

How to Run a DQL Procedure


1. 2. 3. Open the FIVEPERCENT procedure in Designer View. DataEase displays the Script Editor which shows you the script for the procedure. To run the procedure, switch to User View by choosing File>>User View or by clicking the User View button on the Toolbar. DataEase executes the set of DQL instructions contained in the script. When you are finished viewing the output, close the document by choosing File>>Close. Exit DataEase by choosing File>>Exit.

NOTE: To create your own DQL Procedure, start a new procedure by choosing File>>New>>Procedure and clicking OK in the New Document dialog. DataEase displays the Script Editor. In the Script Editor, you can enter a script by typing your selection directly into the editor, by making selections from the interactive pick-lists displayed at the bottom of the Script Editor, or by copying text from another source such as another script, or external text file.

Graphing Data in a Report


DataEase allows you to embed third party graphing objects in your reports via OLE/DDE links. Seek Help on OLE/DDE to obtain more details on how this can be done.

Locking Strategies
Locking Strategies
DataEase 7 offers four Locking Strategies, each optimised for a particular situation.

Basic
A basic implementation of locking, which works with both Advisory and Non-Advisory networks. It provides replication in data-entry, and allows configurable locking for Record Entry, Reporting, and Procedures. Both Shared and Exclusive locks are supported. This option should be suitable for all networks.

Full
This option requires an Advisory Network, such as Novell Netware or Windows NT Server. It provides all the facilities listed under "Basic", with the bonus of improved performance. This offers superior performance to the 'basic' option. Your network must support Advisory Locking if you wish to use this option. Novell and NT Server are two examples of such networks.

Opportunistic
A non-locking approach, similar to that of Microsoft Access. Data replication during data entry is provided, but there is no locking. This option will work on any network, and actually provides very fast performance on some applications - for example, those with lots of 'new' data entry work, with little data modification. It works badly on applications where records are subject to frequent modification, since roll-backs are time consuming and annoying to the operator.

13

Printed Documentation

Important: If this option is used, then it is ESSENTIAL that only one user runs data-modifying procedures at any one time. This can be achieved in various ways - menu/user security restrictions, locking the database, and so on.

Single User
No locking takes place, hence this option is only suitable for a stand-alone application. Note: It is still possible to temporarily lock the application, in order to carry out some sensitive task - such as a lengthy update procedure - and thus eliminate the possibility of either;

The application being accessed by another session on the same machine, or; The application being accessed by another PC, via a shared drive.

To lock the application, select Application>>Utilities>>Lock.

Selecting the Application Locking Configuration


The Application Developer must select a locking strategy for his application. To do this, select Application>>Preferences , and then click the Application Data Administration tab. In the example shown below, we are selecting Opportunistic as the locking strategy. Once a strategy has been selected, no workstation will be allowed to access the application, unless that workstation is set to the correct locking strategy.

User View Locking


Lets you specify the locking rules for a document, when in User View. Choose:

None when all users have full access to the document. The default is none. Shared to let multiple users view records simultaneously.

14

Help File

Exclusive to let one user access a record at one time. This is a highly restrictive option, and should only be chosen if you have a pressing reason for preventing two users from viewing the same record at the same time. Note that, if two users are 'chasing' each other through the file, then the second user will NOT be allowed to 'overtake' the first user. If there are fifty records in the file, and User One is viewing Record 20, then User Two will be unable to view records beyond 19.

Printing Locking Data Locking


When printing, how should data be locked? This option tells DataEase whether to lock the records or the files when printing a document. Choose:

Lock records if you prefer to lock records one by one as they are processed. Other users cannot modify or delete these records but they can view them. The default is lock records. Lock files to lock all records that will be used during printing.

Files
Tells DataEase how to lock the records during printing only if Data Locking is set to Lock records. Choose:

Lock nothing to allow other users to view, modify, or delete records selected for printing. Lock records to lock any records that have been selected for processing. Other users cannot modify or delete these records. They can view the records if the selected records will only be listed by the procedure (not modified or deleted). Other users can view modify, delete, or add records in the same form(s) that have not been selected. Once processing begins, the locking rule applies. This is the default option. Lock files to lock the form(s) from which records are being selected. Other users cannot add, modify, or delete records in the form. They can view records in the form if the selected records will only be listed by the procedure. The forms remain locked until printing is complete.

Selecting your Workstation Locking Configuration


From your workstation, select File>>Options from the DataEase Startup screen. Click the Database Engine tab, and then select your desired locking strategy. In the example below, we are selecting Opportunistic.

15

Printed Documentation

If your workstation is set to a locking strategy which is incompatible with the Application locking strategy, then you will receive an error message similar to the one shown below.

Should you receive this error message, reset your workstation locking option to the strategy which matches the target application.

Menus and Toolbars


DataEase Menus
Most menus on the DataEase menu bar are available in User View and Designer View, but each view has some unique menus. The unique menus in User View are Goto and Query, and the unique menus in Designer View are Objects and Document. User View Menus File Edit View Goto Query Application Window Help

Designer View Menus File Edit View Objects Script Application Document Window Help

The Toolbars
The Toolbar is the row of buttons DataEase displays directly under the menu bar that provides instant access to frequently used menu options. To execute an option you simply click the corresponding Toolbar button. DataEase provides four Toolbars: one before you open a document, one in User View, one in Designer View, and one in DQL. DataEase also provides an Object Palette in Designer View that lets you quickly create most document objects. The Designer View and User View are normally displayed as a single row of buttons running across the top of the screen. Here, in order to fit them conveniently on screen, they are displayed as floating palettes. You can do this at any time, by right-clicking on a toolbar icon and dragging it down the screen. The four Toolbars are:

Startup Toolbar Designer Mode User Mode Object Palette Custom Toolbars
The User Toolbar contains a row of icons, each representing some commonly-performed action, such as "Save Record", "Clear Form", and so on. In some applications, it is not desirable to make all these options available to every user, so DataEase allows you to create a Custom Toolbar. When you select this option, you can design your own Custom User Toolbar, containing icons for only those actions which you wish to make available to your users. Each form document can have its own Custom User Toolbar. Additionally, you can define a new 'Custom Application' User Toolbar, to replace the default Toolbar defined by DataEase.

Why have a Custom Toolbar?


Example 1: Your users might be prevented from Adding or Modifying records in a particular document - so it is pointless and confusing to give them Icons which apparently allow them to select these options (even though Security Rights would prevent the icons from actually doing anything). Example 2: The list of icon buttons is very long! Most of them will probably never be used in a particular document, so it makes sense to remove them, leaving you with a cleaner and less cluttered document. The Custom Toolbar Dialog Box is shown and described below.

16

Help File

The options available in this Dialog box are: Default Toolbar Custom Toolbar Show "User View" Toolbar Available Buttons Selected Buttons >> > << < Move Up Move Down Starts Group Use the 'standard' User View Toolbar. Design your own Custom Toolbar. Select where the Toolbar is displayed - Top, Bottom, Right or Left of the screen. Shows all the buttons available to the User Toolbar. Shows those buttons currently selected for a Custom Toolbar. Add every button to the Custom Toolbar. Add the highlighted button to the Custom Toolbar. Remove all buttons from the Custom Toolbar. Remove the highlighted button from the Custom Toolbar. Shift the highlighted button 'up' the display order. Shift the highlighted button 'down' the display order. The highlighted button will start a group. A 'group' of buttons share a common purpose - Add, Modify, Delete, for example. When buttons are 'grouped', they can be picked up and moved as a group up or down the display order. (Users are allowed to pick up Toolbar buttons and shift them about, to suit their own tastes). Allows you to change the Icon Image associated with this button. When you select this option, a new Dialog Box (shown at bottom of page) opens. Allows you to import a previously defined Custom Toolbar into the current form document Allows you to abandon your attempt at defining a custom toolbar, and start again from scratch.

Image Import Reset

Defining a Replacement Default Application Toolbar


To define a new Default Custom User Toolbar for your form documents, click Application>>Properties, and then select the Toolbar option, as shown below:

17

Printed Documentation

You create an Application Custom Toolbar exactly as you would a Document Custom Toolbar. Note that you can import a previously defined Document Custom Toolbar and use this as your Application Custom Toolbar. Note that there is one limitation on the Application Custom Toolbar. It must appear at the top of the screen, rather than at the bottom or sides of the screen.

Assigning New Images to Toolbar Icons


When you click the Image option, a new Dialog Box opens. In this Dialog box you simply associate the button with an image of your choice. Note that the image MUST be a proper Icon, created with an Icon editor (or something which produces the same result). You can't use just any old image - it probably won't fit the toolbar. Note that you will need to create at least two images for the new Icon. The first Icon image will be for the "Normal" appearance of the button, and the second for the "Depressed" appearance. Once you have entered the file/path of the "Normal" button icon, you will be immediately prompted to select the file/path of the "Depressed" button icon. DataEase also allows two further images to be defined a mouse over and a greyed icon. It is possible that the program automatically greys, but if not both these need to be provided. Else, only selected/mouse over is needed (and the greying needs activating).

Applications
Open/Close Catalog
Turns the Application Catalog window on or off.

The Application Catalog


The Application Catalog window lists all the databases, tables, and documents in an application. DataEase automatically updates the Application Catalog when you add, rename, or delete documents and databases links. Viewing the Catalog Lists By default, DataEase displays database names without showing the associated list of tables. To expand a list of the tables, double-click on the database name. By default, DataEase displays expanded lists of the documents (i.e., forms, and reports) in the application. To collapse a list, double-click on the document type. NOTE: In the Application Catalog, DataEase lists the Link Name for a database instead of the name used on the server. If the Application Catalog window is open but obscured by other windows, select Window>>CATALOG to view it. Opening a Document or Table DataEase lets you open a document or table directly from the Application Catalog. To open a document or table, simply double-click on its name or highlight its name and then click the Designer or User View button on the Toolbar. DataEase displays the document or table in User View by default.

Viewing Application Status Information


The Application Catalog contains detailed status information you can view by enlarging the window. For each linked database, DataEase displays the:

Server name or directory (with the name used to refer to the database on the server in quotes).

Database engine type. For each document, DataEase displays the:


Name of the primary table (for a form or report only). Date when the document was last modified.

User Name of the user who last modified it. When a document is open and you choose Application>>Open Catalog, DataEase restores the document to its default size and displays the Application Catalog and the abbreviated Toolbar. When you close the Application Catalog, DataEase removes it from the screen and redisplays your document and the full Toolbar.
NOTE: The Application Designer can use Application>>Preferences to set the CATALOG lists to appear collapsed when you open an application.

How To View Application Status Information


1. 2. 3. If the Application Catalog is closed, choose Application>>Open Catalog. Click on the Maximize button in the upper right corner of the catalog. To view information on the tables in a database, double-click on the database name.

Application Status
The Application Status tab allows you to list useful information on any of the items shown below.

18

Help File

Records Servers Documents Imports Tables. DQL OML Objects Derivations Ranges When you click one of these options, the relevant data will be placed in a system table, as shown below. This allows you to write and run reports on the data an easy way to produce hard-copy system documentation. (Note: You must have checked the Show System Tables option in Application Preferences if you want to run reports on these tables. Otherwise, like all System Tables, they will be hidden). Records $DeStat-RecInfo$ Servers $DeStat_ServInfo$ Documents $DeStat_DocInfo$ Imports $DeStat_ImpInfo$ Tables $DeStat_TableInfo$ DQL $DeStat_DQL$ OML $DeStat_OML$ Objects $DeStat_Object$

Derivations $DeStat_BRL$
Ranges $DeStat_Range$ Note: The Application Status tab has two further options Refresh and Delete. The Refresh option will re-populate all of the status tables with the latest data, while the Delete option will delete all data from the status tables.

Application>>Preferences
Opens the Application Preferences dialog. This dialog is used to set application-level preferences. The Application Preferences Screen has been enhanced, enabling the developer to have more control over DataEase s behavior. Settings that used to be found in .ini files have now been placed onto the Preferences screen. Application Preferences are split between three Tabs: Application User Interface defines Grids, Lines, Labels, Custom Toolbars, etc. Application Data Administration defines Locking Strategy, Search Paths, etc. Application Default Document defines Window Sizes, default form behavior, etc.

Application User Interface


In the User Interface section you define default behavior, as seen by both Developers and Application Users. These preferences are not permanently fixed they can be overridden whenever desired.

19

Printed Documentation

Elements Options

Show toolbar
Check this option to display the Toolbar when you open the application. The default is on. Turning off the Toolbar does not prevent you from displaying it by choosing View>>Toolbar.

Show statusbar
Check this option to display the Status Bar when you open the application. The default is on. Turning off the Status Bar does not prevent you from displaying it by choosing View>>Status Bar.

Show Catalog
Check this option to display the Application Catalog when you open the application. The default is on. Turning off the Catalog for an application does not prevent you from opening the Catalog with Application>>Open Catalog.

Expand Catalog Lists


Check this option to view a lists of all documents in the Application Catalog when the application is first opened. The default is expand catalog lists.

Show Object Palette


Displays the Object Palette in the active window. The default is on.

Grid On
Displays the alignment Grid. The default is on.

Rulers On
Displays the Rulers along the top and left side of the active window. The default is off.

Outlines On

20

Help File

Displays the outlines of Form, Record, and Field objects that have no discernible border. The default is on.

Labels On
Displays the labels at the top of each Form, Subform, or Record object. The default is on.

Visual Options

Password After Minimize


Check this option to require a Password to open the application when it is minimized. The default is off (do not require a Password after minimize). If this option is active, DataEase displays the DataEase Application Security dialog when you try to Maximize or Restore the application from the DataEase icon. To restore the application, enter your Password.

Allow Viewing of SQL Text


Check this option to let a user choose the View>>Generated SQL option. With View>>Generated SQL on, DataEase automatically displays the generated SQL statements that correspond to the current operation (e.g., inserting or updating a record). By default DataEase does not display generated SQL.

Show System Tables


Tells DataEase to show a list of the System tables and their associated relationships, users, and Custom-Defined Functions. The default is off.

Enable DOS Reports


Enable DOS Reports is designed to speed up the conversion process from old DOS-based systems. When you enable this option, a new Heading - "DOS Reports" - appears in your Application Catalog. You can now select File>>New, and link to a DOS report. The DOS report will have its DQL automatically placed in the Procedure Edit box. Here you can make any necessary modifications, and then save it as a DataEase Procedure.

New-Style System Forms


Check this to show new System Forms Users, Relationships, and Custom Functions. Leave it unchecked to show the familiar pre-7 versions.

Refresh Time
Sets the time period (in seconds) between screen refreshes. Screen Refreshes check to see whether or not the data you are looking at has been changed by another user. Increasing the refresh period can improve network performance.

Undo Options

Undo Levels
Specifies the number of successive actions that can be reversed with Edit>>Undo and Redo. You can specify any number from 1 to 99. The default is 2.

Grid and Ruler Options


The Grid and Ruler Options specify whether grid lines display, whether objects snap to the Grid, the number of grids per inch; whether the horizontal or vertical Ruler is on, and the unit of measure. These settings go into effect for the next document you open in Designer View. NOTE: You can override these default settings whenever you want, by using the View>>Grid and View>>Grid/Rulers Options.

Units
Select between units of measurement check either Inches or Centimeters.

Grid Lines or Dots


Creates the Grid as either a pattern of dots or lines.

Grids Per Inch


Displays the number of Grid increments per inch or centimeter. This number can range from 1 to 32 per inch or 1 to 20 per cm.

Show Grid
Displays the Grid when checked; removes the Grid when unchecked.

Snap
Turns on the snap-to-grid feature that forces the top left corner of an object to the nearest Grid co-ordinate.

Show Vertical Ruler


Displays a Ruler on the left edge of the active window when checked; removes the Ruler when unchecked.

Show Horizontal Ruler


Displays a Ruler along the top of the active window when checked; removes the Ruler when unchecked.

21

Printed Documentation

Zoom Options Use Zoom Rectangle


Lets you select an area of the document to enlarge. When you turn this feature on and choose Zoom In, DataEase displays a movable black rectangle. Position the rectangle over the area of the document you want to enlarge and click. The area you select appears in the active document window.

Zoom in By
Sets the zoom in % figure. The default value of 150 magnifies a document to 1 1/2 times its current size. This option also appears on the Zoom cascade menu.

Zoom Out By
Sets the default zoom out % figure. The default value of 67 reduces a document to 2/3 of its current size. This option also appears on the Zoom cascade

Table Definition Security


Allows you to specify a minimum security level for any user who wishes to modify a database table (i.e., modify a column definition or add or delete a column). The default is High. Note that the developer may over-ride this setting by specifying a higher security level in application tables.

Custom Toolbar
The User Toolbar contains a row of icons, each representing some commonly-performed action, such as "Save Record", "Clear Form", and so on. In early versions of DataEase, the User View Toolbar was an 'on or off' affair. By opening Document Properties you could choose to either display it, or not to display it - and that was the extent of your options. In DataEase 6 and 7 you are given a new Document Menu option - Custom Toolbar. When you select this option, you can design your own Custom User Toolbar, containing icons for only those actions which you wish to make available to your users. Each form document can have its own Custom User Toolbar. Additionally, you can define a new 'Custom Application' User Toolbar, to replace the default Toolbar defined by DataEase.

Why have a Custom Toolbar?


Example 1: Your users might be prevented from Adding or Modifying records in a particular document - so it is pointless and confusing to give them Icons which apparently allow them to select these options (even though Security Rights would prevent the icons from actually doing anything). Example 2: The list of icon buttons is very long! Most of them will probably never be used in a particular document, so it makes sense to remove them, leaving you with a cleaner and less cluttered document. The Custom Toolbar Dialog Box is shown and described below.

22

Help File

The options available in this Dialog box are: Default Toolbar: Use the 'standard' User View Toolbar. Custom Toolbar: Design your own Custom Toolbar Show "User View" Toolbar Show or Hide the User Toolbar. Show Toolbar On: Select where the Toolbar is displayed - Top, Bottom, Right or Left of the screen. Available Buttons: Shows all the buttons available to the User Toolbar. Selected Buttons: Shows those buttons currently selected for a Custom Toolbar. >> Add every button to the Custom Toolbar. > Add the highlighted button to the Custom Toolbar. << Remove all buttons from the Custom Toolbar. < Remove the highlighted button from the Custom Toolbar. Move Up Shift the highlighted button 'up' the display order. Move Down Shift the highlighted button 'down' the display order. Starts Group The highlighted button will start a group. A 'group' of buttons share a common purpose - Add, Modify, Delete, for example. When buttons are 'grouped', they can be picked up and moved as a group up or down the display order. (Users are allowed to pick up Toolbar buttons and shift them about, to suit their own tastes). Image: Allows you to change the Icon Image associated with this button. When you select this option, a new Dialog Box (shown at bottom of page) opens. Import: Allows you to import a previously defined Custom Toolbar into the current form document . Reset: Allows you to abandon your attempt at defining a custom toolbar, and start again from scratch.

23

Printed Documentation

Assigning New Images to Toolbar Icons


When you click the Image option, a new Dialog Box opens. In this Dialog box you simply associate the button with an image of your choice. Note that the image MUST be a proper Icon, created with an Icon editor (or something which produces the same result). You can't use just any old image - it probably won't fit the toolbar. Note that you will need to create at least two images for the new Icon. The first Icon image will be for the "Normal" appearance of the button, and the second for the "Depressed" appearance. Once you have entered the file/path of the "Normal" button icon, you will be immediately prompted to select the file/path of the "Depressed" button icon. DataEase also allows two further images to be defined a mouse over and a greyed icon. It is possible that the program automatically greys, but if not both these need to be provided. Else, only selected/mouse over is needed (and the greying needs activating)

Application Data Administration


This is where the developer defines important items such as Network Locking strategy, and Search Paths.

24

Help File

Paths Image Search Path


Tells DataEase which directories to search for image files. The path can be up to 255 characters. Example C:\program files\DataEase\Images When you enter a filename for a data image, DataEase searches for the file in the directories in the Image search path. If the file exists in one of these directories, DataEase replaces the filename with the image. Otherwise, DataEase displays an Image Loading Error message followed by the Image Definition dialog. You can use the Image Definition dialog to choose the image you want to display in the Image field. If you receive the Image Loading Error message, check that the directories that store the images you want to display are listed in the Image search path. NOTE: You do not have to include the application directory in the Image search path. When you include an image in a record or document layout, DataEase automatically searches this directory.

Style Sheet Search Path


Tells DataEase which directories to search for Style Sheet files. The path can be up to 255 characters. Example F:\common files\DataEase\Styles When a you open a document, DataEase automatically searches for the Style Sheet file in the application directory, in the DataEase STYLES subdirectory, and then in the directories listed in the Style Sheet search path. If the file exists in one of these directories, DataEase loads the Style Sheet, letting you use or change it. Otherwise, DataEase displays the Error Loading Style Sheet alert message. If you receive this message, check that the directory that stores the Style Sheet is listed in the Style Sheet search path.

25

Printed Documentation

Administration Options Application Locking Strategy


DataEase allows four types of locking strategy.

Basic: A basic implementation of locking, which works with both Advisory and Non-Advisory networks. It provides replication in data-entry, and allows configurable locking for Record Entry, Reporting, and Procedures. Both Shared and Exclusive locks are supported. This option should be suitable for all networks. Full: This option requires an Advisory Network, such as Novell Netware or Windows NT Server. It provides all the facilities listed under "Basic", with the bonus of improved performance. This offers superior performance to the 'basic' option. Your network must support Advisory Locking if you wish to use this option. Novell and NT Server are two examples of such networks.
Opportunistic: A non-locking approach, similar to that of Microsoft Access. Data replication during data entry is provided, but there is no locking. This option will work on any network, and actually provides very fast performance on some applications - for example, those with lots of 'new' data entry work, with little data modification. It works badly on applications where records are subject to frequent modification, since roll-backs are time consuming and annoying to the operator. Important: If this option is used, then it is ESSENTIAL that only one user runs data-modifying procedures at any one time. This can be achieved in various ways - menu/user security restrictions, locking the database, and so on. Single User No locking strategy is applied, because there is only one user in the system at any one time.

User View Locking


Lets you specify the locking rules for a document, when in User View. Choose:

None when all users have full access to the document. The default is none. Shared to let multiple users view records simultaneously. Exclusive to let one user access a record at one time. This is a highly restrictive option, and should only be chosen if you have a pressing reason for preventing two users from viewing the same record at the same time. Note that, if two users are 'chasing' each other through the file, then the second user will NOT be allowed to 'overtake' the first user. If there are fifty records in the file, and User One is viewing Record 20, then User Two will be unable to view records beyond 19.

Printing Locking Data Locking


When printing, how should data be locked? This option tells DataEase whether to lock the records or the files when printing a document. Choose:

Lock records if you prefer to lock records one by one as they are processed. Other users cannot modify or delete these records but they can view them. The default is lock records. Lock files to lock all records that will be used during printing.

Files
Tells DataEase how to lock the records during printing only if Data Locking is set to Lock records. Choose:

Lock nothing to allow other users to view, modify, or delete records selected for printing. Lock records to lock any records that have been selected for processing. Other users cannot modify or delete these records. They can view the records if the selected records will only be listed by the procedure (not modified or deleted). Other users can view modify, delete, or add records in the same form(s) that have not been selected. Once processing begins, the locking rule applies. This is the default option. Lock files to lock the form(s) from which records are being selected. Other users cannot add, modify, or delete records in the form. They can view records in the form if the selected records will only be listed by the procedure. The forms remain locked until printing is complete.

Currency Name
Type in the name of the currency being used with this application Dollar, Sterling, Mark, etc.

26

Help File

Digits after Decimal


Enter the number of digits placed after the decimal in a Currency field. This defaults to a value of 2, which suits most currencies.

Date Base Year


Tells DataEase the base year for the internal calendar DataEase uses to manipulate data values. DataEase can return dates up to 100 years after the Base Year. As a default, DataEase assumes a Base Year of 75, which means it can express dates ranging from January 1, 1975 to December 31, 2074. You can specify any number from 1 to 75 (inclusive) as the Base Year. For example, if you specify 55 as the Base Year, DataEase uses a date range from 1955 to 2054.

Derivation Check on Import


Check this option if you wish DataEase to perform a derivation check when you transfer records between database tables. Uncheck this option and you will turn off all field derivation checks (range checks, uniqueness, etc) for all table updates, except manual record entry. The default is to perform the Derivation check. With this option on, DataEase enables range checking and re-derives all the field values in the destination form that contain Derivation Formulas. If a field value used in the Derivation Formula of another field is overwritten by an imported value, DataEase automatically re-derives the Derived field's value. Sequence fields are always re-derived after data is imported into the destination form. NOTE: Turning off derivation checking improves performance during large imports, and it is for this reason that the option to turn off checks is provided. For example, the imported data might be clean, requiring no checks. Or you might want to import raw data and then massage it via processing reports. IMPORTANT: If you do uncheck this option for a bulk import, remember to turn it on again when the import has completed!

Zero Pad Numeric Strings


Check this option to insert zeros to the left of the values in Numeric String fields. The default is to zero-pad numeric strings, so entering a 1 into a five digit field would produce 00001.

Encrypt Users Table


Check this option to automatically encrypt each user's name and Password as it is entered in the Users form. Encryption scrambles the data so that it can only be read by DataEase. The default is on.

Application Default Document


This dialog box can be used to pre-select some elements of DataEases behavior. The settings described below are default values the developer can over-rule them whenever desired.

27

Printed Documentation

General Options Document Type


Sets a default value for when you create a new document. Values can be Form, Menu, Procedure or Report.

Report Type
If you selected Report as your Document Type, then you can specify whether the report should default to Print or Live.

Initial Action
If you selected Form as your Document Type, then you can specify the forms default action displaying First Record, Last Record, New Record, QBF Selection, or Table View.

Style Sheet Name


Specifies the name of a default Style Sheet. Defaults to none.

Form Options Prevent Data Entry


Check this to set the Document Property "prevent data entry" in every new document. Defaults (not surprisingly) to off. Useful in an Archive database.

Clear Form after Entering a Record


Check this option and your forms will default to clear on save saving the operator from blanking the saved record before typing in another.

Suppress automatic TAB when a field fills


Check this option and your forms will default to retaining the focus in a field, even when that field has been filled to capacity. Defaults to unchecked, meaning that the focus moves to the next field.

28

Help File

Print Options Print to


When you print something from DataEase, you are given the choice of setting the print destination to one of three places - File, Window or Printer. You may select the default destination here.

Show Print Dialog


Check this option any, by default, when you try to print something, the Print Dialog box will be opened.

Print Details
Here you can set the default value for Print quality. You can select Draft, Text, or WYSIWYG.

Window Options
The X, Y, Width and Height parameters can be used to specify a default document window size. for your Window Placement displays the opening size and location of the document window. Choose:

X The Window start position, in pixels from the left edge of the screen. Y The Window start position, in pixels, from the top of the screen. Width Specifies the width, in pixels, of the window. Height Specifies the depth, in pixels, of the window. Open maximized
Open Maximized displays the document in a fully maximized window.

Zoom to fit window


Expands the on-screen objects so that use the full Document Window.

Workstation Preferences
When you sign on to DataEase you can select File>>Options to configure a wide range of workstation preferences The various options are available in two Tabs DataEase and DataBase Engine.

DataEase Tab

29

Printed Documentation

Show Splashscreen on startup


Check this option, if you want to see the DataEase Spashscreen on startup.

Show Welcome dialog on startup


Check this option, if you want to see the DataEase Welsome screen on startup.

Default Table View Column width


Sets the default column width in Table View. 30 characters width is the default figure.

Left-justified text adjustment


Allows you to specify a number of blank character spaces before the display of text in left-justified text fields. This is a visual display issue only no blank characters are actually stored. It just makes text easier to read, if the first character isnt hard-up against the edge of the field.

Set item attribute for all fields in new QBM group


If checked, this automatically places all fields in a new QBM group into the selected box. If left unchecked, you have to manually add the fields you wish listed. This is simply a default you van override it when designing a QBM.

Show page break line when reporting to screen


When checked, page breaks are shown when a report is sent to screen. This gives you a rough visual idea of how long the report is, and may help you decide whether to print a hard copy or not.

Security Level to save QBM


Allows you to decide within limits who can permanently save a QBM to disk. Valid options are Security Levels Medium1, Medium2 and Medium3. You can not use this setting to allow Low Level users to save a QBM.

Default toolbar location


By default the toolbar is placed on the top of the screen. But you can change this to Left, Right, or Bottom, as desired. Note that all DataEase toolbars can be picked up and dropped as floating toolbars, if you so wish.

Show extended toolbar


If checked, displays the full extended toolbar. If unchecked, displays a reduced toolbar which contains only the most commonly needed icons.

Application Paths

New and Existing

30

Help File

Allows you to specify a default drive/path for new and existing applications in other words, when you click "new app" or "open app". Remember, you should NEVER place two applications in the same directory.

Sample
Allows you to specify the path to your Sample Applications. Useful if you use them a lot.

Template
Allows you to specify the path to your Template Applications. Useful if you use them a lot.

Network
Allows you to specify a path to your Network Applications. Saves you clicking your way through a lengthy path, such as h:\common apps\designer3\dataease\newapp.

Database Engine Tab

Locking Options Share Local Database


If you intend to share a local application (i.e. an application held on your local workstation, rather than a network server), then you must check this option. Additionally, DataEase must be configured as Networked (not standalone).

Display Conflicting User


When checked, displays the name of the Computer which has a locking conflict with you. For example, if you are trying to modify a record which another uses currently has open, checking this option will you the name of the Computer which has the record open.

Initial Timeout Subsequent Timeout Strategy


Allows you to select your Network Locking Strategy. Valid options are:

Basic

31

Printed Documentation

A basic implementation of locking, which works with both Advisory and Non-Advisory networks. It provides replication in data-entry, and allows configurable locking for Record Entry, Reporting, and Procedures. Both Shared and Exclusive locks are supported. This option should be suitable for all networks.

Full
This option requires an Advisory Network, such as Novell Netware or Windows NT Server. It provides all the facilities listed under "Basic", with the bonus of improved performance. This offers superior performance to the 'basic' option. Your network must support Advisory Locking if you wish to use this option. Novell and NT Server are two examples of such networks.

Opportunistic
A non-locking approach, similar to that of Microsoft Access. Data replication during data entry is provided, but there is no locking. This option will work on any network, and actually provides very fast performance on some applications - for example, those with lots of 'new' data entry work, with little data modification. It works badly on applications where records are subject to frequent modification, since roll-backs are time consuming and annoying to the operator. Important: If this option is used, then it is ESSENTIAL that only one user runs data-modifying procedures at any one time. This can be achieved in various ways - menu/user security restrictions, locking the database, and so on.

Single User
No locking is applied. Only suitable for stand-alone applications. Note: If your workstation setting conflicts with the Developer-assigned application setting, then you will receive a warning message, and will not be allowed to open the application.

Buffering Options
The default values (200, 200, 200, 20) are considered the best for DataEase, so should only be altered by someone with expert knowledge.

Initial Size
Defaults to 200. This set of parameters determines the size of the 'window' in memory into the multiview.

Grow by
Defaults to 200.

Page size
Defaults to 200. The Maximum items is 4000 (Pages * Page size), so this is already maxed out.

Max Pages
Defaults to 20 (20*200 = 4000, the maximum).

SQL Options Reporting


Allows you to select the destination of SQL Message Reporting. The five possible destinations are;
Ignore Window File If Window File Always File Only

Sorting Options

Buffers
Controls the amount of sort buffers in memory before a write to disk takes place. The more buffers you assign, the faster the sort. But buffers take up memory. The maximum value is 32000.

DQL Options Free Tuples


When ticked forces reselection of subform records each time through like CUI.

Scan Quit Ratio


Affects the percentage of selected records that cause index use to be dropped. Index only used in selection if < 32000 records selected and < this percentage of total records. This drastically improves performance when most records in a file are selected. However, it is a global setting, so be cautious shifting this from the default value.

32

Help File

Valid inputs are from 0 to 100.

Statistics Options Running Totals


When ticked makes running totals available in .items areas and for virtuals, etc,.on all documents.

Keep Last Tuple


When ticked DataEase will keep the last tuple for use in Trailers. Applies to DQLs only.

Application>>Relationships
Opens the Relationships form. The Relationships form lets you define a special link, called a relationship, between any two database tables, providing the tables contain one or more identical columns (called Match fields). When tables are related, you can combine data from these tables in a form or report and use the DataEase lookup feature to automatically enter data in record entry forms built over these tables.

The Relationships Form


Records in lets you choose the name of the primary table in the relationship. Are Related to Records in lets you choose the name of the secondary table in the relationship. Based on the Following Fields Being Equal lets you choose a pair of columns, one from each table, that tells DataEase which records are related in the two database tables. Records are related if the values in the columns are identical. In DataEase, these column pairs are called Match fields. Match fields can have different names, but need to be of the same length and type. You can choose one, two, or three pairs. If you specify multiple pairs, records are related when all values in the Match fields in the primary and secondary tables match. The Match fields shown below tell DataEase that a FAMILY MEMBERS record with the same MEMBER ID as a record in the MEMBERS form is a member of that family. NOTE: Do not specify a virtual field as the Match field for a relationship. Although Match field characteristics are usually similar, if the Match field value in the first form is derived by DataEase, the Match field in the second form should not be. Also, a pair of Match fields should not both be of the Sequenced ID Data Type.

Custom Relationship Names


Is an optional feature that lets you assign a unique name to a relationship, when necessary. When you create one relationship between two tables, DataEase uses the database table name to identify the relationship. You must assign a Custom Relationship Name when:

You create two or more relationships between the same two tables. For example, MEMBERS and FAMILY MEMBERS have two relationships: one based on MEMBER ID values and one based on TELEPHONE values. You create a relationship between two records in one table; that is, the primary table and secondary table in the relationship are the same. For example, each employee works for one manager, and the manager is also an employee. Therefore, if an EMPLOYEES record contains the field MANAGER, the relationship is to another record in the EMPLOYEES form.

You want to change how DataEase joins the tables in the relationship (applicable only on an SQL engine). See the following section, Changing the Way DataEase Joins Tables. A Custom Relationship Name cannot be the same as any other Form Name or Relationship Name in the database. It should be meaningful to you and anyone else who will use the database. Use the Custom Relationship Name to identify the second relationship for a lookup Form Name during form design, in Multiforms, and in reports. Nojoin: Whenever a document requires data from two database tables, DataEase temporarily joins (merges) the tables using a left outer join (selects all parent records regardless of whether any matching child records exist). In some cases you may improve performance by changing the way DataEase joins the tables. DataEase lets you prevent the tables from being joined or change the join to an inner join, if your SQL engine supports this. To make DataEase use an inner join, insert the prefix inner: before the custom relationship name. To prevent the tables from being joined, use the prefix nojoin:. For example, to create an inner join between the MEMBERS and FAMILY MEMBERS tables, enter inner:R_FAMILYPHONE as the custom relationship name. NOTE: A Custom Relationship Name cannot be the same as any other form or relationship name in the application.

Referential Integrity
tells DataEase how to treat Subform records when the matching Main form record is modified or deleted. DataEase lets you choose from the referential integrity options described below.

33

Printed Documentation

If you define referential integrity on the SQL engine, the engine always updates the related records (in one or more tables) when the Match field value is modified or a record is deleted, regardless of whether the tables are part of a DataEase Multiform. NOTE: If you choose Server C or Server SN, you must define a referential integrity rule on the SQL engine. If you do not, you may end up with orphaned Subform records when you modify or delete a Main form record. Unlike the character-based version of DataEase, DataEase applies referential integrity only when you modify or delete records in a Multiform in Form View. If you modify or delete a record in Table View or in a form that does not have a Subform, DataEase does not update related records.

34

Help File

Joins The three types of joins are summarized in the table below.

Save tells DataEase to save the current relationships record to disk. Done tells DataEase to close the Relationships form.

How to Define a Relationship


1. 2. Choose Application>>Relationships. DataEase displays the Relationship form. Click on the drop-down arrow in the field beneath "Records in," click the name the database table for the first form, and press Tab. Click the drop-down arrow beside the next field, click the name for the table of the second form, and press Tab. Enter the Match field(s) on which to base the relationship.

3.

35

Printed Documentation

4. 5. 6. 7. 8. 9.

Click the drop-down arrow, choose the name of the Match field for the first form in the first column, and press Tab. Click the drop-down arrow, choose the name of the second Match field, and press Tab. Enter any other pairs of Match fields you want to use. Type in the Custom Relationship Name (if necessary). If the two forms will constitute a Multiform, choose the referential integrity option in the referential integrity field under the Subform table name. Select Save at the bottom of the Relationships form to save the new record and then select Done to close the form.

Window>>Arrange Icons
Aligns all the DataEase document icons in a straight row at the bottom of the DataEase desktop. When you click on a window's minimize button, it becomes an icon until you restore it by double-clicking on it.

How to Arrange Document Icons


1. 2. Choose Window>>Arrange Icons from the Window menu. DataEase aligns all document icons in a line at the bottom of the desktop.

Application>>Utilities>>Backup Application
Opens the Backup dialog, which lets you backup your application. Disk drive, power failure, or simply human error, such as inadvertently deleting some records, can cause files to be irretrievably lost. For these reasons, we recommend that you backup your application(s) at least once a week and after each protracted record entry session. NOTE: DataEase Backup Application runs faster than Operating System Backup because DataEase does not copy program files, index files, or deleted records.

The Backup Dialog


Backup Destination Directory lets you select the backup destination directory and tells you how much storage space (in bytes) you need for your backup. Log Messages to File lets you store system messages in an ASCII text file during backups. The default log filename in the format BACKDAAA.LOG, where D is the first letter of the application, and AAA is a letter combination used to prevent duplicate file names. For example, if you backup the Club ParaDEASE application, and the log file BACKCAAA.LOG exists in the application directory, DataEase names the default log file BACKCAAB.LOG instead. Error Handling lets you control how the system handles errors during backups. Choose:

Ignore Error & Continue to continue the backup when an error occurs. Select this option if you will not be present during the backup and you expect only minor errors. Cancel to stop the backup when an error occurs. Select this option if you require an errorfree backup and will not be present. Decide When Error Occurs to decide whether to continue or cancel the backup as DataEase encounters each error.

NOTE: When you choose Application>>Utilities>>Backup Application, DataEase locks the application from other users until the backup is complete. If you choose Decide When Error Occurs, be sure to stand by. If an error occurs, DataEase displays a dialog and waits until you respond. Data Backup Options lets you select the data copied during backups. Choose:

All Data to copy DataEase documents, tables, and data, and SQL tables and data. Native Data Only to copy DataEase documents, tables, and data only. No Data to copy DataEase documents and tables only, excluding data.

NOTE: If the directory is not empty or you use a diskette that has previously been used as a DataEase backup diskette, DataEase asks if you want to continue or cancel the backup. If you continue, DataEase overwrites the files with the same filenames. TIP: We recommend that you keep at least two backups of each application. Make the first copy at the end of Week #1 and a second copy at the end of Week #2. At the end of Week #3, make a copy using the Week #1 diskettes. This way, you overwrite the oldest copy of the application with the newest copy.

How to Backup an Application


1. Choose Application>>Utilities>>Backup Application. DataEase opens the Backup dialog.

36

Help File

2. 3. 4. 5. 6. 7.

Enter a directory in the Backup Destination Directory box. If you want to store system messages in a file, check Log Messages to File. DataEase displays a default directory and log file in the Message Log File box. Choose an Error Handling option: Ignore Error & Continue, Cancel, or Decide When Error Occurs. Choose a Data Backup option: All Data, Native Data Only, or No Data. Click OK to close the dialog. If you are backing up to a floppy drive, DataEase displays a dialog that asks you to insert the first backup diskette. Insert the first diskette in the floppy drive and click OK. DataEase displays a dialog during the backup and another dialog when the backup is complete. If you entered a log file in step 3, the dialog asks if you want to view it. Click OK to return to the application, or click Yes to view system messages. If you view the messages, doubleclick on the control box to close the window and return to the application.

8.

View>>Data-Entry Form
Displays the document's Data-entry form, which lets you specify selection criteria and other information to be used by the procedure before the processing begins. If a DQL Procedure contains a Data-entry form, DataEase displays it immediately when you run a Procedure.

How to Change the Document Display Option


1. 2. 3. 4. 5. Choose View>>Layout to display the main document. Choose View>>Page Header to display the Page Header. Choose View>>Page Footer to display the Page Footer. Choose View>>Procedure to display the Script Editor. Choose View>>Data-Entry form to display the Data-entry form.

View>>Table
Displays multiple records at once in a table. Each row is one record and each column is a field on the form.

How to Change the Record Display Option


1. 2. Choose View>>Form to display records one at a time. Choose View>>Table to display multiple records in a tabular format.

Customizing Table View To Ease Record Entry


DataEase lets you customize Table View by changing the size of columns and rows in a table or by moving an entire column to a new location. You can customize the appearance of Table View in several ways. To fit more information in the document window, you can decrease the width of columns or the height of rows. To minimize the need for scrolling data and reduce the need for creating custom reports, you can move the columns that are most important into view. For example, if you need to contact members by phone, you can move the TELEPHONE column in the MEMBERS form to the left side of the table. This eliminates the need to scroll the table to view the TELEPHONE column. NOTE: The changes you make to the columns and rows in Table View are temporary. These changes do not affect the position or size of the fields in Form View, and DataEase discards these changes when you close the document. The next time you open the form in Table View, DataEase displays the columns and rows in their original size and position.

How to Change the Width of a Column in Table View


1. 2. 3. To increase or decrease a column's width, click the right column border in the column header. When DataEase displays the double-sided arrow, drag the border to the right to increase the width or to the left to decrease the width. Release the mouse button. The other columns shift to the right or left, but retain their original width.

NOTE: When you increase or decrease a column's width, the text in all columns retains its size and position. However, if you decrease a column's width, some text in that column may be hidden by the right column border.

How to Change the Height of All Rows in Table View


1. 2. 3. To increase or decrease the height of all rows, click the top or bottom row border of any row in the Row# column. DataEase displays the double-sided arrow. To increase the height of all rows, drag the bottom row border down or the top row border up the desired distance. To decrease the height of all rows, drag the top border down or drag the bottom row border up the desired distance.

37

Printed Documentation

4.

Release the mouse button. The text in the rows retains its size and position. If you decrease the height, some text may be hidden from view by the bottom row border.

How to Move a Column in Table View


1. 2. 3. To select the column, click (and hold) in the center of the column header. DataEase displays the column in reverse. Drag the selected column to its new position. Release the mouse button. DataEase shifts the other columns to the right or left to accommodate the repositioned column.

View>>Form
Displays only one record on screen at a time.

How to Change the Record Display Option


1. 2. Choose View>>Form to display records one at a time. Choose View>>Table to display multiple records in a tabular format.

File>>Close
Closes the active document.

The Unsaved Data Changes Alert Message


The Unsaved Data Changes alert message lets you quickly save your work. Use: Yes to save the changes and close the form. No to abandon the changes and close the form. Cancel to return to the form. NOTE: Choosing Yes updates the record on screen. To save your changes as a new record, click Cancel and choose Edit>>Save As New Record.

How to Close a Document

or... Click on the window you want to close and select File>>Close. Press Ctrl + F4. Double-click on the Control Menu box in the upper left corner of the window.

File>>Exit
Exits DataEase and returns you to the Windows Program Manager. When you choose this option, DataEase displays the Close Application alert message.

The Close Application Alert Message


The Close Application alert message lets you return to the application. Click:

OK to close the application. Cancel to return to the application.

How to Close an Application/Exit DataEase


1. 2. 3. Choose File>>Close Application or File>>Exit. DataEase displays the Close Application alert message. Click OK. DataEase closes all documents and displays the initial menu bar on the vacant DataEase desktop. If you exit DataEase, you return to Windows.

Application>>Custom Functions
Opens the Custom Functions form. This form is used to register a CDF with your application. The Custom Functions form lets you view, modify, and/or delete Custom Functions records.

Custom-Defined Functions
A Custom-Defined Function (CDF) is a program that you write outside DataEase in C, Assembler, or another supported programming language, that expands or modifies the action performed by one or more of the 58 predefined DataEase functions. A CDF can be executed from a Validation Formula or Derivation Formula for a field, or from the expression for a button or image action.

38

Help File

How to Integrate CDFs with DataEase


To integrate a CDF with DataEase, you must perform two steps outside of DataEase and two using DataEase. 1. 2. 3. 4. 5. 6. 7. 8. Write the function. See "Writing a CDF," in Appendix B of the Designer's Guide for information on how to write a CDF. Compile and link the function. See "Creating a Windows Dynamic Link Library File" in Appendix B of the Designer's Guide for information on how to compile and link the object code into a Windows DLL file that can be called from DataEase. Register the function. See "Registering a CDF," just after this introduction, for information on how to record functions in the DataEase Custom Functions form. Execute the function. See "Using CDFs with DataEase," later in this topic, for information about how to execute a CDF from a Validation or Derivation Formula, or from the expression for a button or image action.

The Custom Functions Form


Function Name is the name you assign to the CDF. A Function Name can have up to 32 characters. Each record in the Custom Functions form must have a unique Function Name per operating system. OS Type tells DataEase whether the specified CDF Library file is for (DOS, DOS 16M (only), OS/2, or Windows). Description is a meaningful description for a CDF. The Description can have up to 40 characters. DataEase displays the Description when the user requests help on the function. CDF Library Name is the name of the CDF DLL file to which the function belongs. In Windows, enter the complete pathname of the CDF DLL file (including the drive and directory). NOTE: Windows will only find the library if the directory is in the PATH command of your system's AUTOEXEC.BAT file. To save a Custom Functions record, you must enter values in the Function Name, Library Name, and Return Value fields. Memory Requirement is provided for compatibility with character-based DataEase 640K. When entering a new Custom Functions record, leave this field blank. Entry Point is provided for compatibility with character-based DataEase. When entering a new Custom Functions record, leave this field blank. Return Type specifies the type of value returned by the function. The return value must be one of the types described in the table below. Return Value Types Type Int Long Float Double Used for a Function that Returns: An integer does not return a value A floating point value. All DataEase floating point values are double precision. A floating point value. All DataEase floating point values are double precision. A floating point value. All DataEase floating point values are double precision. A floating point value. All DataEase floating point values are double precision. Explanation Twobyte integer value. Four-byte integer value. Single precision floating point. Double precision floating point. As a default, double conforms to the Microsoft double return type standard. Double precision floating point. Double BC conforms to the Borland C double return type standard. You must choose Double BC in place of double when you use a Borland C compiler. Hexadecimal address of a value in an ASCII string type field.

Double BC

String

The address of a Text, Numeric String, Date, or Time field.

Function Parameters Specifies the values that can be passed as parameters to the function. A function can pass data from the current record, a constant, a temporary or global variable, the result of a predefined DataEase function or CDF, or any DataEase expression, such as lookup or count of. You can enter as many as 10 parameters for each function. Use:

39

Printed Documentation

Parameter Name to enter the label that describes the parameter. A Parameter Name can have up to 20 characters. Parameter Type to enter the type of data DataEase passes to the function. Each parameter must be one of the types found in the table above. Modifying Parameters If you modify one or more function parameter types, you must modify the reference in the Derivation Formula, Validation Formula, or expression for a button or image object accordingly.

Using CDFs with DataEase


Once you have entered a record for a function in the Custom Functions form, you can use the CDF in a Derivation Formula, Validation Formula, in the expression for a button or image object, or anywhere you can use one of the 58 predefined DataEase functions. When a CDF is executed from a : Derivation Formula, DataEase uses the value returned by the function as the new value for the field or as part of the calculation used to determine the field value. Validation Formula, DataEase uses the value returned by the function as the formula or as part of the formula that restricts the values that can be entered in the field.

Executing A Cdf From Dataease


When DataEase encounters a CDF in a formula or procedure, it: Searches the Custom Functions form for a corresponding CDF record. Loads the CDF Dynamic Link Library file specified in the CDF Library Name field on the Custom Functions record. Executes the function. NOTE: Once a CDF DLL file is loaded, it stays loaded until you close all documents from which a CDF in the file is called.

Application>>Users
Displays the Users Information form. This form is used to authorize a new user so he/she can access the application.

The Users Information Form


Name lets you assign the user a name that he/she enters in the Application Security dialog when opening the application. Each Name must be unique and can be up to 15 characters in length. Password lets you assign the user a Password that he/she enters in the Application Security dialog opening the application or restoring it from an icon. A password can be up to 8 characters in length. NOTE: When you create an application, DataEase displays the Application Security dialog, which asks you for your name and password. DataEase automatically creates the first Users Information form record with a High Security Level using this information. If you do not enter a name or password, DataEase enters a Users record with no name and password. Therefore, anyone can open the application and access all DataEase documents and functions in both User View and Designer View. A Name or Password can be any combination of upper or lowercase characters, spaces, symbols, or ANSI characters. To use an ANSI character, hold down Alt and type 0 and the 3-digit ANSI code from 0 to 255 on the numeric keypad. NOTE: To save a Users record, you must enter a value in the Name field. Values for the other fields are optional. If you leave Password blank in the Users Information form, the user simply leaves the Password blank in the Application Security dialog. TIP: To further simplify giving users access to an application, you can assign groups of users with the same needs and security level the same name/password combination. Level lets you specify which Designer View and User View options a user can perform. DataEase provides seven basic security levels, ranging from High, which lets the user perform any task in User View and Designer View, to Low3, which lets the user perform only a few User View tasks. You also can increase the security level for a particular document or field. For example, if you specify a High Security Level to view SALARY field values, a user who is assigned a Medium1 Security Level can view and modify other fields on the form, but not view, enter, or modify SALARY values. NOTE: If you don't fill in the Level field for a user, DataEase assigns a High Security Level. You must specify DataEase security levels in DataEase and SQL privileges and permissions using an SQL program or utility. SQL permissions and privileges are required only if your application accesses a table stored on an SQL engine. Startup Document tells DataEase which document to display immediately after the user signs on to the application. You can assign a user any form, report, menu, or procedure in the application as his/her startup document. Screen Style is automatically filled in if you access an application created using a character-based version of DataEase. Otherwise, leave Screen Style blank. Help Level

40

Help File

tells DataEase whether to display context-sensitive field, form, and DataEase system help messages automatically or on demand. This option applies only when the user is accessing the application from a character-based version of DataEase. If the user does not need to access the application from a character-based version of DataEase, leave this field blank. NOTE: DataEase provides on-demand help for all DataEase tasks in a standard Windows help system. In addition, DataEase automatically displays a brief help message about the currently highlighted menu option or Toolbar button in the Title Bar. The application designer also can define custom help messages for specific documents and fields, which appear in a dialog when you choose Help>>User Help.

How to Define a User for an Application


1. 2. 3. 4. 5. 6. 7. 8. 9. Choose Application>>Users. DataEase opens the Users Information form. Enter a User Name in the Name field and press Tab. Optionally, enter a Password and press Tab. Choose a security level. If you skip this field, DataEase automatically assigns the user a High Security Level. Optionally, enter the name of a document in the current application in the Startup Menu field. Click Save. If you are finished adding users, click Done. To add another user, choose Edit>>Clear Form to display a blank record and repeat steps 2-7. If a user needs to access an SQL database linked to an application, he/she must have access rights to the SQL server and the database.

To let a user access an SQL database, create a record in the DataEase Users Information form with a User Name that is a valid Login Name on the server. TIP: If your application links to multiple databases, assign the same Login Name for each database.

File>>Delete
Displays the Delete a Document dialog described below. This dialog is used to delete a document (and, optionally, the corresponding table) from the current application. Before DataEase deletes a document, it displays an alert message. Click OK to delete the document or Cancel to leave the document intact.

Delete A Document Dialog Options


Delete Table If you delete a form that defines a database table, DataEase asks if you want to delete the table. Choose: Yes to remove the form, table, and all associated data and index files from the disk. No to remove only the selected document. Cancel to leave the table and document intact. If a table you want to delete is used as a Subform, DataEase displays a third alert message with the same choices that are listed above. This lets you reconsider the deletion. NOTE: To delete a table, all documents that use the table must be closed, including the document that defines it. When you delete a table, DataEase deletes all the relationships associated with it.

How to Delete a Document and/or Database Table


1. 2. 3. 4. Choose File>>Delete. DataEase opens the Delete a Document dialog. Double-click on the document name. DataEase displays the Delete Document alert message. Click OK. If DataEase asks if you want to delete the table as well, click Yes to delete the database table and all its data or No to delete only the document.

NOTE: Because you control a table through the form that defines the table, if you delete a document that defines a table, you should create another form to define that table. Choose or create another form that uses the table, click Defines Table in the Document Properties dialog and save the document.

Document>>Properties
Opens the Document Properties dialog, which lets you view and change the Type of Document, Style Sheet, Window Options, and User View Options.

THE DOCUMENT PROPERTIES DIALOG


Type of Document displays the type of document. A document can be a form, report, or menu.

41

Printed Documentation

When the document is a form and the Defines Table checkbox is checked, the field definitions in the document define the columns in the associated database table. If the Defines Table checkbox is not checked, the document uses (but cannot change) the columns in the associated database table. When the document is a report, choose:

Print to send the data to the print destination selected in the Print Options dialog. Live to set the Initial Action to be other than print.

NOTE: You can define a DataEase form over a table created with a character-based version of DataEase (version 4.5 or higher). If you change the form that defines the table to the DataEase form and modify the table definition, you can no longer access the form in a character-based version of DataEase. Style Sheet displays the name of the document's current Style Sheet. To change the document's Style Sheet, select a different Style Sheet from the drop-down list box. Window Placement displays the opening size and location of the document window. Size displays the width and height of the window in pixels. Location displays the distance in pixels from the left edge of the workspace (X) and from the top edge of the workspace (Y). Open Maximized displays the document in a fully maximized window when checked. Current Button changes the numbers in the Width and Height boxes to reflect the document window's current size. The numbers in the X and Y boxes locate its current position on the screen. User View Options let you choose which action the document performs when opened in User View and change several important default record entry settings. When a report is defined to print when opened, these options are not available. Initial Action lets you choose which record to display when the document is opened in User View. The initial action can be to:

Display a new record Display the first record Display the last record Display a Table View of records

Set record filters (Query By Form) for the document. Prevent data entry creates a read-only document. Clear form after entering a record automatically displays a blank record after a record is saved. Suppress automatic TAB when a field fills lets you specify whether the cursor automatically skips to the next field when the current field is filled in. Preserve old CURRENT DATE, etc. on modify lets you specify whether you want the current functions to be updated each time a record is modified. If checked, the current functions are not updated when a record is modified. If unchecked, the current functions are updated each time a record is modified. User Help lets you define a custom Help message for the document. In User View, you can display the Help message by choosing Help>>User Help.

How to Change Which Form Defines a Table


1. 2. 3. 4. 5. 6. 7. 8. Open the form that defines the table. To find the form that defines a table, maximize the Application Catalog. Choose Document>>Properties. DataEase opens the Document Properties dialog. Click on the Defines Table checkbox to deselect it. Click OK to close the dialog. Open the form that you want to define the table. Click on the Defines Table checkbox to select it. Click OK to close the dialog.

How to Change the Document Window's Opening Size


1. 2. 3. Choose Document>>Properties. DataEase displays the Document Properties dialog. Choose Current, Open Maximized, or fill in the Width and Height boxes to indicate the desired size of the document window. Click OK. DataEase saves the opening settings.

How to Change a Document's Initial Action When Opened in User View

42

Help File

1. 2.

Choose Document>>Properties. DataEase opens the Document Properties dialog. Choose one of the following: New Record to display a blank record. First Record to display the first record in the document. Last Record to display the last record in the document. Table View to display the records in Table View. Query by Form to enter criteria to select a subset of the records in the document. Click OK.


3.

How to Change a Document's Style Sheet


1. 2. 3. Choose Document>>Properties. DataEase opens the Document Properties dialog and displays the document's current Style Sheet. Choose a new Style Sheet from the drop-down list box. Click OK to close the dialog. Objects with the same style name in the new Style Sheet switch to the new attributes. Objects with a style name not in the new Style Sheet become unstyled objects that retain their original styles' attributes.

Document>>Security
Opens the Document Security dialog, which lets you set the minimum security level required to perform various record entry operations in User View or modify the document in Designer View.

The Document Security Dialog


Each of the following options is used to set the minimum security level required to: View Records Modify Records Create New Delete Records View Layout Modify Layout Open Document Delete Document view previously entered records. change data in previously entered records. enter new records. permanently erase records. open the document in Designer View. change the document's design. open the document in User View. remove the document from the application.

To change any of the security level settings for a document, select a new security level from its drop-down list box. Use Data Encryption lets you encrypt records entered into the document so they can only be read by this application (i.e., the DOS file is encrypted). If you encrypt the records, you cannot transfer the data to another application. NOTE: Since records are encrypted as they are entered, this box must be checked before any records are entered. How Document- and Field-Level Security Work with User-Level Security The application designer can assign document and field security levels that may prevent a user from viewing or modifying the records or layout for a document depending on that user's specific security level. The security level set for a specific document or field takes precedence over the general security defined on the User Information form. For example, if the application designer sets Modify Records to High for the MEMBERS form, a user with a Medium Security Level cannot enter or modify MEMBERS records, even though users with Medium Security Levels are generally allowed to enter and modify records. NOTE: You cannot set the minimum security level of a security option for a document that uses a table to a lower level than the minimum security level specified for that same option by the document that defines the database table. Invalid security level settings do not appear as choices in the Document Security Dialog. How Document-Level Security Works with SQL Engine Security To perform a Record Entry operation on the data in an SQL table, you must have the required VIEW, INSERT, MODIFY, and/or DELETE permission on the SQL engine in addition to the minimum security level DataEase requires. NOTE: If your DataEase security level is insufficient, or you lack the required SQL permission to perform your assigned job responsibilities, ask the Database Administrator for assistance.

How to Change a Document Security Setting


1. Choose Document>>Security. DataEase displays the Document Security dialog.

43

Printed Documentation

2. 3.

To change any security level setting for a document, click on the new setting from its drop-down list box. Click OK to close the dialog.

View>>Zoom
Lets you magnify or reduce your view of the document in the active window. The Zoom option lets you control the appearance of the document on the screen. To get a closer look at one particular area in a document, you can zoom in, or enlarge, your view of the document on the screen. To get an overview of a document, you can zoom out, or reduce your view of the document on the screen. Use Zoom options to: View and/or edit small text. Print an enlarged or reduced area of a document. View a multiscreen document on one screen. Zoom opens the cascade menu. View>>Normal(100%) View>>In by 150% View>>Out by 67% View>>Fill Window View>>Custom...

How to Enlarge Your View of a Document


To have DataEase automatically fill the document window when you change the size of the window, check the Zoom to Fit Window option on the Document Properties dialog. When this option is active, DataEase automatically resizes the document to fill the document window each time you resize the window in User View. 1. 2. Choose View>>Zoom>>Zoom In by 150 percent. DataEase displays the document at 1 1/2 times its original size. Choose View>>Zoom>>Normal to return the document to its original size.

How to Reduce Your View of a Document


1. 2. Choose View>>Zoom>>Zoom Out by 67 percent. DataEase displays the document at 2/3 of its original size. Choose View>>Zoom>>Normal to return the document to its original size.

Document>>Print Options
Opens the Document Print Options dialog, which lets you set a document's default print destination, page size, and margins.

The Document Print Options Dialog


Print To lets you choose the default destination. Printer sends the document to the printer chosen using File>>Print Setup. Window sends the document to an on-screen window. DataEase displays the document in the window in the same way it would appear if printed to paper but without headers and footers. File stores the document with the filename you specify in the box just below this option with all printer control codes and formatting commands. Print Detail determines the document's default print quality. Draft prints the document's text (only) using the default printer or screen font. Text prints text only, but in the font that the application designer specifies. WYSIWYG (What You See Is What You Get) prints all text, graphics, and special attributes, such as shading, that appear on the document. Print Without Displaying Dialog prevents a user from altering the Print To or Print Detail settings when this option is checked. When unchecked, the Print Dialog displays immediately before the document is printed. Page Size and Orientation lets you choose from a list of common paper sizes, manually enter the paper size, and choose the page orientation. Paper Size lets you choose from a list of supported paper sizes for the device. When you create a custom size, DataEase displays User Defined Size. Portrait and Landscape set the page orientation as vertical and horizontal, respectively. Width and Length let you set the page size manually in inches. If you choose a paper size in Page Type, DataEase fills these boxes automatically. Margins

44

Help File

lets you set the top, bottom, left, and right margins individually by entering each margin's space in inches or centimeters in that margin's box. Indicate Field Overflow replaces Text and/or Number field values that are longer than the field's length with pound signs (#) when the document is printed. If this option is not active and the field overflows, DataEase clips the last character(s) to tell you the printed data is incomplete. The effect of masking a field when it overflows is shown in the table below. Indicate Field Overflow Settings Actual Field Value 89889 WORK Indicate Overflow On ##### ##### Indicate Overflow Off 8988 WOR

NOTE: Indicate Text Overflow does not work on a multi-line Text or Memo field; they expand to show all data. Also, if you define a field as Size to Fit, DataEase expands the field on the report to show all data (even if it overlaps the field to its right).

How to Set a Default Print Destination


1. 2. 3. 4. 5. Choose Document>>Print Options. DataEase displays the Document Print Options dialog. To set the default document print destination, choose: Printer to send it to the default printer. Window to send it to a window.File to save it with the filename you specify in the text box located below the option. To set the default Print Detail, choose: Draft to print the document as ANSI characters in the default printer or screen font. Text to print only the text in the document in the font the application designer has specified. WYSIWYG to print text and graphics as they appear in the document. If you do not want a user to be able to modify the print options, click the Do not display Print Dialog checkbox. Click OK. DataEase saves your print settings.

6. 7.

How to Set a Document's Paper Size and Margins


1. 2. 3. 4. 5. Choose Document>>Print Options. DataEase displays the Document Print Options dialog. To set the document page size, choose from the Paper Size drop-down list box or manually enter the paper size in the Width and Length boxes (in inches). Choose a page orientation: Portrait or Landscape. Set each margin by clicking in the appropriate box and entering the width of the margin in inches or centimeters. Click OK. DataEase saves your paper size and margin settings.

Opening a Document
File>>Open Displays the Open a Document dialog described below. This dialog lets you open a document in the current application.

The Open a Document Dialog


Documents Displays all the documents in the current application. By default, all documents open in User View. Open in Designer View Tells DataEase to display the document in Designer View immediately. Opening Multiple Documents DataEase lets you open up to 11 documents. The count includes the Application Catalog and document icons. When you try to open a twelfth document, DataEase displays a message informing you that you have reached the Form Window limit. Click OK and close any documents you aren't using. For convenient access, you can reduce a document to an icon instead of closing it. NOTE:DataEase lets you open multiple copies of the same document. However, you cannot change a document's table definition when that document is open in User View in another window. You can set the initial size and location of a document window and the Initial Action of a form (e.g., New Record, or First Record) in the Document Properties dialog. Opening a Document that accesses an SQL Table

45

Printed Documentation

To open a document that accesses an SQL table, the SQL engine also must recognize your identity. If the SQL engine does not recognize your identity, DataEase displays the dialog described below.

The Login Failure Dialog


Name Lets you enter a User Name that is recognized by DataEase and that is a valid Login Name on the SQL engine. Password Lets you enter a Password that is recognized by the database server (if one is required). If DataEase displays this dialog, ask your system administrator for a valid User Name and Password combination.

How to Open a Document


1. 2. or... To open the document in Designer View, click on the document name, check the Open in Designer View checkbox, and click OK. Choose File>>Open. DataEase opens the Open a Document dialog. To open the document in User View, double-click on the document name.

Application>>Utilities>>Reorganize Form
Lets you reorganize a form that has already been saved. Reorganization recovers disk space from records that are marked as deleted, rebuilds indices for all indexed fields, and reorganizes data that is inconsistent. Backup Application lets you copy your entire application to floppy disks or a storage device other than the one that contains your application. Restore Application lets you restore an application using a backup copy made with the Backup Application option. Install Application lets you transfer one or more documents from one DataEase application into another or transfer an application created in the character-based version of DataEase into DataEase without affecting the source application. Lock Application lets you prevent other users from opening the current application while you perform application administration functions or batch report processing. Reorganize Form lets you reorganize a form that has already been saved. Reorganization recovers disk space from records that are marked as deleted, rebuilds indices for all indexed fields, and reorganizes data that is inconsistent. This option opens the dialog shown below, which lets you choose the form you want to reorganize. NOTE: During reorganization, DataEase creates a temporary table to hold the reorganized data. Therefore, there must be sufficient free space on the data disk to accommodate both the old and reorganized files.

How to Reorganize a Form


1. 2. 3. 4. Choose Application>>Utilities>>Reorganize Form. DataEase opens the Reorganize Form dialog. Highlight the name of the form and click OK. You must choose the form that defines the table. DataEase automatically excludes other forms from the list. DataEase recovers disk space from records that are marked as deleted, rebuilds indexes for all Indexed fields, and reorganizes inconsistent data.

Application>>Utilities>>Restore Application
Opens the Restore dialog, which lets you restore an application using a backup copy made with Application>>Utilities>>Backup Application. NOTE: To restore backup copies of files made using the Operating System Backup command, use the Operating System Restore command. DataEase Restore Application is slower than Operating System Restore because DataEase must recreate all index files.

The Restore Dialog


Restore Source Directory lets you select the directory where your backup copy is located. Log Messages to File lets you store system messages in an ASCII text file while restoring an application. The default directory is where the new application is located and the default filename is in the format RESTDAAA.LOG, where D is the first letter of the application, and AAA is a letter combination used to prevent duplicate file names. For example, if you backup the Club ParaDEASE application, and the log file RESTCAAA.LOG exists in the application directory, DataEase names the default log file RESTCAAB.LOG instead.

46

Help File

Error Handling lets you control how the system handles errors while restoring an application. Choose:

Ignore Error & Continue to continue restoring the application when an error occurs. Select this option if you will not be present during the restore and you expect only minor errors. Cancel to stop restoring the application when an error occurs. Select this option if you will not be present during the restore and you require an error-free restore. Decide When Error Occurs to decide whether to continue or cancel the restore as DataEase encounters each error.

NOTE: When you choose Application>>Utilities>>Restore Application, DataEase locks the application from other users until the restore is complete. If you choose Decide When Error Occurs, be sure to stand by. If an error occurs, DataEase displays a dialog and waits until you respond.

How to Restore an Application


1. 2. 3. 4. 5. 6. Create a DataEase application by choosing File>>New Application. DataEase opens the New Application dialog. Select an empty directory and enter a filename. Click OK. Choose Application>>Utilities>>Restore Application. DataEase opens the Restore dialog. Enter the directory with the backed up application in the Restore Source Directory box. If you want to store the system messages in a file, check Log Messages to File. DataEase displays a default directory and default log file in the Message Log File box. Choose an Error Handling option: Ignore Error & Continue, Cancel, or Decide When Error Occurs. Click OK to close the dialog. If you are restoring an application from floppy diskettes, DataEase displays a dialog asking you to insert the first restore diskette. If you insert a diskette in the wrong order, DataEase displays a dialog asking you to insert the correct diskette. Insert the diskette in the floppy drive and click OK. DataEase restores the application you backed up and overwrites the new application. DataEase displays a dialog during the restore and another dialog when the restore is complete. If you entered a log file in step 4, the dialog asks if you want to view it. Click OK to close the current application, or click Yes to view system messages. If you view the messages, double-click on the control box to close the window and the current application.

7.

8.

NOTE: After you restore an application, DataEase closes it and displays the Desktop Menu. To open the restored application, choose File>>Open Application.

Document>>Default Tab Order


Restores the default tab order to the document. By default, the cursor starts at the upper left corner of the document and moves from left to right and top to bottom toward the lower right corner. This option resets the tab order immediately when it is selected, even when you are not viewing the current tab order using Document>>Set Tab Order. NOTE: When you choose Document>>Default Tab Order, you cannot undo the action. If you choose this option by mistake, close the document immediately, and answer No to the Save Changes alert message.

How to View the Current Tab Order


1. Choose Document>>Set Tab Order. DataEase displays the document with an opaque oval over each field, button, and graphic image that has an assigned action. DataEase displays the tab order number of each Document object inside the oval. Hold down Tab. DataEase displays all the tab order, including the ovals that do not have a number specified. If you prefer, you can tab through each field. Choose Document>>Set Tab Order. DataEase returns the document to normal Designer View.

2. 3.

How to Create a Custom Tab Order


1. Choose Document>>Set Tab Order. DataEase displays the document with an opaque oval over each field, button, and graphic image that has an action. DataEase displays the specified tab order number of each Document object inside the oval. Click on the ovals in the order you want the cursor to move in User View. If you prefer, you can type the tab order number directly in each oval. Choose Document>>Set Tab Order. DataEase returns the document to normal Designer View.

2. 3.

How to Restore the Default Tab Order


1. 2. Choose Document>>Default Tab Order. DataEase restores the default tab order to the document.

File>>Save As

47

Printed Documentation

Displays the Document Save As dialog described below. This dialog is used to duplicate the active document and name the new document DataEase creates. NOTE: DataEase also displays this dialog automatically if you choose File>>Save to save a new document. Type a name for the document and click OK.

The Document Save As Dialog


Document Name lets you enter a name of up to 20 characters for the document. The name can include letters, digits, and spaces. For clarity, we recommend that you begin the name with a letter. Define New Table tells DataEase to create a duplicate form and table. If you do not choose Define New Table, the new form uses the table associated with the original form. This option only appears when you choose File>>Save As to duplicate a DataEase form that defines a table. When you choose Define New Table, DataEase displays the Document Save As New Table dialog described below. This dialog lets you create, name, and store a copy of the database table to associate with your form.

The Document Save As New Table Dialog


Table Name displays the name of the database table associated with the current document. Enter the table name. Database displays the name of the database that stores the table. If you define a new table and your application is linked to an SQL database, you can choose a different database in which to store the table. Otherwise, DataEase stores it in the native database. Copy Data tells DataEase whether to copy the data file associated with the selected document. The default is Copy Data. If you copy the data, it appears in the new form when you open it in User View. Otherwise, DataEase creates a new (empty) data file for the table. Copy Relationships tells DataEase whether to copy all relevant records in the Relationships form. The default is Copy Relationships. When DataEase copies relationships, it replaces the name of the original table with the name of the new table in each Relationships record. If you deselect Copy Relationships, you must manually define any required relationships. NOTE: DataEase automatically reorganizes the data in the new table. You can use either upper and lower case letters in Document Names (e.g., Clubs, or CLUBS) because DataEase is not case sensitive. TIP: You can use File>>Save As to create a new view of a database table, with fewer fields, or create a DataEase document over a DataEase character-based table. Be sure Define New Table is not checked. You can use File>>Save As to move a table between databases, even between those of different engine types.

How to Save a Document


1. 2. To save a document choose File>>Save. To save a duplicate of a document with a new name choose File>>Save As.

NOTE: DataEase displays the names of all existing documents in the Document Save As dialog. If you try to use a name that already exists, DataEase displays an error message. Click OK and enter a unique name.

How to Save a Document as a New Table


1. 2. 3. Open the form that defines the table and make any changes to the table definition. Choose File>>Save As to name the new document. Choose Define New Table and use the Document Save As New Table dialog to save your changes as a new document and database table.

NOTE: To make more extensive changes, open the form that defines the table, choose File>>Save As. Check Define New Table to create a second copy of the document and table. Then, open the new document and make your changes, saving often.

Dataease Dos Filenames


When you save a new document and table, DataEase creates many DOS files distinguished by different filename extensions: File Type Filename Extension Table Definition TDF Table DBM Document FRM

48

Help File

Style Sheet File STY Index Inn NOTE: DataEase creates a separate Index file for each column you index. The nn in the DOS filename for an Index file is a twodigit hexadecimal number that represents the relative position of the indexed field.

How DataEase Assigns DOS Filenames


DataEase uses the following four rules to create the filename for each DOS file it creates. 1. 2. 3. 4. 5. 6. The first four characters in the document name are the first four characters in the filenames Table Definition, Table Data, and Document file. For example, DataEase uses CLUB as the first four characters when creating the DOS filename for the CLUBS database table (i.e., CLUBCAAA.TDF). The first four characters in the Style Sheet name are the first four characters in the Style Sheet filename. For example, DataEase uses CLUB as the first four characters when creating the DOS filename for the Club ParaDEASE Style Sheet (i.e., CLUBCAAA.STY). The first letter in the application name is always the fifth letter in the DOS filenames it creates. For example, DataEase uses the letter C as the fifth letter in each DOS filename it creates for the Club ParaDEASE application. Thus, DataEase uses CLUBC as the first five characters when creating the DOS filename for the CLUBS Multiform. DataEase derives a unique filename for each DOS file by automatically incrementing the letters assigned to each type of file when assigning the last three letters in its filename.

7.

For example, when you create the CLUBS table, DataEase names the Table Definition file CLUBCAAA.TDF. If you subsequently create the CLUB ACTIVITIES table, DataEase names the second Table Definition file CLUBCAAB.TDF (incrementing the last three letters from AAA, to AAB, to AAC, etc.).

Forms
Customizing Table View
Displays multiple records at once in a table. Each row is one record and each column is a field on the form.

How to Change the Record Display Option


1. 2. Choose View>>Form to display records one at a time. Choose View>>Table to display multiple records in a tabular format.

Customizing Table View To Ease Record Entry


DataEase lets you customize Table View by changing the size of columns and rows in a table or by moving an entire column to a new location. You can customize the appearance of Table View in several ways. To fit more information in the document window, you can decrease the width of columns or the height of rows. To minimize the need for scrolling data and reduce the need for creating custom reports, you can move the columns that are most important into view. For example, if you need to contact members by phone, you can move the TELEPHONE column in the MEMBERS form to the left side of the table. This eliminates the need to scroll the table to view the TELEPHONE column. NOTE:The changes you make to the columns and rows in Table View are temporary. These changes do not affect the position or size of the fields in Form View, and DataEase discards these changes when you close the document. The next time you open the form in Table View, DataEase displays the columns and rows in their original size and position.

How to Change the Width of a Column in Table View


1. 2. 3. To increase or decrease a column's width, click the right column border in the column header. When DataEase displays the double-sided arrow, drag the border to the right to increase the width or to the left to decrease the width. Release the mouse button. The other columns shift to the right or left, but retain their original width.

NOTE: When you increase or decrease a column's width, the text in all columns retains its size and position. However, if you decrease a column's width, some text in that column may be hidden by the right column border.

How to Change the Height of All Rows in Table View


1. 2. 3. To increase or decrease the height of all rows, click the top or bottom row border of any row in the Row# column. DataEase displays the double-sided arrow. To increase the height of all rows, drag the bottom row border down or the top row border up the desired distance. To decrease the height of all rows, drag the top border down or drag the bottom row border up the desired distance.

49

Printed Documentation

4.

Release the mouse button. The text in the rows retains its size and position. If you decrease the height, some text may be hidden from view by the bottom row border.

How to Move a Column in Table View


1. 2. 3. To select the column, click (and hold) in the center of the column header. DataEase displays the column in reverse. Drag the selected column to its new position. Release the mouse button. DataEase shifts the other columns to the right or left to accommodate the repositioned column.

File>>New>>Form
Defines a Record Entry form. A form lets you view and enter data in database tables.

How to Create a Form and Table


1. 2. 3. 4. 5. 6. 7. 8. Choose File>>New>>Form. Choose the Style Sheet you want to use. Double-click on <New Table> in the Select a Database Table list box. DataEase displays the New Table dialog. Enter a name for the form and table of up to 20 characters and click OK. Create all the fields to be included and save the document. Optionally, click on the Record background and select the Layout Options button to alter the Field Layout, include multiple records, or include any of the available Appearance options. Continue designing the layout of the form creating any additional objects you want to include. Choose File>>Save to save the form and table.

Creating A Form That Defines A Table


When you choose <New Table> to create a form that defines a table, DataEase creates a corresponding column in the database table for each field you add to the document.

How to Create a Form over an Existing Table


1. 2. 3. 4. 5. 6. 7. 8. 9. Choose File>>New>>Form. Choose the Style Sheet you want to use. Choose a table name from the Select a Database Table list box and click OK. DataEase displays the Layout Options dialog. Alternately, you can fill in the New Document dialog and click Query to use the Query By Model dialog to choose the tables and columns you want to include in the form. Choose the Field Layout and use the Record Layout Preview Plus and Minus Sign buttons to indicate the number of records to display. Check any Appearance option, such as a title, that you want to include in your layout. Click OK. DataEase automatically arranges all the table columns on your new layout according to the specified Field Layout. Continue designing the layout of the form, creating any additional objects you want to include. Choose File>>Save As. Name the new form and click OK.

Creating A Form That Uses A Table


When you choose an existing table to create a form that uses a table, DataEase duplicates all the columns in the selected table. When you create a form that uses a table, you can delete fields from the layout that you do not need in the new document, but you cannot modify a column definition, delete a column, or add a new column in the underlying table. You can create multiple forms over a single database table, then customize each form for a specific group of users. When a user enters or changes records, DataEase updates corresponding rows in the underlying table.

How to Create a Custom Layout


1. 2. 3. 4. Choose File>>New>>Form. Choose a Style Sheet and the primary table and click OK. DataEase displays the Layout Options dialog. Choose the Custom field layout and the Record Layout. Click any of the Appearance options, such as a title, you want to include in your layout. Click OK. DataEase displays a blank layout.

50

Help File

5. 6. 7. 8. 9.

Select Field from the Toolbar. Position the Field cursor on the layout and click the mouse button. When you finish, DataEase displays the Field Definition dialog. DataEase automatically drops down the Field Name list. Choose the field you want. DataEase displays its characteristics in the dialog. Repeat steps 5 and 6 for each field you want to include. Continue designing the layout of the form creating any additional objects you require. Choose File>>Save As. Name the new form and click OK.

How to Create a DataEase Form over a DataEase Character-based Form


1. 2. 3. 4. 5. 6. 7. 8. 9. Open the original DataEase character-based application using DataEase. Choose File>>New>>Form. DataEase opens the New Document dialog. Choose the Style Sheet you want to use. Choose a table name from the Select a Database Table list box and click OK. DataEase displays the Layout Options dialog. To keep the existing layout choose Original Form or choose Field/Line, Table, Table Across, Mailing Labels, Custom, or Movie Credits to create a new layout. Use the Record Layout Preview Plus and Minus Sign buttons to indicate the number of records to display. Check any Appearance option, such as a title, that you want to include in your layout. Click OK. DataEase automatically arranges all the table columns according to the specified Field Layout. Continue designing the layout of the form creating any additional objects you want to include.

10. Choose File>>Save As. Name the new form and click OK. Creating a Document Creating a Document Layout

Open a Related Form


.When you display a related form, DataEase places the name of the original form next to this option on the menu (e.g., Return to MEMBERS). If you use Goto>>Related Form... to navigate from MEMBERS to FAMILY MEMBERS, you can quickly return to the MEMBERS form using the Goto>>Return to option.

How to Open a Related Form


1. 2. 3. Choose Goto>>Related Form... DataEase opens the Related Form dialog. Choose a related form from the list in the center of the dialog. Click OK. DataEase opens the selected form and displays the first record related to the record you were viewing in step 1.

How to Return to the Previous Form


1. 2. Choose Goto>>Return to. DataEase automatically returns to the previously active form (the form you were viewing immediately before the current one).

Printing a Document Layout

How to Print a Document Layout


1. 2. 3. 4. Choose File>>Open and click the Designer View checkbox. Highlight the document you want to print and click OK. Choose File>>Print. DataEase opens the Print dialog. To print selected pages, enter the number of the first page in the From text box and the number of the last page in the To text box. Click OK. DataEase prints the Document Properties first, the Document Layout next, and information on each object on the remaining pages.

Setting Links

Edit>>Links
Opens the Links dialog, which lets you view and change the method of updating a link (automatic or manual), update a linked object, cancel a link, or repair an active link.

The Links Dialog

51

Printed Documentation

Links Lists DDE and OLE connections to the active document. Each row indicates one link's source application (e.g., Paintbrush Image), filename (e.g., VOLLYBLL.PCX), and link update method (Manual or Automatic). NOTE: You can change, update, or cancel multiple links at the same time by selecting multiple items in the Links list box. Update Tells DataEase which method to use when updating links. When you choose an option, the update method changes for each link that is highlighted. Choose:

Automatic to update the link information displayed in DataEase whenever a change is made to the source file. Manual to update the information only when you click the Update Now button.

Update Now Updates information for highlighted links with current data from the source application. This option is used with the Manual Link Update method. Cancel Link Permanently breaks the connection currently highlighted in the Links list box. The link itself is removed from the Links list box and the linked object is changed to a static picture that has no update capability. Edit Link Opens the Windows application that was used to create the object (e.g., Microsoft Excel), so you can edit the original document. Clicking the Edit Link button is the same as double-clicking an OLE object. Change Link Opens the Change Link dialog, which lets you repair a broken link when DataEase cannot find the source file (e.g., if you move the source file or you change its name). NOTE: To change multiple links at the same time, all selected links must point to the same source file in the Windows application DataEase is linked to (e.g., an Excel chart). Otherwise, the Change Link button is grayed.

The Change Links Dialog


File Name Lets you assign a new filename for the link. List Files of Type Lets you choose the program that created the linked file. Directories Tells DataEase which directory stores the linked object. To select a directory, double-click on the name of the directory. Drives Tells DataEase which disk drive stores your application. To select a drive, click on the drop-down arrow and then on the drive letter.

How to Change the Update Method for a Link


1. 2. 3. 4. 5. 6. Choose Edit>>Links. DataEase opens the Links dialog. Click on the link in the Links list box that you want to change. DataEase highlights the selected link in reverse. Click on one of the following radio buttons: Automatic to update the link information displayed in DataEase whenever a change is made to the source file. Manual to update the information only when you click the Update Now button. Click OK to close the dialog.

How to Update a Manual Link


1. 2. 3. 4. Choose Edit>>Links. DataEase opens the Links dialog. Click on the link in the Links list box that you want to update. DataEase highlights the selected link in reverse. Click on the Update Now button. DataEase updates information for the highlighted link with the current data from the source application. Click OK to close the dialog.

How to Break a Link


1. 2. 3. Choose Edit>>Links. DataEase opens the Links dialog. Click on the link in the Links list box that you want to delete. DataEase highlights the selected link in reverse. Click on the Cancel Link button. DataEase removes the selected link from the Links list box, permanently breaks the connection from the original file, and changes the linked object in the DataEase document to a static image (i.e., it cannot be modified). Click OK to close the dialog.

4.

52

Help File

How to Repair a Broken Link


1. 2. 3. 4. 5. Choose Edit>>Links. DataEase opens the Links dialog. Click on the link in the Links list box that you want to restore. DataEase highlights the selected link in reverse. Click on the Change Link button. DataEase opens the Change Link dialog. Choose the drive, directory, type of file, and filename of the file that now contains the linked information. Click OK to close the dialog.

Editing Ole Objects


Object Linking and Embedding (OLE) lets you insert an object (such as a graph or drawing) into a DataEase document and maintain a connection to the Windows application that created it. The term Object Linking and Embedding refers to two related Windows features: object linking and object embedding.

Object Linking
stores a copy of the inserted object in the original file in which it was created and a reference to the file in the DataEase document. Windows establishes a link between the two files so that when the data in the original file changes, the file in DataEase is automatically updated. For example, if you link an Excel chart to a DataEase document, the document automatically reflects changes made to the chart in Excel. When to Choose Object Linking Choose object linking if the data frequently changes and you want the displayed information to be current. For example, to automatically update an Excel graph whenever the data is modified in the corresponding spreadsheet, choose object linking to link the object in a DataEase document.

Object Embedding
stores the inserted object only in the DataEase document. DataEase maintains a connection between this object and the Windows application that created it, but this connection only lets you execute the original application from within DataEase (it does not update the object with any changes made outside of DataEase). When you double-click on the object in the DataEase document, DataEase invokes the other Windows application, which lets you edit the embedded object using the tools the original software provides. The figure below illustrates how you can use object linking to place a graph in a DataEase document that reflects the current data in DataEase. When to Choose Object Embedding Conversely, if you don't want the object to be modified outside of DataEase, choose object embedding.

Tab Order

Document>>Default Tab Order


Restores the default tab order to the document. By default, the cursor starts at the upper left corner of the document and moves from left to right and top to bottom toward the lower right corner. This option resets the tab order immediately when it is selected, even when you are not viewing the current tab order using Document>>Set Tab Order. NOTE: When you choose Document>>Default Tab Order, you cannot undo the action. If you choose this option by mistake, close the document immediately, and answer No to the Save Changes alert message.

How to View the Current Tab Order


1. Choose Document>>Set Tab Order. DataEase displays the document with an opaque oval over each field, button, and graphic image that has an assigned action. DataEase displays the tab order number of each Document object inside the oval. Hold down Tab. DataEase displays all the tab order, including the ovals that do not have a number specified. If you prefer, you can tab through each field. Choose Document>>Set Tab Order. DataEase returns the document to normal Designer View.

2. 3.

How to Create a Custom Tab Order


1. Choose Document>>Set Tab Order. DataEase displays the document with an opaque oval over each field, button, and graphic image that has an action. DataEase displays the specified tab order number of each Document object inside the oval. Click on the ovals in the order you want the cursor to move in User View. If you prefer, you can type the tab order number directly in each oval. Choose Document>>Set Tab Order. DataEase returns the document to normal Designer View.

2. 3.

53

Printed Documentation

How to Restore the Default Tab Order


1. 2. Choose Document>>Default Tab Order. DataEase restores the default tab order to the document.

User Menus
Menus and Custom Menus
A Menu is a document with no connection to a database table. A menu is typically used to display a list of choices which tell DataEase to perform specific tasks - such as opening a form, printing a report, or closing an application. By assigning different menus to different groups of users, the developer creates a structure which guides users to their particular tasks, whilst denying them access to areas that do not concern them. A Custom Menu is a modified version of the User Mode Menu Bar, shown below.

Custom Menus are created by the Custom Menu Editor, shown below. The Custom Editor can be accessed from Designer Mode by selecting Document>>Custom Menu.

Custom Menus
Selecting Document>>Custom Editor opens the Menu Editor dialog, which lets you modify the Menu Bar and menu options that appear when you open the document in User View. Use this option to:

Rename, delete, or move an existing menu or option. Add menus and/or options. Define keyboard accelerators for any menu or option.

Copy custom pull-down menus to another document. Using the Application Preferences dialog, you can change User View menus for all documents in your application simultaneously. However, creating application default menus does not prevent you from choosing Document>>Custom Menu to customize User View menus for a particular document.
NOTE:DataEase lets you change User View menus only. You cannot change Designer View menus. When you design custom menus, make sure at least one user can open each document in Designer View.

The Menu Editor Dialog

54

Help File

Sample Menu displays the pull-down menus in outline format. An item that is flush left appears on the Menu Bar. An item that is indented once is a pull-down menu. Any item indented more than once is a cascade menu option. To add, delete, or move menu items, use the editing buttons described below. An ampersand (&) indicates a keyboard equivalent (explained below in Item Properties). Editing Buttons let you control which items appear on the menus. Next highlights the next item. Previous highlights the previous item. Insert adds a space above the highlighted item. Delete removes the highlighted item(s). Left Arrow moves the highlighted item(s) one level up in the menu hierarchy. For example, if you click this button while a pull-down menu option is highlighted, the item becomes an option on the Menu Bar. Right Arrow moves the highlighted item(s) one level down in the menu hierarchy. For example, if you click this button while a Menu Bar item is highlighted, the item becomes an option on a pull-down menu. Up Arrow moves the highlighted item(s) above the previous item. Down Arrow moves the highlighted item(s) below the next item. NOTE: To add a space at the bottom of the list, highlight the last item and click Next. To highlight several items, press the control key and click on each item. To highlight a block of items, click and drag the mouse, or click on the first item in the block, press Shift, and click on the last item in the block. If you delete a menu option that has a keyboard accelerator, such as File>>Designer View, its accelerator, F4, is also deleted (i.e., pressing F4 has no effect). Cut removes highlighted item(s) from the Sample Menu and copies it to the clipboard. Copy copies highlighted item(s) to the clipboard. Paste inserts the clipboard's contents in the Sample Menu. DataEase inserts the item(s) above the highlighted item. Default loads the User View menus shipped with DataEase or the application default menus, if any have been defined. NOTE: To edit a group of items simultaneously, highlight them and then click the appropriate editing button. Item Properties define the highlighted item by assigning it an action, name, help message, and/or keyboard accelerator. Action lets you define a pull-down or cascade menu, option, or separator. Choose:

Menu to define a pull-down or cascade menu. Command to define an option that executes an action. Choose an action from the drop-down list. If the action requires a parameter, enter one in the Parameter box. (See note below.) Separator to create a separator line under the highlighted item. Separators divide pull-down menus into subgroups of options.

NOTE:The actions in the drop-down list correspond to User View menu options and button/image actions. For example, the Open document action corresponds to File>>Open and to the Open document button/image action. Some actions require parameters. For example, the Open document action requires you to specify which document to open. A prompt above the Parameter box tells you what type of parameter to enter. Menu Text lets you enter or modify the item name, and, optionally, assign a keyboard equivalent. A keyboard equivalent lets you access a menu option by pressing the Alt key and a character to open the menu, then pressing the keyboard equivalent character for the menu option. To assign a keyboard equivalent, type an ampersand (&) before a character. NOTE: If you want an ampersand to appear in the menu option name, type &&. For example, if you want the option to read Lookup & Return, enter &Lookup && Return in the Menu Text box. You cannot change menu text for some commands because the text is variable. For example, the Return Data to option on the Document Menu has text that changes according to the document name. DataEase indicates variable menu text by graying it.

55

Printed Documentation

Title Help lets you enter or modify the Title Bar help message for the item. When you highlight the item in User View, DataEase displays this message in the document's Title Bar. The message's maximum length varies with the size of the window, the screen resolution, and the width of the characters used (e.g., W takes more space than i). Accelerator lets you enter a keyboard accelerator for the option. To create a keyboard accelerator, check a combination of Alt, Ctrl, and Shift keys and select an option from the drop-down list. For example, to create the accelerator Ctrl+3, check Ctrl and select 3 from the drop-down list. NOTE: DataEase prevents you from duplicating Windows system accelerators by excluding them from the drop-down list.

How to Add a Pull-down Menu Option


1. 2. 3. 4. 5. 6. 7. 8. 9. Open the document in Designer View. Choose Document>>Custom Menu. DataEase opens the Menu Editor dialog. Highlight the item below the menu name and click Insert. DataEase inserts a space under the menu name. If you want the menu item to open a cascade menu, select Menu. If you want the menu item to execute a command, select Command, choose an action from the drop-down list, and, if necessary, enter a parameter. Enter the item name in the Menu Text box as you want it to appear in the menu. DataEase automatically enters this name in the Sample Menu. Click the right arrow button once to move the item to its correct level in the menu hierarchy. In the Menu Text box, type an ampersand (&) before the keyboard equivalent character. In User View, you can press Alt and this character to choose the menu. In the Title Help box, enter a message that will appear in the Title Bar when the option is highlighted in User View. To add an accelerator key combination, check the Alt, Ctrl, and/or Shift key boxes, and then select an item from the drop-down list.

10. In User View, you can use this keyboard accelerator to execute this command instead of choosing the option from the menu. DataEase automatically displays this accelerator on the menu. 11. If the menu item opens a cascade menu, return to step 2 to add menu options. If the menu item directly executes a command, select an action, and, if necessary, enter a parameter. 12. Repeat steps 2-9 until all menu options have been inserted. Click OK to close the dialog and return to the document. DataEase displays the menu(s) in User View.

How to Copy a Document's Pull-down Menus to Another Document


1. 2. 3. 4. 5. 6. Open the document with the custom pull-down menus in Designer View. Choose Document>>Custom Menu. DataEase opens the Menu Editor dialog. Highlight all the menu names and options that you wish to copy in the Sample Menu and click Copy. DataEase copies the menus to the Windows clipboard. Click OK to close the dialog. Open the document in which you want to paste the custom pull-down menus in Designer View. Choose Document>> Custom Menu. DataEase opens the Menu Editor dialog. Place the cursor below the menu name or option where you want to paste the pull-down menus and click Paste. DataEase inserts the pull-down menus in the Sample Menu. Click OK to close the dialog and return to the document. DataEase displays the revised menu(s) in User View.

How to Create a Custom Pull-down Menu for an Application's Opening Screen


1. 2. 3. 4. 5. With the application open, choose File>>New>>Menu. DataEase opens the Menu Editor dialog. Choose a Style Sheet and click OK to close the dialog. DataEase displays a blank menu document. With the document in Designer View, choose Document>>Custom Menu. DataEase displays the Menu Editor dialog. Make your changes to the pull-down menus and click OK to close the dialog. Choose Application>>Users. to assign this menu to one or more users as the start-up document.

Create a Menu

File>>New>>Menu
Defines a custom menu document for your application. A menu lists choices that tell DataEase to perform a specific task, such as open a form, print a report, or exit the menu. (Don't confuse Menu with Custom Menu).

How to Create a Menu


1. 2. 3. Choose File>>New>>Menu. DataEase displays the New Document dialog with the list of tables deactivated. Choose a Style Sheet and click OK to close the dialog. DataEase displays a blank menu. Design the layout of the menu by adding objects.

56

Help File

4.

Choose File>>Save As. Name the new menu and click OK.

How to Create a Pull-down Menu


1. 2. 3. 4. Open the document in Designer View. Choose Document>>Custom Menu. DataEase opens the Menu Editor dialog. In the Sample Menu, highlight the item occupying the space where you want to insert your new menu. Click Insert. DataEase adds a space above the item that was highlighted. Click the Menu radio button. In the Menu Text box, enter the menu name as you want it to appear on the Menu Bar. DataEase automatically enters this name in the Sample Menu. Use the left arrow and right arrow buttons to move the menu name to its correct level in the menu hierarchy. In the Menu Text box, type an ampersand (&) before the keyboard equivalent character. In User View, you can press Alt and this character to choose the menu. In the Title Help box, enter a message that will appear in the Title Bar when the menu name is highlighted in User View. Add the menu options.

5. 6. 7. 8.

How to Delete a Pull-down Menu or Option


1. 2. 3. Open the document in Designer View. Choose Document>>Custom Menu. DataEase opens the Menu Editor dialog. Highlight the item(s) in the Sample Menu and click Delete. Click OK to close the dialog and return to the document. DataEase deletes the item(s) in User View.

NOTE: If you delete all items in the Sample Menu, DataEase displays the document without a Menu Bar. Without a Menu Bar, you cannot use Window menu options to tile or cascade open document windows, and you must press Ctrl+F6 to switch between DataEase documents. If you maximize a document that does not have a Menu Bar, you cannot resize the window. Also, Windows does not display the document's Control Menu or its Minimize, Maximize, and Restore buttons. To perform these actions, press Alt+Hyphen to open the document's Control Menu.

How to Rearrange a Pull-down Menu


1. 2. 3. 4. Open the document in Designer View. Choose Document>>Custom Menu. DataEase opens the Menu Editor dialog. In the Sample Menu, highlight the item(s) that you want to move. Use the up arrow and down arrow buttons to move the highlighted item(s) up and down. or... Click Cut. DataEase moves the item(s) to the Windows clipboard. In the Sample Menu, place the cursor just below the menu name or option where you want to paste the menu(s). Click Paste. DataEase inserts the pulldown menus in the Sample Menu. To move other item(s), repeat step 2. Click OK to close the dialog and return to the document. DataEase displays the revised menu(s) in User View.

5. 6.

How to Restore the Default User View Pull-down Menus


1. 2. Open the document in Designer View. Choose Document>>Custom Menu. DataEase opens the Menu Editor dialog. Click Default. DataEase displays the default menus in the Sample Menu. If application default menus have been defined, DataEase displays them. Otherwise, DataEase displays the original User View menus shipped with the product. Click OK to close the dialog and return to the document. DataEase displays the default menus in User View.

3.

Record Entry
Abandon a Field Value
Before the cursor leaves the field, choose Edit>>Undo Typing. DataEase restores the record to the previously saved version. NOTE: You cannot undo a value that has been saved to the database. You can also abandon a field modification by pressing Esc.

Abandon a New Record


1. 2. At any time before you save the record, choose Edit>>Clear Form. DataEase displays a dialog that asks if you want to discard the entered data. Click on OK. DataEase permanently erases all the data in the record. Any data stored in the clipboard before you choose Edit>>Clear Form remains intact.

Abandon Changes to a Record

57

Printed Documentation

1. 2. 3. 4. 5. 6.

At any time before you save the record, choose Edit>>Restore Record. DataEase restores the record to the previously saved version. How To Recover a Deleted Record in Form View. With the record you just deleted still displayed, choose Edit>>Restore Record. DataEase restores the record to its original position in the form as an active record. You cannot restore a record deleted from a form that defines or uses an SQL table.

Copy a Field Value to another Record


1. 2. 3. 4. 5. Select the text to be copied. DataEase highlights the selected text in reverse. Choose Edit>>Copy. DataEase places the highlighted text in the clipboard. Position the cursor where you want to insert the value in the field. Choose Edit>>Paste. DataEase inserts the value from the clipboard in the specified field. DataEase stores the value in memory until you Cut or Copy another value to the clipboard. To speed up data entry when filling in a new record, you can use the CLUB ID value again.

Copy all Data from one Record to another


1. 2. 3. Choose Edit>>Copy Record. DataEase copies the data in each field in the current record to the clipboard. Choose Edit>>Clear Form. DataEase displays a blank record. Choose Edit>>Paste. DataEase copies the data in each field to the identically named field in the new record. DataEase stores these values in the clipboard until you Cut or Copy another value.

Copy/Move objects between Documents


1. 2. or... 3. 4. To copy the object to the clipboard, choose Edit>>Copy. To paste the object, choose Edit>>Paste and click on the document to tell DataEase where to paste the object. Select the object(s) by clicking on it. To move the object to the clipboard, choose Edit>>Cut.

NOTE: To select more than one object, press and hold the Shift key and click on the objects you want to select. To clear an object from the layout without cutting it to the clipboard, choose Edit>>Clear.

Copying data from Multiple Fields


1. 2. Highlight the field you want to copy in the Fields Box and click the Add Button. DataEase places the Field Name in the Selected Fields Box. Repeat step 1 until all the fields you want to copy are in the Selected Fields Box. If you are copying most of the fields, click the All Button. Delete any field you do not want to copy by highlighting the field in the Selected Fields Box and clicking the Remove Button. Click OK. DataEase copies the data in all the selected fields to the clipboard.

3.

NOTE: You can use Copy Special to copy only data in queried records. First select and/or sort the records and then choose Edit>>Copy Special. DataEase copies the information from the queried records based on the information you enter in the Copy Special dialog. If you paste multiple records in another DataEase document (copied using Edit>>Copy Special), the data you paste overwrites the data stored in the corresponding number of consecutive records. If you do this by mistake, close the form without saving changes.

Copying Data from Multiple Records

How to Copy the Data in Multiple Records


1. 2. 3. 4. 5. 6. Choose Edit>>Copy Special. DataEase displays the Copy Special dialog. If the form is a Multiform, select the form that contains the fields you want to copy. The default form is the one in which the cursor is positioned. Select which records in the form you want to copy: the current record, a range of records, or all records. If the cursor is in a Main form, by default, DataEase copies the current record. If the cursor is in a Subform, by default, DataEase copies all Subform records. If you want to copy a range of records, enter the number of the first and last records you want to copy.

Create a New Record using previous Data


1. 2. 3. 4. Choose Edit>>Save to make sure the record is saved. Modify the record. Choose Edit>>Save As New Record. DataEase creates a new record using the currently displayed data. Each Club requires 20 PRICES records that vary according to the departure zone and season.

58

Help File

DataEase lets you use the values entered in one record to save time when entering new records with many of the same values

Deleting Records

How to Delete a Record in Form View


1. 2. 3. Display the record you want to delete as the current record. Choose Edit>>Delete Record. DataEase removes the record from the form and marks it deleted. When you save changes or close the form, DataEase permanently deletes the record. If you delete a record in a form that defines or uses an SQL table, the foreign database engine permanently deletes the record when you choose Edit>>Delete Record (you cannot recover the record using Edit>>Restore Record.).

How to Delete a Record in Table View


1. 2. Click on the record you want to delete. Choose Edit>>Delete Record. DataEase displays the record status as deleted and shows the record in reverse colors. When you choose Edit>>Save or Edit>>Save As New Record, DataEase removes the record from the display.

3. To delete additional records, repeat steps 1 and 2. When you save changes or close the form, DataEase permanently deletes the record. NOTE: You can delete many records simultaneously by marking each one to be deleted and then choosing Edit>>Delete Record.

How to Delete a Record in a Multiform


1. Display the Main form record that contains the data you want to delete as the current record. Choose Edit>>Delete Record. DataEase displays the Delete Record dialog described below, which asks you to specify exactly what you want to delete.

Select the correct option from the dialog. DataEase removes the specified record(s) from the form and marks it deleted. When you save changes or close the form, DataEase permanently deletes the record.

2.

The Delete Record Dialog


Main form (only) Deletes the current Main form record. The related Subform records continue to exist but are orphaned (i.e., they are no longer related to any Main form record). Main form and its Subforms Deletes the current Main form record and all Subform records. Subform only Deletes the current Subform record and leaves any other Subform records and the Main form record intact. DataEase offers this option only when the cursor is in a Subform record. Subform and its Nested Subforms Deletes the current Subform record and all Subform records nested within it.

How Referential Integrity Works When Deleting Multiform Records


Referential integrity is a special relationship option that affects how records in a Multiform are treated during Record Entry. In User View, when you delete a Main form record in a Multiform, the related Subform records may or may not be deleted, depending on which referential integrity option the designer asked DataEase to enforce. The table below summarizes how DataEase enforces each of the three available referential integrity options. Referential Integrity Option Cascade (Update) Null (Blank) Restrict (Don't Update) Effect on Subform Records Deleted Deleted DataEase lets you specify which record(s) to delete.

NOTE: DataEase automatically enforces the specified referential integrity option in Form View. In Table View, DataEase automatically applies the Restrict option.

Display a Blank Record


1. 2. With the record you just entered or modified currently active, choose Edit>>Save As New Record or Edit>>Save. DataEase saves and continues to display the record. Choose Edit>>Clear Form. DataEase displays a blank record. Any data stored in the clipboard before you choose Edit>>Clear Form remains intact.

59

Printed Documentation

NOTE: You only need to use this option if the Document Properties setting Clear form after save is turned off.

Entering New Records

How to Enter New Records


1. 2. 3. If DataEase displays a blank record, start with step 3. If DataEase displays an existing record, choose Edit>>Save. Choose Edit>>Clear Form. DataEase erases all the data. Enter the data in the record.

4. Choose Edit>>Save As New Record. DataEase saves the data you entered and leaves this record displayed. To enter another record, repeat steps 2 through 4.

How to Create a New Record Using Previously Entered Data


1. 2. 3. 4. 5. Choose Edit>>Save to make sure the record is saved. Modify the record. Choose Edit>>Save As New Record. DataEase creates a new record using the currently displayed data. Each Club requires 20 PRICES records that vary according to the departure zone and season. DataEase lets you use the values entered in one record to save time when entering new records with many of the same values.

Erasing Field Values

How to Erase a Field Value


1. 2. With the cursor in the field you want to clear, choose Edit>>Clear Field. DataEase deletes the data in the field. Any value(s) stored in the clipboard before you choose Clear Field remains intact.

How to Clear QBF Criteria from a Field


1. 2. 3. Choose Query>>Select Records or Query>>Sort Records. DataEase displays the current QBF selection criteria or sort order. Position the cursor in the field you want to clear. Choose Edit>>Clear Field. DataEase erases the QBF selection criteria or sort order in the specified field from memory and displays a blank field.

Modifying Records

How to Modify an Existing Record


1. 2. Display the record you want to change as the current record. Change one or more field values by typing the new value(s) over the existing value(s). If you prefer, you can choose Edit>>Clear Field to clear a field and then enter the new value. DataEase displays the record status as modified. Choose Edit>>Save. DataEase saves the record as it is now displayed (overwriting the previous version of the record).

3.

NOTE: Edit>>Save can also be used to save a new record (it functions exactly like Edit>>Save As New Record when used to save a record for the first time).

How to Modify Records in Table View


1. 2. 3. 4. With a form displayed in Table View, modify any value(s) in any displayed record(s). DataEase displays each changed record's status as modified. Choose Edit>>Save, DataEase overwrites the previously saved data with the new values. To modify additional records, repeat steps 1 through 3.

How to Modify Records in a Multiform


1. 2. 3. Display the Main form record that contains the data you want to change as the current record. Modify the Main form record and/or any Subform record(s). Choose Edit>>Save. DataEase overwrites the previously saved data with the new values.

NOTE: When you choose Edit>>Save, DataEase saves the data changes in the Main form record and all Subform records simultaneously.

60

Help File

How Referential Integrity Works When Modifying Records in a Multiform


Referential integrity is a special relationship option that affects how records in a Multiform are treated during Record Entry. In User View, when you modify a Match field value in the Main form of a Multiform, the change may or may not be duplicated in related Subform records, depending on which referential integrity option the designer asked DataEase to enforce. The table below summarizes how DataEase enforces each of the three referential integrity options.

NOTE: DataEase automatically enforces referential integrity in Form View. In Table View, DataEase automatically applies the Restrict option.

Columns and Rows

How to Change the Width of a Column in Table View


1. 2. 3. To increase or decrease a column's width, click the right column border in the column header. When DataEase displays the double-sided arrow, drag the border to the right to increase the width or to the left to decrease the width. Release the mouse button. The other columns shift to the right or left, but retain their original width.

NOTE: When you increase or decrease a column's width, the text in all columns retains its size and position. However, if you decrease a column's width, some text in that column may be hidden by the right column border.

How to Change the Height of All Rows in Table View


1. 2. 3. 4. To increase or decrease the height of all rows, click the top or bottom row border of any row in the Row# column. DataEase displays the double-sided arrow. To increase the height of all rows, drag the bottom row border down or the top row border up the desired distance. To decrease the height of all rows, drag the top border down or drag the bottom row border up the desired distance. Release the mouse button. The text in the rows retains its size and position. If you decrease the height, some text may be hidden from view by the bottom row border.

How to Move a Column in Table View


1. 2. 3. To select the column, click (and hold) in the center of the column header. DataEase displays the column in reverse. Drag the selected column to its new position. Release the mouse button. DataEase shifts the other columns to the right or left to accommodate the repositioned column.

Pasting Values between Documents

How to Paste Field Values from One Document to Another


1. 2. 3. With one or more values saved to the clipboard, go to the new document. If only one value is stored in the clipboard, make sure the field definition of the target field is compatible with the value. For example, DataEase will not accept the value Sam in a field defined as a Number field. If more than one value is stored in the clipboard, make sure that the new document contains the same fields as the original document. For example, you can copy the NAME, ADDRESS, and PHONE values from one form to another only if both forms contain identically named fields. Choose Edit>>Paste. DataEase inserts each value in the field that has the same Field Name (e.g., the CITY value in the original form is inserted in the CITY field on the new form). DataEase retains these values in the clipboard until you Cut or Copy another value. To insert these field values in another record, repeat steps 1 and 2.

4.

5.

Perform a Lookup

How to Perform a Lookup

61

Printed Documentation

1.

Place the cursor in the field you want to look up. To limit the number of related records DataEase retrieves, you can enter a partial value and a wild card character. For example, to limit the records retrieved to last names that begin with S type S* in the LAST NAME field. Choose Goto>>Lookup... and then choose the form you want to retrieve data from in the list displayed in the Related Forms dialog. DataEase opens a window that displays a Table View of the related records. Double-click on the record that contains the value you want or highlight it and click OK. DataEase fills in the lookup value from the related record as well as any values derived from that value.

2. 3.

Recovering Deleted Records

How to Recover a Deleted Record in Table View


Before a record marked as deleted has scrolled off the display or you erase it from disk by choosing Edit>>Save Changes, choose Edit>>Restore Record.
DataEase restores the record to its original position in the form as an active record.

How to Recover a Deleted Subform Record


At anytime before you save the Main form record, place the cursor in the Subform record marked as deleted and choose Edit>>Restore Record.
DataEase restores the Subform record to its original position in the Subform.

Return Data from a Related Form

How to Return Data from a Related Form


1. 2. 3. Choose Goto>>Related Form... Choose the form you want from the Related Form dialog. Find the record you need in Form View or Table View by entering QBF criteria, using wild card characters, or by paging through the records. Choose Goto>>Return Data to. DataEase displays your original form, automatically fills in all Match field values, and calculates all derived values based on the returned data.

Moving between Related Forms

How to Open a Related Form


1. 2. 3. Choose Goto>>Related Form... DataEase opens the Related Form dialog. Choose a related form from the list in the center of the dialog. Click OK. DataEase opens the selected form and displays the first record related to the record you were viewing in step 1.

How to Return to the Previous Form


1. 2. Choose Goto>>Return to. DataEase automatically returns to the previously active form (the form you were viewing immediately before the current one).

QBF Reports (Query by Form)


Query by Form
Query by Form is the simplest of DataEase's three reporting methods. A QBF is created directly from a document. Select Query>>Select Records and the document will be presented as a blank form. Enter your selection criteria into the blank form, then select Goto>>first record.

How to Select Records


1. 2. 3. Choose Query>>Select Records. DataEase displays a blank form. Enter your selection criteria in one or more fields. The criteria indicate which records to retrieve. To view the first matching record, choose Goto>>First Record.

Using Multiple Values in Selection Criteria


DataEase can also find records that contain a value within a range of values specified in the selection criteria. For example, if you enter between 90020 to 90189 in the ZIP CODE field, DataEase finds all the MEMBERS records that have a zip code from 90020 to 90189.

Using Multiple Criteria in One Field

62

Help File

You can insert two or more values as selection criteria in a field using the or DQL operator to link the values. The or operator retrieves records that satisfy any of the selection criteria. For example, if the criteria in the MEMBERS FIRST NAME field are "Andrew" or First Name="John", DataEase finds all the members whose first name is Andrew or John. Although, the syntax would be correct if the and operator was substituted for or, DataEase would retrieve no records because no member has two first names. You can use the and operator to find all the members whose first name is Andrew or John and whose last name is Smith. For example, if the criteria in the MEMBERS FIRSTNAME field are, "Andrew" or First Name="John" and LastName="Smith", DataEase finds all the members whose first name is Andrew or John and whose last name is Smith. When you use two or more values in your selection criteria, you must enclose the value in quotation marks, as shown in the above examples.

Using Wild Card Characters in Selection Criteria


DataEase lets you search for a record using three special characters, called wild cards. If you are not sure of the value in the record(s) you are searching for, you can enter any combination of wild card characters (*, ?, and ~) as part of the selection criteria. The results of various wild card searches are shown in the table on the next page. * Wild Card replaces none, one, or a string of unknown characters. You can use the * wild card twice in a field. ? Wild Card replaces one unknown character in a specific position. ~Wild Card (Soundex Search) finds records based on what a field sounds like, not on how it is spelled. A Soundex Search finds patterns of consonants; it ignores the vowels in the word. For example, if you enter ~Read as selection criteria in the MEMBERS LAST NAME field, DataEase finds members such as Reed, Rhode, Rada, and Ride.

Clear QBF Criteria

How to Clear QBF Criteria


1. 2. Choose Query>>Select Records or Query>>Sort Records. DataEase displays the current QBF selection criteria or sort order. Choose Edit>>Clear Form. DataEase erases all the selection criteria or sort order information and displays a blank form.

How to Clear QBF Criteria from a Field


1. 2. 3. Choose Query>>Select Records or Query>>Sort Records. DataEase displays the current QBF selection criteria or sort order. Position the cursor in the field you want to clear. Choose Edit>>Clear Field. DataEase erases the QBF selection criteria or sort order in the specified field from memory and displays a blank field.

How to Clear QBF Criteria from Memory


1. 2. 3. Choose Query>>Select Records. DataEase displays the current selection criteria. Choose Edit>>Clear Form. DataEase displays a blank form. Choose View>>All Records to display all the records in a document without criteria.

NOTE: When you choose View>>All Records, DataEase maintains any specified QBF criteria in memory.

Using a Data Filter


You can filter records by using the Query>>Selection Filter option. This opens the Record Selection Filter dialog, which displays the QBF selection criteria in DQL. When you open the dialog, you can modify the criteria by entering any valid DQL expression. If you know DQL, you can write and edit a query using Selection Filter without using Query>>Select Records NOTE: When you enter criteria using QBF and then view it in the Record Selection Filter dialog, DataEase adds an extra set of parentheses around each statement. If you enter criteria directly in the dialog, you don't need to insert extra parentheses.

Record Selection Filter Dialog


Record Selection Filter Box displays the selection criteria for the currently active form in DQL for viewing or modification. Expression Builder displays the Selection Expression Builder dialog, which lets you choose list box options to build a query. You can manually enter a DQL command in the dialog or select a command from the Functions, Relationships, Columns, and Operators list boxes.

Selection Expression Builder Dialog Options


Functions lists all the DQL commands, including predefined and Custom Defined Functions and the relational statistical operators. Use the scroll bar to browse through the list of available functions.

63

Printed Documentation

Relationships displays all the relationships for the active form, including the current relationship, which provides access to systemdefined variables such as current time, current date, current user name, current computername, and current user level. This list box also contains an option that lets you create a new relationship. Use the scroll bar to view all the relationships. Columns displays all the field names on the active form. If you select a relationship from the Relationships list, the Columns list displays the names of the fields in the related form. Use the scroll bar to view all the column names. Operators lists comparison operators, punctuation marks, and wild card characters. Use the scroll bar to view all the operators. Numeric Keypad located next to the list box of operators, lets you enter numbers and mathematical symbols into a DQL expression. Build a Table for Selection Filter displays the current DQL expression. You can type selection criteria or modify the expression directly in this box.

How to View or Modify Selection Criteria


1. 2. 3. 4. Choose Query>>Selection Filter. DataEase opens a dialog that displays any previously entered selection criteria. View the criteria and then: If the query is correct, click OK. If you want to change the selection criteria, enter the new criteria directly in the Definition Box using any valid DQL expression. When you click OK, DataEase uses the new criteria to find records.

How to Enter Selection Criteria Using DQL


1. 2. 3. With the form displayed in the active window, choose Query>>Selection Filter. DataEase displays a dialog that contains any previously entered selection criteria. Delete the criteria and then enter the new criteria directly in the Record Selection Filter Box using any valid DQL expression. Click OK to close the Record Selection Filter dialog. To use the Expression Builder, click on the Expression Builder button. DataEase displays the Selection Expression Builder dialog, which also contains any previously entered selection criteria. Delete the criteria and then build the DQL expression using the list boxes. Click OK to close the Selection Expression Builder dialog. DataEase uses the new criteria to select records. Choose Query>>Selection Filter, DataEase displays a dialog that contains any previously entered selection criteria. If the query is correct, click OK. If you want to change the selection criteria, enter the new criteria directly in the box using any valid DQL expression. When you click OK, DataEase uses the new criteria to find records. Select the records to print by choosing Query>>Select Records and/or Query>>Selection Filter. Choose File>>Print. DataEase displays the Print dialog. Choose All Records as the Print Range and a destination for the print job: Printer, File, or Window. Click OK to close the dialog.

4. 5. 6. 7. 8. 9.

Using Dql Expressions As Selection Criteria


The table below gives some examples of how to use DQL expressions in a query. The first column shows the DQL term or symbol. The second column shows how to enter the operator or symbol in a QBF. The third column shows how to enter the same DQL expression in the Record Selection Filter dialog. Either technique selects the data shown in the last column. Using DQL Terms to Select PRICES and MEMBERS Records DQL Term Selection Criteria Entered in Field Query Definition Records DataEase Selects

Select records with field value that matches specified character pattern * ? ~ Cara* Carav?lle ~Carval CLUB = "Cara*" CLUB = "Carav?lle" CLUB = "~Carval" PRICES records for Club Caravelle PRICES records for Club Caravelle PRICES records for Club Caravelle

Select records with a field value that falls within a specified numeric range = =1 DEPARTURE ZONE =1 PRICES records for

64

Help File

DEPARTURE ZONE 1 > >3 DEPARTURE ZONE >3 PRICES records for DEPARTURE ZONES 4 and 5 PRICES records for DEPARTURE ZONES 1 and 2 PRICES records for DEPARTURE ZONES 3, 4, and 5 PRICES records for DEPARTURE ZONES 1, 2, and 3 PRICES records for DEPARTURE ZONES 1, 2, 4, and 5 PRICES records for DEPARTURE ZONES 2, 3, and 4

<

<3

DEPARTURE ZONE <3

>=

>=3

DEPARTURE ZONE >=3

<=

<=3

DEPARTURE ZONE <=3

not=

not=3

DEPARTURE ZONE not=3

between...to...

between 2 to 4

DEPARTURE ZONE between 2 to 4

Select records with a field value that matches the value returned by a DQL expression max min firstw count of year N.A. N.A. N.A. N.A. N.A. max(ADULT PRICE) min(ADULT PRICE) firstw(CLUB NAME)=Playa count of FAMILY MEMBERS >0 year(DATE OF BIRTH) >70 PRICES record with the highest adult price PRICES record with the lowest adult price PRICES records for Club Playa Blanca MEMBERS records with at least one family member FAMILY MEMBERS records with a birthdate after 1970 PRICES records with a child's price less than $500.00 (40% of the adult price)

N.A.

ADULT PRICE * .40 >500

Select records based on multiple conditions or 1 or Departure Zone=2 DEPARTURE ZONE = 1 or Departure Zone=2 PRICES records for DEPARTURE ZONE 1 as well as all PRICES records for DEPARTURE ZONE 2 PRICES records for Club Caravelle when guest is traveling from either DEPARTURE ZONE 1 or DEPARTURE ZONE 2.

and

Caravelle in CLUB NAME field and 1 or Departure Zone=2 in the ZONE field.

(CLUB NAME = "Caravelle") AND (DEPARTURE ZONE = 1 or Departure Zone=2)

NOTE: The use of parentheses is especially important when combining selection criteria using the and and or operators or when clarifying the order of evaluation of otherwise ambiguous expressions and operations. Without parentheses, the last example above is ambiguous. DataEase could interpret it as PRICES records for Club Caravelle when a guest is traveling from DEPARTURE ZONE 1 and all records for guests departing from DEPARTURE ZONE 2.

Locating a partly-known Record

How to Find a Record When You Don't Know the Exact Value You're Looking For
1. 2. Choose Query>>Select Records. DataEase displays a blank form. Type the data that you know in the field in the order it appears. Use an asterisk to replace any part of the text that you are unsure of. Use a question mark to replace a single character you are unsure of. You can use the * or ? wild card character anywhere in a field value. To view the selected records, choose View>>Table. To view just the first selected record, choose Goto>>First Record.

3.

Locating Records based on Sound

65

Printed Documentation

How to Find a Record When You Only Know What the Data Sounds Like
1. 2. Choose Query>>Select Records. DataEase displays a blank form. Type the data that you know in the field in the order it appears. If you search with multiple words in a field, do not skip words. Enter the Soundex character (~) followed by the word(s) that sound like the data in the record you are trying to find (e.g., to find Jon Smyth's record enter ~jn smth in the NAME field). If you don't know where the word you are searching for occurs in the field, start the search with the asterisk wild card character (e.g., if you are not sure where Smyth appears in the field, enter * ~smth). To view the selected records, choose View>>Table. To view just the first selected record, choose Goto>>First Record.

3.

Locating Specific Records

How to Find a Main Form Record in a Multiform by Specifying Criteria in the Main Form
1. 2. 3. Choose Query>>Select Records. Enter your selection criteria in one or more fields in the Main form. To view the selected records, choose View>>Table. To view just the first selected record, choose Goto>>First Record.

How to Find a Main Form Record in a Multiform by Specifying Criteria in the Subform
1. 2. 3. Choose Query>>Select Records Enter your selection criteria in one or more fields in the Subform. To view the selected records, choose View>>Table. To view just the first selected record, choose Goto>>First Record. To view additional records, choose Goto>>Next Record.

Print Records in a Form

How to Print the Records in a Form


1. 2. 3. 4. 5. 6. 7. 8. Open the form that contains the records you want to print. Choose File>>Print. DataEase opens the Print dialog. Choose the Print Destination (Printer, File, or Window). Choose the Print Detail (Text, Draft, or WYSIWYG). Choose the Print Range (All Records or Current Record). Choose Pages to specify which range of pages prints. Enter the number of the first page in the From text box and the number of the last page in the To text box. Click OK.

Printing Selected Records

How to Print Selected Records


1. 2. 3. 4. Select the records to print by choosing Query>>Select Records and/or Query>>Selection Filter. Choose File>>Print. DataEase displays the Print Dialog. Choose All Records as the Print Range and a destination for the print job: the Default Printer, a File, or a Window. Click OK.

Selecting Records

How to Select Records


1. 2. 3. Choose Query>>Select Records. DataEase displays a blank form. Enter your selection criteria in one or more fields to tell DataEase which records to retrieve from the database. To view the first matching record, choose Goto>>First Record.

If no records match your selection criteria, DataEase displays a message indicating there are no matching records. DataEase asks if you want to enter new selection criteria. Click Yes to enter new selection criteria. Click No to view all records. NOTE: DataEase is case insensitive (it does not differentiate between upper and lower case) when performing a search. For example, DataEase finds all the MEMBERS who live in California regardless of whether you enter CA, ca, or Ca, as the selection criteria.

66

Help File

Using Multiple Values In Selection Criteria


Using A Range Of Values In addition to finding records based on a constant value entered in one or more fields, DataEase can find records that contain a value within a range of values that is specified in the selection criteria. For example, if you enter between 90020 to 90189 in the ZIP CODE field, DataEase finds all the MEMBERS records that have a Zip Code from 90020 to 90189. Using Multiple Criteria in One Field You can insert two or more values as selection criteria in one field using the and and or DQL operators to link the values. The and operator retrieves records that satisfy all the selection criteria. Or retrieves records that satisfy any of the selection criteria. For example, if the criteria in the MEMBERS FIRST NAME field is "Andrew" or First Name="John", DataEase finds all the members whose first name is Andrew or John. If you used and instead of or in this example, DataEase would retrieve no records because no member has two first names. Using Quotation Marks To Clarify Text Criteria When you use two or more Text values in your selection criteria, you must enclose the value in quotation marks. Using Wild Card Characters In Selection Criteria DataEase lets you search for a record using three special characters, called wild cards. If you are not sure of the value in the record(s) you are searching for, you can enter any combination of wild card characters (*, ?, and ~) as part of the selection criteria to find a specific record or group of records. The results of various wild card searches are shown in the table below. * Wild Card replaces none, one, or a string of unknown characters. You can use the * wild card twice in a field. ? Wild Card replaces one unknown character in a specific position. ~ Wild Card Soundex Search finds records based on what a field sounds like, not how it is spelled. A Soundex search finds patterns of consonants; it ignores the vowels in the word. For example, if you enter ~Read as selection criteria in the MEMBERS LAST NAME field, DataEase finds members such as Reed, Rhode, Rada, and Ride.

View/Modify Selection Criteria

How to View or Modify Selection Criteria


1. 2. 3. 4. Choose Query>>Selection Filter. DataEase opens a dialog that displays any previously entered selection criteria. View the criteria and then: If the query is correct, click OK. If you want to change the selection criteria, enter the new criteria directly in the Definition Box using any valid DQL expression. When you click OK, DataEase uses the new criteria to find records.

67

Printed Documentation

QBM Reports (Query by Model)


Query by Model

Query By Model
The process used to create a form over an existing database table and that used to create a report in DataEase are very similar. When you create a form that uses a table, you can fill in the New Document dialog and then click the Query button to use the Query By Model dialog or click OK to bypass it. When you create a new report, it must use an existing database table. If you choose Report from the New cascade menu, DataEase opens the New Document dialog. Select a database table on which to base the report and click the Query button. DataEase opens the Query By Model dialog. The Query By Model dialog displays a graphic representation of the table you initially select. Choose any additional tables and select the columns and records that contain the data you want the document to display. You can also group, sort, and generate statistics on the data.

How to Access Query By Model


1. 2. Choose File>>New and choose Form or Report. In the New Document dialog, choose the database table for the new document and then click Query. Choose File>>Open, choose the form you want to query, use the options on the Query menu to enter a sorting order and any record selection criteria, and choose Query>>QBM-New Report to translate the query into a Query By Model. Choose Document>>Query By Model.

3.

NOTE: If you bypass the Query By Model dialog when you create a new document, DataEase copies all columns from the table to the document layout.

The QBM Dialog box


When you select Document>>Query By Model DataEase opens a data model which displays the tables used by the current document. You can use the Data Model to:

View the tables and relationships that a document uses. Select fields to display in a report. Select fields to use as sort and selection criteria. Create calculated and summary fields. Create fields that display data from related tables.

You can access the Data Model by choosing: File>>New Designer View, Document>>Query By Model. User View, Query>>QBM - New Report.

User View, Query By Model Toolbar Button The Query By Model dialog automatically creates a graphic representation of a document's database tables and their columns. Each of the three areas of the dialog is explained in detail below.

The Query By Model Dialog


Related Tables lets you add a related table to the Table Diagram. You can add a table from the list box or create a new relationship to access a table that is not listed. When you add a table to the Table Diagram, DataEase automatically creates a Subform in the document with fields that correspond to the selected columns in the table. Add Table lets you add the table highlighted in the Related Tables list box to the Table Diagram. Remove lets you remove the highlighted table from the Table Diagram. When you remove a table from the Table Diagram, DataEase deletes the corresponding Subform and any data from the corresponding columns. Select Parent Records If Field displays the selection criteria for the currently highlighted column. If you open Query By Model in User View, DataEase automatically passes any selection criteria specified in the Query By Form (QBF) to this area of the dialog. Select this Table's Records If Field displays the selection criteria used to select records from the highlighted table. You can edit the criteria in this dialog using the standard DataEase text editing keys.

68

Help File

Sort by lets you sort the records in the document based on the currently highlighted column. You can sort the records in Ascending (A-Z, 1-9) or Descending (Z-A, 9-1) order. If you open Query By Model in User View, DataEase automatically passes any sort order specified in the query to this area of the dialog. Group by lets you group records in the document based on the currently highlighted column. This choice lets you group data based on one column in a table. When you group by a column, DataEase automatically creates a Subform in the document with fields that correspond to the selected columns in the table. Summarize lets you generate statistics such as group totals and/or grand totals of all the data based on the values in selected columns. The statistic appears as a field at the end of the group or the end of the document. You can calculate and display any of the following statistics on a column: Sum Max Count Var Mean Min Std Dev Std Err

If you add a statistical field to a document using Query By Model, DataEase does not add a column to the table. Convert to DQL displays the Convert to DQL dialog shown below, which asks you if want to convert the QBM Report into a DQL Procedure. When you choose Yes, DataEase automatically displays the script in the DQL Script Editor. Users without Modify Layout rights on a document will not be able to select the Convert to DQL button in QBM. When a user selects QBM in User View for a Quick Report, the "Convert to DQL" button will be greyed out and the Original Form will not be available from the Layout dialog, as a security precaution. Once the Quick Report is saved both of these options will be enabled provided there is no reason beyond the scope of Hidden Filters to deny them. Table Diagram displays the tables that the document accesses. Under each table name, DataEase lists each column name. When you select a column, it is highlighted. Columns included in the document appear in bold type. DataEase lets you select, sort, or generate statistics on a column even if it is not displayed in the report. Any column used to group, select, sort, or summarize is assigned a symbol (G, ?, <up arrow>, <down arrow>) to indicate its function(s) in the query. Adding a Table to the Related Tables List Box To add a table to the Table Diagram that is not listed in the Related Tables list box, double-click on <New Relationship> in the list box. DataEase opens the New Relationship dialog shown below so you can define a new relationship.

New Relationships Dialog Options


Records in displays the name of the current table in the Table Diagram. Are related to records in lets you define a new relationship based on the current table and another table in the application. To choose the related table, click on the table name in the drop-down list box. Based on the following fields being equal lets you choose the Match fields on which the new relationship is based. DataEase displays the fields from the current table in a drop-down list box. Click on your choice of a Match field. To choose the related Match Field, pick from the fields displayed in a drop-down list box on the right. Custom Relationship Names lets you name a second relationship when there are two or more relationships between the same two tables. Enter the name you choose to differentiate the second relationship. Referential Integrity lets you control how DataEase treats records that you modify or delete from a Multiform.

Selecting Records
If a document contains selection criteria, DataEase displays only the records that meet the selection criteria. The Data Model lets you enter selection criteria for a form or report. If no selection criteria is entered, DataEase displays all records. We recommend that you index any field(s) that you frequently use to enter selection criteria. NOTE:If you enter selection criteria using QBM in a form document, you can override it by entering new criteria using QBF.

Sorting Records
If a document contains a sort order, it displays the records in Ascending or Descending order based on the value in one or more fields. The Data Model lets you enter selection criteria for a form or report. NOTE:If you define a sort order for a form, it may take additional time to display the records because of the time it takes to sort them. You can speed sorting by indexing the field.

69

Printed Documentation

Grouping Records
You can group the data in a document by choosing:

A related table.

A column in the current table. In either case, the Data Model creates a Subform in the document with fields that correspond to the highlighted columns in the table.

Generating Statistics
If you specify summary statistics such as group totals and/or grand totals using QBM, the statistic appears as a field at the end of the group (Subform) or the end of the document. You can calculate and display any of the following statistics on a column: Sum Max Count Var Mean Min Std Dev Std Err

The Layout Options Dialog


The Layout Options dialog lets you choose a predefined layout and quickly specify the arrangement of fields in a form or Subform. In addition, this dialog lets you choose the number of records the form displays both horizontally and vertically, and whether it displays row numbers, field labels, scroll bars, and other conveniences. Field Layout lets you choose how to arrange fields in a document: Original Form, Field/Line, Table, Table Across, Mailing Labels, and Custom. Record Layout Preview lets you choose how many records to display horizontally and vertically. To add and delete records, click on the plus sign (+), double plus sign (++), and the minus sign (-), or enter a value directly by typing it in the field. To designate the maximum number of records horizontally or vertically, leave the corresponding field blank. Appearance lets you specify whether DataEase displays row numbers, field labels, label shading, scroll bars, and/or titles on the form. Record Size displays the Width and Height of the form area in inches or centimeters. Scroll Direction lets you specify whether you want to scroll records horizontally or vertically. NOTE: You can use the Data Model Layout Options as an alternative to the Document Layout Editor for creating a quick, attractively arranged document.

How to View the Data Structure of a Document


1. 2. 3. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. DataEase displays all the tables that are related to the document's primary database table in the Related Tables list box. DataEase displays all the tables currently associated with the document in the Table Diagram. Click OK to close the dialog.

How to Add a Subform to a Document


1. 2. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. 2 If the table is in the Related Tables list box, double-click on its name. DataEase adds the table to the Table Diagram. or...If the table is not in the Related Tables list box you must first define the relationship by doubleclicking on<<New Relationship>. DataEase opens the New Relationship dialog. Enter the name of the table you want to add to the Data Model, specify the Match fields, and then click OK to close the dialog. Double-click on the table's name in the Related Tables list box. Click OK to close the dialog.

3. 4. 5.

How to Remove a Subform from a Document


1. 2. 3. 4. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. In the Table Diagram, click on the table's title or on any column name in the table. Click on the Remove button. DataEase removes the table from the Table Diagram and places its name in the Related Tables list box. Click OK to close the dialog.

How to Add or Remove Fields Using QBM


1. Choose Document>>Query By Model. DataEase opens the Query By Model dialog.

70

Help File

2. 3.

To select an unselected column double-click on the column name, click on it and press the spacebar, or click on the column name and then click the Display checkbox. DataEase displays the column name in bold type. Click OK to close the dialog.

How to Select Records Using QBM


1. 2. 3. 4. 5. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Select the column to display in the document or deselect the column if you want to use it only as a data filter. Click on the Select Parent Records If Field button. DataEase opens a window in which you enter selection criteria. Type in the selection criteria following the DQL syntax explained for QBF (Query by Form). When selection criteria is assigned to a column, DataEase displays a question mark next to the column. Click OK to close the dialog.

How to Sort Records Using QBM


1. 2. 3. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Double-click on the column you want to use to sort the data in the document. Click on the Sort by button. When DataEase displays the sort order options, click on Ascending or Descending to order the records. DataEase then displays the sort order number for that column in the box over the Ascending option. When sort order is assigned to a column, DataEase displays an up arrow for Ascending and a down arrow for Descending next to the column. Click OK to close the dialog.

4. 5.

How to Group Records Using QBM


1. 2. 3. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Double-click on the column you want to use to group the data in the document. Click on the Group by checkbox. DataEase displays a second instance of that column's table in the Table Diagram and automatically creates a corresponding Subform in the document. DataEase displays a G next to each group column in the original table. Select the columns that you want to appear within that group. Click OK to close the dialog.

4. 5.

How to Generate Statistics Using QBM


1. 2. 3. 4. 5. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Click on the column you want to use to generate summary statistics for the data displayed in the document. Click on the Summarize button. Choose one or more of the statistical operators from the list DataEase displays. Click OK to close the dialog. DataEase places a new summary field on the appropriate form object(s). The new field is named after the field it summarizes.

How to Use DQL Selection Criteria in QBM


1. 2. 3. 4. 5. 6. 7. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Click any column or on the title of the filtered table. Click the Select This Table's Records If button. DataEase displays the previously entered selection criteria as a DQL expression. View the criteria and then: If the criteria is correct, click OK. If you want to change the selection criteria, enter the new criteria directly in the box using any valid DQL expression. When you click OK, DataEase uses the new criteria to find records. Click OK to close the dialog.

Create a Report

How to Create a Report


1. 2. 3. Choose File>>New>>Report. Choose a Style Sheet and the database table that will be the primary data source for the report. Click on the Query (Query By Model) button in the New Document dialog.

71

Printed Documentation

4.

When DataEase opens the Query By Model dialog, the primary database table is displayed. Double-click the columns to use as fields in the report document. Within the Query By Model dialog, you can add tables, select some or all columns from each table, select specific records, as well as group, sort, and summarize the report data. After you choose the tables, columns, and statistics to display in the report, click OK. DataEase displays the Layout Options dialog. Choose the Field and Record Layout that you require and click OK. DataEase automatically creates the report and displays the selected layout in a new window in Designer View. To run the report and view the data, switch to User View. DataEase displays the Print dialog. Choose Window as the destination and click OK. DataEase displays the report data according to the specification built using QBM.

5. 6. 7. 8. or...

Print the report on paper, by choosing Printer as the destination in the Print dialog instead of Window.

Page and Running Totals

How to Create a Page Total


1. 2. 3. 4. Select a table and column in the Summary Variables dialog. Select a statistic (sum, mean, maximum, minimum, count of). Choose Compute summaries from Page Start and Compute when Page Ends. Click OK to close the dialog. Select the Summary Variable object and choose Display from the Object Express menu. DataEase displays the Display Attributes for Summary Variable object dialog. Specify the Summary Variable display characteristics and click OK.

How to Create a Running Total


1. 2. 3. 4. Select a table and column in the Summary Variables dialog. Select a statistic (sum, mean, maximum, minimum, count of). Choose Compute summaries from Report Start and Compute when Page Ends. Click OK to close the dialog. Select the Summary Variable object and choose Display from the Object Express menu. DataEase displays the Display Attributes for Summary Variable object dialog. Specify the Summary Variable display characteristics and click OK.

How to Display a Running Total from a Previous Page


1. 2. 3. 4. Select a table and column in the Summary Variables dialog. Select a statistic (sum, mean, maximum, minimum, count of). Choose Compute summaries from Report Start and Compute when Page Starts. Click OK to close the dialog. Select the Summary Variable object and choose Display from the Object Express menu. DataEase displays the Display Attributes for Summary Variable object dialog. Specify the Summary Variable display characteristics and click OK.

QBM Grouping and Statistics

How to Group Records Using QBM


1. 2. 3. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Double-click on the column you want to use to group the data in the document. Click on the Group by checkbox. DataEase displays a second instance of that column's table in the Table Diagram and automatically creates a corresponding Subform in the document. DataEase displays a G next to each group column in the original table. Select the columns that you want to appear within that group. Click OK to close the dialog.

4. 5.

How to Generate Statistics Using QBM


1. 2. 3. 4. 5. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Click on the column you want to use to generate summary statistics for the data displayed in the document. Click on the Summarize button. Choose one or more of the statistical operators from the list DataEase displays. Click OK to close the dialog. DataEase places a new summary field on the appropriate form object(s). The new field is named after the field it summarizes.

Printing a QBM Report

How to Print a QBM Report


Enter selection and sorting criteria using any combination of Query menu options. 1. Choose Query>>QBM - New Report. DataEase displays the Data Model. Use QBM to refine or expand the report definition.

72

Help File

2. 3. 4.

Click OK. DataEase opens the Layout Options dialog, which lets you create a custom layout for the document. Click OK. DataEase opens the Print dialog. Choose a Print Range and the destination for the print job (the default printer, a window on screen, or a disk file).

How A Report Appears When Opened In User View


When you open a report in User View, its appearance may vary depending on how the application designer sets its default Document Properties. A report can be assigned to open in one of three ways:

QBF lets you enter selection criteria to filter the data displayed in the report. Live (Browse) displays the report data in an outline-like format that displays space for four records from each group along with group totals. Print sends all the data to a window on screen, a printer, or a disk file, depending on the default Print Destination. Each group level in the report dynamically expands to accommodate all the requested data.

NOTE: To switch a report from Live to QBF, choose Query>>Select Records. Once you view the report output Live or in QBF, you can choose File>>Print to send the report to a window, printer, or disk file. When you print a report to a window on screen, a printer, or a disk file, each group level in the document dynamically expands to accommodate all the requested data.

Printing Selected Records How to Print Selected Pages of a Document


1. 2. 3. 4. Open the document you want to print. Choose File>>Print. DataEase opens the Print dialog. Choose pages. Enter the number of the first page in the From text box and the number of the last page in the To text box. Click OK. DataEase prints only the pages in the range you specify.

Selecting Records

Select Records
Displays a blank record in which you enter the criteria DataEase uses to find records.

How to Select Records


1. 2. 3. Choose Query>>Select Records. DataEase displays a blank form. Enter your selection criteria in one or more fields to tell DataEase which records to retrieve from the database. To view the first matching record, choose Goto>>First Record.

If no records match your selection criteria, DataEase displays a message indicating there are no matching records. DataEase asks if you want to enter new selection criteria. Click Yes to enter new selection criteria. Click No to view all records. NOTE: DataEase is case insensitive (it does not differentiate between upper and lower case) when performing a search. For example, DataEase finds all the MEMBERS who live in California regardless of whether you enter CA, ca, or Ca, as the selection criteria.

Using Multiple Values In Selection Criteria


Using A Range Of Values In addition to finding records based on a constant value entered in one or more fields, DataEase can find records that contain a value within a range of values that is specified in the selection criteria. For example, if you enter between 90020 to 90189 in the ZIP CODE field, DataEase finds all the MEMBERS records that have a Zip Code from 90020 to 90189. Using Multiple Criteria in One Field You can insert two or more values as selection criteria in one field using the and and or DQL operators to link the values. The and operator retrieves records that satisfy all the selection criteria. Or retrieves records that satisfy any of the selection criteria. For example, if the criteria in the MEMBERS FIRST NAME field is "Andrew" or First Name="John", DataEase finds all the members whose first name is Andrew or John. If you used and instead of or in this example, DataEase would retrieve no records because no member has two first names. Using Quotation Marks To Clarify Text Criteria When you use two or more Text values in your selection criteria, you must enclose the value in quotation marks. Using Wild Card Characters In Selection Criteria DataEase lets you search for a record using three special characters, called wild cards. If you are not sure of the value in the record(s) you are searching for, you can enter any combination of wild card characters (*, ?, and ~) as part of the

73

Printed Documentation

selection criteria to find a specific record or group of records. The results of various wild card searches are shown in the table below. * Wild Card replaces none, one, or a string of unknown characters. You can use the * wild card twice in a field. ? Wild Card replaces one unknown character in a specific position. ~ Wild Card Soundex Search finds records based on what a field sounds like, not how it is spelled. A Soundex search finds patterns of consonants; it ignores the vowels in the word. For example, if you enter ~Read as selection criteria in the MEMBERS LAST NAME field, DataEase finds members such as Reed, Rhode, Rada, and Ride.

Sorting Records

How to Sort Records


1. 2. 3. 4. 5. 6. 7. Choose Query>>Sort Records. DataEase displays a blank form. Choose a sort order: Choose Query>>Ascending to display records from the lowest to highest value in the specified Sort field. Choose Query>>Descending to display records from the highest to lowest value in the specified Sort field. To choose a Sort field, click on the field or press the Spacebar when the cursor is in the field (e.g., when sorting by LAST NAME, DataEase displays a 1 in the LAST NAME field to show it is the first sort level). To sort records by additional fields, repeat steps 2 and 3 (e.g., when you sort records by FIRST NAME after LAST NAME, DataEase displays a 2 in the FIRST NAME field to show it is the second sort level). To view the selected records, choose View>>Table. To view just the first record, choose Goto>>First Record.

NOTE: To modify the sort specifications, select a field, type a new sort level number, and insert (or delete) a - (minus sign) to specify descending or ascending order.

How Dataease Sorts Each Field Type


DataEase sorts each Field Type in a different manner. The table below summarizes the effect of choosing Query>>Ascending or Query>>Descending for each Field Type.

74

Help File

NOTE: If you select a field by choosing Sort Records and do not specify a sort order, DataEase automatically displays records in Ascending order.

Sorting to improve performance

How to Sort the Data in a Table to Improve Query Performance


1. 2. 3. 4. 5. Open the form that owns the table and choose Document>>Performance. DataEase displays the Document Performance dialog. Highlight the column in the table that you use most frequently to find records in the Clusterable Columns list box. Click Insert>> to add the column to the Cluster Order list box. Repeat steps 2 and 3 if you need to sort the records by another column. Click OK to close the dialog. When you choose File>>Save to save the form, DataEase permanently reorders the records in table by the value in the clustered column(s).

NOTE: If you remove the clustered order and save the form, DataEase does not sort the records (and lets the clustered order degrade).

Selecting and Sorting

How to Select Records Using QBM


1. 2. 3. 4. 5. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Select the column to display in the document or deselect the column if you want to use it only as a data filter. Click on the Select Parent Records If Field button. DataEase opens a window in which you enter selection criteria. Type in the selection criteria following the DQL syntax explained for QBF (Query by Form). When selection criteria is assigned to a column, DataEase displays a question mark next to the column. Click OK to close the dialog.

How to Sort Records Using QBM


1. 2. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Double-click on the column you want to use to sort the data in the document.

75

Printed Documentation

3.

Click on the Sort by button. When DataEase displays the sort order options, click on Ascending or Descending to order the records. DataEase then displays the sort order number for that column in the box over the Ascending option. When sort order is assigned to a column, DataEase displays an up arrow for Ascending and a down arrow for Descending next to the column. Click OK to close the dialog.

4. 5.

Selection Filter on/off

How to Turn the Record Filter On or Off


1. 2. Choose View>>All Records to display all the records in a document, ignoring any specified QBF criteria. Choose View>>Queried Records to display only records that meet the specified QBF criteria (e.g., STATE=CA).

Using DQL Selection Criteria in QBM

How to Use DQL Selection Criteria in QBM


1. 2. 3. 4. 5. 6. 7. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. Click any column or on the title of the filtered table. Click the Select This Table's Records If button. DataEase displays the previously entered selection criteria as a DQL expression. View the criteria and then: If the criteria is correct, click OK. If you want to change the selection criteria, enter the new criteria directly in the box using any valid DQL expression. When you click OK, DataEase uses the new criteria to find records. Click OK to close the dialog.

Modifying Selection Criteria

How to View or Modify Selection Criteria


1. 2. 3. 4. Choose Query>>Selection Filter. DataEase opens a dialog that displays any previously entered selection criteria. View the criteria and then: If the query is correct, click OK. If you want to change the selection criteria, enter the new criteria directly in the Definition Box using any valid DQL expression. When you click OK, DataEase uses the new criteria to find records.

DQL Reports (Procedures)


How to Add Group Totals and Grand Totals to a Report
Question How do I get DataEase to generate both group subtotals and a grand total for the entire report? Solution 1. 2. 3. Use the in groups with group totals command to list the grouped fields. Use the statistical operators to generate the desired statistics on the appropriate field(s). You can use any combination of the statistical operators. If you also want to list the individual field values, include the item operator with any other statistical operators.

Example for RESERVATIONS ; list records MEMBER ID in groups with group totals ; any MEMBERS LAST NAME ; CLUB NAME ; TOTAL DUE : item sum mean . end Tip: When you choose any of the automatically generated layout options, DataEase places each statistical field on the approptiate parent object. If you choose a custom layout, the item field should be placed on the subform's record object, while any aggregate fields should be placed both on the subform's form object (where it will display subtotals) as well as the primary form object (where it will display a grand total for the report).

How to Avoid Deadlock by Duplicating the Order in Which Tables are Accessed in Multiple Scripts
Query Standardization is the process of developing a standard order in which tables and rows are accessed and updated in a query.

76

Help File

When you define two or more procedures that update the same tables and can be executed at the same time, try to write each query so that all the tables are accessed and updated in the same order. If your queries access tables in random order, deadlocks may occur. If you standardize on the order in which tables are accessed in queries, however, you can solve many of the deadlock problems you may be experiencing.

How to Avoid Redundant Processing in a DQL Procedure


Question How do I avoid making DataEase request the same data repeatedly in a script? Solution When processing a procedure, DataEase is sometimes forced to request the same records more than once from the SQL engine. If you specify an action that causes DataEase to perform redundant processing, it can have a significant impact on performance. Two Examples that cause redundant processing are shown on this page. Example 1 for RESERVATION SUMMARY ; list records MEMBER ID in groups ; TOTAL SPENT ; all RESERVATIONS LAST NAME ; sum of RESERVATIONS TOTAL DUE . end This script tells DataEase to: 1) process all the records in the RESERVATION SUMMARY table listing the MEMBER ID in groups and the TOTAL SPENT by that member. 2) Also, for each record in RESERVATION SUMMARY, find all the related records in RESERVATIONS, list the last name of each member and calculate the total amount of all their open reservations. This script requests the same aggregate twice. TOTAL SPENT is a Virtual field on the RESERVATION SUMMARY form that is calculated by totalling the values in the TOTAL DUE field in all the related records in the RESERVATIONS table. Example 2 for RESERVATION SUMMARY ; if TOTAL SPENT > 5000 then for RESERVATIONS list records MEMBER ID ; LAST NAME ; CLUB NAME . end --for end --if end --for In Example 2, performance is reduced because the procedure contains a nested for command inside a DQL conditional statement. If a procedure contains a for or all command inside a case, if, or while statement, DataEase first tests each record against the condition and then requests the record again from the SQL engine when it goes on to process the nested action(s). If instead, you include the criteria in the if statement as selection criteria in the for statement (using a with clause), DataEase only has to issue one SELECT statement for the whole file instead of mulitple selects for each record.

How to Calculate a Percentage


Question How can I calculate a percentage in a report? Solution It depends on the type of percentage you want to generate. You can:

or...

Use the conditional statistical operators to calculate what percent of the records in a group or the entire table contain a particular field value as illustrated in Example 1 below. Use the relational statistical operators to generate a total that you can divide a field value or another sum by as illustrated in Example 2 below.

Note: When you use relational statistical operators, your Solution will benefit from the addition of one or more temporary variables to store the calculated value as shown in Examples 2 and 3. Example 1 for FAMILY MEMBERS ; list records MEMBER ID in groups ; AGE STATUS = "child" : percent . end This example tells DataEase to: 1) process all the records in the FAMILY MEMBERS table, 2) group the records by the MEMBER ID field, and 3) generate a percentage of how many of the members in each group are children.

77

Printed Documentation

Example 2 define temp "RM" number . assign temp RM := sum of CLUBS ROOMS . for CLUBS ; list records CLUB ID in groups with group totals ; (ROOMS / temp RM) * 100 . end Example 2 tells DataEase to: 1) process all the records in the CLUBS table. 2) Group the records by MEMBER ID. 3) Divide the total number of rooms at each club by the total number of rooms at all the Club ParaDEASE clubs, then multiply the result by 100 to generate a percentage. Note: In Example 2, we used a temporary varible to accumulate the total number of rooms for all clubs prior to opening the clubs table. We might have instead replaced the last line of the script with "rooms/sum of CLUBS ROOMS * 100". However, this syntax requires DataEase to generate the same total over and over again; once for each record processed by the for loop. Example 3 define temp "CLUB" numeric string 5 . define temp "CLUBTOT" number . define temp "KIDTOT" number . for RESERVATIONS ; if temp CLUB not = CLUB ID then assign temp CLUB := CLUB ID . assign temp CLUBTOT := TOTAL DUE . assign temp KIDTOT := TOTAL CHILD PRICE . else assign temp CLUBTOT := temp CLUBTOT + TOTAL DUE . assign temp KIDTOT := temp KIDTOT + TOTAL . end list records CLUB ID in groups with group totals ; (temp KIDTOT / temp CLUBTOT) * 100 . end Example 3 tells us what percentage the total child's price is of the total of all reserervations at each club. This script tells DataEase to: 1) define three temporary variables. Temp CLUB will store the CLUB ID of the current record being processed. Temp CLUBTOT will accumulate the total dollar amount of all the reservations for each club. Temp KIDTOT will accumulate the total dollar amount of all the children's reservations at each club. 2) Open the reservations table and process all the records. 3) Use an if command to check the value in temp CLUB. If it is different than the CLUB ID in the current record, assign it the current CLUB ID. Simultaneously, assign the CLUBTOT variable the value in the TOTAL DUE field and the KIDTOT variable the value in the TOTAL CHILD PRICE field. If temp CLUB and the CLUB ID are the same, increment temp CLUBTOT and temp KIDTOT. 4) Group and list the CLUB ID. 5) Devide temp KIDTOT by temp CLUBTOT and multiply the result by 100 to list what percentage the children's reservation total is of the whole total for each club.

How to Choose the Primary Table in a Multi-Table Procedure


Question How do I choose the primary table in a procedure that accesses more than one table? Solution 1. You should typically choose the table that contains the fewest number of records as the primary table for a report.

Example for MEMBERS ; list records MEMBER ID in groups ; all FAMILY MEMBERS LAST NAME ; all FAMILY MEMBERS FIRST NAME ; TOTAL DUE . end This example tells DataEase to: 1) process each record in the MEMBERS table listing each MEMBER ID just once and then 2) the FIRST NAME and LAST NAME of each FAMILY MEMBER included in the membership. 3) Finally, list the total amount of dues paid for the membership. Discussion This script could also have used the FAMILY MEMBERS table as the primary table listing any MEMBERS MEMBER ID and any MEMBERS TOTAL DUE to select data from the MEMBERS table. As a general rule though, it is better to start on the one side of a one-to-many relationship since there are fewer records to process in the primary table. Since match fields in a relationship should always be indexed, the time it takes DataEase to retreive records from a related table is minimized. Caution The all relational operator imposes certain restrictions that sometimes make it imposible to follow this tip. For example, the all relational operator is only valid as a list item (e.g., under the list records command). You cannot use all:

78

Help File


Question

in selection criteria in a formula

How to Combine Multiple Selection Criteria using and and or


When should I choose and to combine more than one selection criterion and when should I choose or? Solution 1. 2. 3. Use and when you want to select records that meet both criteria. Use or when you want to select records that meet either criteria. When you want to combine 3 or more criteria using both and and or, one or the other must be enclosed in parentheses to clarify the meaning to DataEase. The Examples below illustrate each of the possible scenarios.

Example 1 for FAMILY MEMBERS with AGE STATUS = "adult" and STATE = "CO" ; Example 1 tells DataEase to: 1) select only those records that store both the values adult in the AGE STATUS field and CO in the STATE field. Example 2 for FAMILY MEMBERS with AGE STATUS = "adult" or STATE = "CO" ; In Example 2, only one of the specified conditions must be met for the record to qualify. When we use the or operator instead of the and operator, children living the state of Colorado qualify as do adults living in any other state. Example 3 for FAMILY MEMBERS with AGE STATUS = "adult" and (STATE = "CO" or STATE = "WY") ; The parentheses in Example 3 clarify any ambiguity for DataEase. This example tells DataEase to find all the adults living in either Colorado or Wyoming. Caution You might think that to list members from both Colorado and Wyoming you could use the with clause with STATE = "CO" and STATE = "WY". However, the and operator stipulates that all specified values must be found in a record for the record to be processed. Since the STATE field can only store one two character state abbreviation at a time, the criteria is never true and DataEase doesn't find any records to process. When you want to select records that store any one of several different values in the same field, you must use the or operator. When you combine an and operator with an or operator in the same with clause, parentheses must be used to assure that no ambiguity exists. For example, without the parentheses, Example 3 would read with STATE = "CO" or STATE = "WY" and AGE STATUS = "adult". Given this statement, DataEase can't determine whether you want to list: 1) only adults living in Colorado or Wyoming, or: 2) all Colorado residents (regardless of age status) and any adult residents of Wyoming.

How to Combine Ordering and Grouping Commands in a Script


Question How do I decide the order in which to list fields when I want several fields listed in order and/or groups? Solution 1. 2. Sorted fields must be listed in order of sorting priority. List any grouped fields before any ordered fields.

Example 1 for MEMBERS ; list records STATE in order ; LAST NAME in order ; FIRST NAME in order . end This script tells DataEase to: 1) sort the STATE field in order first, 2) then, within each state group, sort the LAST NAME field in order, and finally, 3) for each duplicate LAST NAME, sort the FIRST NAME in order. Example 2 for MEMBERS ; list records LAST NAME in order ; FIRST NAME in order ; STATE in order . end In Example 2, since the LAST NAME field is listed first and the STATE field last, DataEase performs the sorts in a different sequence creating a very different result. Example 3

79

Printed Documentation

for MEMBERS ; list records STATE in groups ; LAST NAME in order ; FIRST NAME in order . end Example 3 is identical to Example 1 except that the STATE field is now listed in groups rather than in order. The in groups command orders the values just like the in order command but each value is listed just once instead of repeatedly. Tip: DataEase performs record sorts in the order it encounters them as it reads the script. Therefore, you must list any grouped fields before any ordered fields. Although you don't necessarily have to list sorted fields immediately after the list records command, it is generally easier to understand and maintain a script that lists any grouping and ordering commands first.

How to Control Transactions in a DQL Procedure


Question When I write a DQL Procedure that accesses SQL data, DataEase seems to treat the whole procedure as a single transaction. Is there any way around this? Solution 1. 2. Divide the procedure into logical transactions. Use the DataEase begin transaction and commit commands to tell DataEase which portions of the script constitute those individual transactions.

Example for RESERVATIONS ; begin transaction enter a record in NEW_RESERVATIONS copy all from RESERVATIONS . commit end --for This example tells DataEase to: 1) open the native RESERVATIONS table and process all the records. 2) Issue a begin transaction command to the server. 3) Enter a new record in the NEW_RESERVATIONS table on the server. 4) Commit each record as it is entered. Discussion As a DQL Procedure modifies records, the changes are immediately available for use as part of a condition or operation. However, there may be times when you want to save groups of changes as they are completed. In this case, you can use the DQL begin transaction and commit commands to divide the procedure into a group of smaller transactions. If you do not use the begin transaction and commit commands, DataEase treats the entire procedure as a single transaction. For example, in the above sample script, if the server determines that a record is a duplicate, that individual transaction fails. Without the begin transaction and commit statements, if the insertion of record number 197 of 200 fails, all 196 previous insertions are rolled back. The purpose of this script is twofold. Since DataEase doesn't require you to create a unique field in a native table, you may enter duplicate records. This script transfers the RESERVATIONS data from the native table to a new table on the server, and simultaneously eliminates duplicate records since they are not allowed on the server. Tip: You may also find it useful to divide some of your larger procedures into a series of small procedures which are executed by a single control procedure.

How to Count the Number of Groups in a Report


Question How can I count the number of groups in my reports? Solution 1. 2. 3. 4. 5. 6. Define a temporary variable to store the value in the grouped field. Use this variable to indicate when the group has changed. Define a second temporary variable to accumulate the number of groups. Increment this variable each time the value in the first variable changes. Use a for command to open the primary table for the report. Use an if command to check the value in the first variable. If the grouped field value and the variable are different, update the variable to reflect the new group and simultaneously increment the second variable. Use an end command to terminate the if command. Include a list records command to list the fields to be printed. The list should include the second temporary variable that accumulates the number of groups.

Example define temp "ST" text 2 . define temp "KOUNT" number . for MEMBERS ;

80

Help File

if temp ST not = STATE then assign temp ST := STATE . assign temp KOUNT := temp KOUNT + 1 . end --if list records STATE in groups ; MEMBER ID ; LAST NAME ; temp KOUNT . end --for This example tells DataEase to: 1) define two temporary variables. The first should be the same field type as the field you are grouping. The second variable should be defined as a number since it will accumulate a numeric value. 2) Open the MEMBERS table and check the value in the ST temporary variable. If the value in the ST variable is different than the value in STATE field in each record processed, assign the ST variable to the current STATE field value. At the same time, increment the KOUNT variable by one. 3) Sort the records in ascending order by state. 4) List the STATE field in groups, the MEMBER ID, LAST NAME and temp KOUNT variable. Caution When you name a temporary or global variable in a script, be sure to avoid using keywords and existing field names (e.g., use KOUNT or COUNTER rather than COUNT).

How to Count the Number of Items in a Group


Question How can I count the number of records in each group? Solution 1. 2. 3. You can use conditional statistical operators as shown in Example 1, or... If you want to further manipulate that number (e.g., use it to calculate a percentage) or enter it in a summary file, you can use a temporary variable to accumulate the value.

Example 1 for MEMBERS ; list records STATE in groups ; LAST NAME in order ; "A" = "A" : count . end --for This example tells DataEase to: 1) open the MEMBERS table and process all the records. 2) Sort the records in ascending order by state. 3) Further sort the records for each state in order by last name. 4) Count every record in the file. The line in Example 1, "A" = "A" : count, is used to count every record processed by the query. This line uses a conditional statistical operator to count all the records unconditionally. For each record in the table, the comparison "A" = "A" is always true, therefore, every record processed is counted. You can also use a field value (e.g., LAST NAME = LAST NAME : count; for every record processed the last name is always equal to itself) to count the records, but the constant text value "A" is a more commonly used method for counting records. Example 2 define temp "ST" text 2 . define temp "KOUNT" number . for MEMBERS ; if temp ST not = STATE then assign temp ST := STATE . assign temp KOUNT : = 1 . else assign temp KOUNT := temp KOUNT + 1 . end --if list records STATE in groups ; LAST NAME in order ; temp KOUNT . end --for Example 2 tells DataEase to: 1) create two temporary variables. The first holds the state value from the current record. The second is incremented each tine the state changes. 2) Open the MEMBERS table and process every record. 3) Compare the ST variable with the value in the state field. If the two values are different, update the ST variable to the state value in the current record and reinitialize the KOUNT variable. If the two values are the same, increment the KOUNT variable by one. 4) Group the records by state. Within each state group, sort the records in ascending order by last name. 5) Finally, list the state, last name and number of records processed. Discussion Both Examples can be formatted to produce nearly identical output. In addition to simplicity, Example 1 can be used to provide a grand total (i.e., the number of all the records processed by the query) as well as a subtotal for each group.

81

Printed Documentation

Example 2 only provides group subtotals. To generate a grand total in Example 2 you must add another temporary variable. Although Example 1 is much simpler and more straight forward, if you want to then post the totals to a separate file, you must follow Example 2. Caution When you name a variable in a script, be sure to avoid using keywords and existing field names (e.g., use KOUNT or COUNTER rather than COUNT, as shown above).

How to Create an Accounts Receivable Aging Report


Question How can I generate an aging report that shows a breakdown of accounts that are 0-30, 31-60, and over 60 days past due? Solution 1. 2. 3. 4. 5. Use a for command to open the primary table and specify any required selection criteria using a with clause. Use a list records command to list the fields you want to print. Under the list records command, list the field you want to group (e.g., customer no., member id, student id) in groups with group totals. Use an if function to check each record to see which age group it falls into (e.g., 0-30, 31-60, 60+, or whatever age groups you want to establish). Within each if function you can use the sum statistical operator to generate the total for each group.

Example 1 for INVOICES with PAID = NO ; list records MEMBER ID in groups with group totals ; LAST NAME ; if (current date - INVOICE DATE < 30, AMT_DUE, blank): sum ; if (current date - INVOICE DATE between 31 to 60, AMT_DUE, blank) : sum ; if (current date - INVOICE DATE > 60, AMT_DUE, blank) : sum . end This example tells DataEase to: 1) list all open invoice records grouped by MEMBER ID. 2) Check the difference between today's date and the INVOICE DATE to determine the number of days the invoice is past due. 3) If the records for each member have amounts less than 30 days past due, calculate the sum of those amounts. If the records for each member contain totals between 30 and 61 days past due, calculate the sum of those totals. Finally, if the records for each member contain totals more than 60 days past due, calculate the sum of those totals. Example 2 define temp "MEMID" numberic string 5 . define temp "XTHIRTY" number . define temp "XSIXTY" number . define temp "XOVER" number . define temp "ACC_THIRTY" number . define temp "ACC_SIXTY" number . define temp "ACC_OVER" number . for INVOICES with PAID = no ; if MEMID not = MEMBER ID then assign temp MEMID := MEMBER ID . assign temp XTHIRTY := sum of INVOICES named "under 30" with (MEMBER ID = INVOICES MEMBER ID and PAID = NO and current date - INV_DATE < 30 ) AMT_DUE . assign temp XSIXTY := sum of INVOICES named "thirty-60" with (MEMBER ID = INVOICES MEMBER ID and PAID = NO and current date - INV_DATE between 31 to 60 ) AMT_DUE . assign temp XOVER := sum of INVOICES named "over60" with (MEMBER ID = INVOICES MEMBER ID and PAID = NO and current date - INV_DATE > 60 ) AMT_DUE . assign temp ACC_THIRTY := temp ACC_THIRTY + temp XTHIRTY . assign temp ACC_SIXTY := temp ACC_SIXTY + temp XSIXTY . assign temp AC_OVER := temp ACC_OVER + temp XOVER .

82

Help File

end list records MEMBER ID in groups with group totals ; LAST NAME ; temp XTHIRTY ; temp XSIXTY ; temp XOVER ; temp ACC_THIRTY ; temp ACC_SIXTY ; temp ACC_OVER . Example 2 uses temporary variables to accumulate the individual totals for each member (broken down by day range) and report totals for each day range. This example tells DataEase to 1) create seven separate temporary variables: the first will be used to track each instance of the group changing (in this example, it holds the current MEMBER ID). The next three variables are used to accumulate the day range values: one accumulates totals less than 30 days past due, the next, 31 to 60 days past due and the last, over 60 days past due. The last three variables accumulate report totals for each of the 3 day ranges. 2) Next, the script uses a for command to open the INVOICES table. 3) Under the for loop, each temporary variable is assigned whenever the current record represents a new group. This is accomplished by testing the MEMID variable with an if command to see if it contains the same value as the MEMBER ID in the current record. 4) Whenever the MEMID variable is reassigned, the next three variables (XTHIRTY, XSIXTY and XOVER) are also reassigned. At the same item, the values in the last three variables are incremented to accumulate report totals for each category. 5) Finally, DataEase lists the MEMBER ID (in groups) and the values in each of the variables. Tip: Example 2, although much more complex than Example 1, provides the added benefit of assigning the totals DataEase generates to temporary variables. This lets you post the totals to a separate summary file if desired.

How to Find and List Duplicate Records


Question How can I find duplicate records in a table? Solution 1. 2. 3. 4. 5. Define a temporary variable to store the key value for any duplicate record. Use a for command to open the primary table. Use an if command to compare the key field to the temporary variable. Use a list records command to list only those records whose key field matches the value stored in the temporary variable. Use an end command to end the if command and then assign the temporary variable to the next key field value. Remember to use an end command to end the for loop.

Example 1 define temp "MEM" numeric string 5 . for MEMBERS ; if MEMBER ID = temp MEM then list records MEMBER ID in order ; last name . end --if assign temp MEM := MEMBER ID . end --for This script tells DataEase to: 1) define a temporary variable to store the MEMBER ID for each record in the table. 2) Sort the records in ascending order by MEMBER ID. 3) Process every record in the members table, comparing the MEMBER ID in the current record to the one stored in the temporary variable. If any records contain the matching MEMBER ID, 4) list the MEMBER ID and LAST NAME of the member. 5) Finally, assign the temporary variable to the current MEMBER ID and repeat the process. Example 2 for MEMBERS with count of MEMBERS with (MEMBER ID = MEMBERS MEMBER ID) > 1 ; list records MEMBER ID in order ; LAST NAME . end Example 2 tells DataEase to: 1) open the members table and 2) for each record, count the number of records with the matching MEMBER ID number. 3) List the MEMBER ID and LAST NAME of each record whose MEMBER ID matches the MEMBER ID stored in another record. Discussion Example 1 lists only the duplicates while Example 2 lists all the records that share the same MEMBER ID. Because Example 2 must count the records in the table repeatedly (once for each record in the table), it can be quite slow, particularly on a very large table. For this reason, we recommend that you use Example 1 whenever possible. However, if you want to see the original record in addition to the duplicates, you must follow Example 2.

83

Printed Documentation

Tip: To avoid entering duplicate records, by sure to include a primary key (a unique identifier for each row in the table) in each table. Your primary key should always be defined as unique (unless it's defined as a sequenced id, which is unique by definition), indexed, and required. Caution The key field in Example 1 must be listed either in order or in groups since the if command only evaluates the current MEMBER ID against the previous one.

How to Detect Deadlocks


Deadlock Detection is a technique in which a transaction is placed inside a while loop in order to ensure that processing breaks off after a set number of attempts if a deadlock is detected while DataEase is processing a transaction. To detect whether a deadlock has occurred while DataEase is processing a transaction, you can set up a series of steps that verify whether the transaction is committed successfully or not. If the commit is successful, the procedure should run to completion, otherwise, the query should deal with the failure situation. This technique ensures that a deadlock cannot last indefinitely. The procedure for detecting deadlocks uses the current status and current SQLCODE variables and two temporary variables to determine the status of the update and commit and how many attempts were made to complete the transaction. The following example describes How todetect deadlocks in DQL Procedures. Example define temp "COMSTAT" number . define temp "KOUNT" number . assign temp COMSTAT := -1 . assign temp KOUNT := 0 . while temp COMSTAT = -1 do begin transaction for SAVINGS ACCOUNTS ; if current SQLCODE = 1205 then break else modify records ACCOUNT BALANCE := ACCOUNT BALANCE -DEBITS . end --1st if commit . assign temp COMSTAT := current status . assign temp KOUNT := temp KOUNT +1 . end --for if temp KOUNT > 10 then message "Sorry, DQL transaction can't be processed now." window . exit . end --2nd if end --while Explanation of Example The first two lines in the query read: define temp "COMSTAT" number . define temp "KOUNT" number . This part of the query tells DataEase to define two temporary variables. The first variable, COMSTAT, will be used to determine if the preceding DQL commit command is successful. The second variable, KOUNT, will be used to count the number of times DataEase attempts to commit the DQL transaction. The next part of the query reads: assign temp COMSTAT := -1 . assign temp KOUNT := 0 . This part of the query assigns a value of -1 to the COMSTAT variable and a value of 0 to the KOUNT variable. Subsequently, when DataEase processes the following while statement, the value of the COMSTAT variable is replaced by the value in the current status variable. The current status value is -1 if the transaction is not committed; 0 if it is committed. The next part of the query reads: while temp COMSTAT = -1 do begin transaction for SAVINGS ACCOUNTS ; if current SQLCODE = 1205 then break . else modify records ACCOUNT BALANCE := ACCOUNT BALANCE - DEBITS ; end --if commit assign temp COMSTAT := current status . assign temp KOUNT := temp KOUNT + 1 . This part of the query tells DataEase to set up a while loop that will keep trying to process the following DQL transaction until it is either committed or the value in the KOUNT variable exceeds 10. The current SQLCODE variable is used to

84

Help File

break out of the for loop if a deadlock has occurred (1205 is the error code for deadlock on Microsoft SQL Server). As long as the value of the COMSTAT variable remains -1, the value of the KOUNT variable is increased by one each time DataEase processes the while statement. When the DQL transaction is committed or the value in the KOUNT variable exceeds 10, DataEase breaks out of the while loop and continues processing the remainder of the query. The lines: begin transaction for SAVINGS ACCOUNTS ; if current SQLCODE = 1205 then break . else modify records ACCOUNT BALANCE := ACCOUNT BALANCE - DEBITS ; end --if commit are the actual DQL transaction that we are trying to process without running into a deadlock. The begin transaction and commit commands tell DataEase to process the entire for loop as a single transaction. The for statement tells DataEase to modify all the records in the SAVINGS ACCOUNT form by subtracting the DEBITS amount from the ACCOUNT BALANCE amount. Since all the modifications are treated as a single transaction, if any single modification fails (in the case of a deadlock or any other reason), the entire transaction is rolled back. If the transaction cannot be committed, the COMSTAT variable retains the value of 1 and the KOUNT variable is incremented by one. The next part of the query reads: if temp KOUNT > 10 then message "Sorry, DQL transaction| can't be processed now." window . exit . end --if end --while This section tells DataEase to look at the value in the KOUNT variable each time it processes the while statement. If the value of the KOUNT variable exceeds 10, DataEase displays a message stating: Sorry, DQL transaction cannot be processed now. If the value of the COMSTAT variable becomes zero before the value of the KOUNT variable exceeds 10, DataEase escapes out of the while loop.

How to Improve Performance by Avoiding Inconvertible DQL Expressions


Question What DQL expressions if any, should I avoid when writing scripts? Solution When you define a DQL Procedure or a Quick Report, you should try not to select or sort data based on inconvertible DQL expressions. Inconvertible DQL expressions are expressions that currently have no SQL equivalent, i.e., they cannot be directly converted to SQL expressions. If you use an inconvertible expression as part of the selection criteria in a DQL Procedure, DataEase uses the SQL engine to retrieve the records that meet all the criteria except the inconvertible expression(s). This set of records is then returned to the workstation where the native DataEase engine completes the processing that includes the inconvertible expression(s). Depending on the number of records the query selects, this can have a significant impact on performance. Expressions that include any of the following DQL symbols or words are inconvertible:

ampm cosh count count of firstc firstlast firstw futurevalue if installment

item julian lastfirst lastw lower midc midw mod percent period

presentvalue proper rate sinh spellcurrency spelldate spellmonth spellnumber spellweekday std. dev.

std. err. tanh textpos timeampm upper variance ~ Soundex Wild Card Symbol ^ ^

Note: Refer to your Database Engine Information Guide for additional DQL terms and symbols that may not be supported by your specific SQL engine.

85

Printed Documentation

Example for MEMBERS with LAST NAME = "~*SON" and TOTAL DUE > 35 ; list records LAST NAME ; all FAMILY MEMBERS FIRST NAME . end This example tells DataEase: 1) Select all the records in the MEMBERS table where the end of the last name sounds like SON (e.g., Hansen, Johnson, Wilson) and the membership dues are more than $35.00. 2) List the last name of each selected member. 3) List the first name from all the related records in the FAMILY MEMBERS table. If the ~ wild card symbol does not have an equivalent operation on your SQL engine, DataEase first retrieves all the MEMBERS records that have membership dues greater than $35.00 from the server. Then, the native DataEase engine must perform the processing that selects only the records that meet the "sounds like" selection criteria.

How to Improve Processing Speed by Creating a View from Which to Query the Data
Question When I write a script that requests just a few columns from an SQL table that contains many columns, the processing speed seems to be extremely slow. How can I speed it up? Solution When you request data from an SQL table that contains many columns, regardless of how many columns you request, DataEase returns all the columns for each record selected. This can have a significant impact on performance. If the script is one that you run frequently, or if you have several DQL Procedures that require the same or similar information from such a table, you will improve processing speed dramatically by creating a view that contains just those few columns and updating you scripts to reference the view rather than the original table. For example, let's assume that Club ParaDEASE buys a mailing list of potential members and sends a detailed Questionaire out to each individual on the list. Only those individuals who respond are then entered into a new SQL table called QUESTIONAIRE. Assuming that the QUESTIONAIRE table contains 200 columns, the two scenaraios that follow would benefit greatly from the creation of separate views based on the QUESTIONAIRE table. Example 1 Suppose you want to run a procedure that produces a letter, thanking each respondant for their participation in the servey. This procedure requires only six of the 200 fields (e.g., FIRST_NAME, LAST_NAME, STREET, CITY, STATE, and ZIP). Performance would be greatly improved by creating a view that contains just the above mentioned fields and writing the following script: for Q_VIEW1 list records FIRST_NAME ; LAST_NAME STREET ; CITY ; STATE ; ZIP in order . end Example 1 tells DataEase to: 1) select and list all the records from the view called Q_VIEW1, sorting them in zip code order. This script will perform noticibly faster than one that uses QUESTIONAIRE, since there are only six columns for DataEase to return from the server. Example 2 In the second scenario, let's suppose you want to produce a report that lists the percentage of yes and no answers to each Question on the Questionaire. Rather than create a DQL Procedure to access the QUESTIONAIRE table and calculate the percentages using DQL, performance would be greatly improved by creating a view that generates the requested percentages and referencing the view in the script as shown below: for Q_VIEW2 ; list records Q1PERCENTY ; Q1PERCENTN ; Q2PERCENTY ; Q2PERCENTN ; ... end This example tells DataEase to: 1) select all the records from a view called Q_VIEW2, listing the percentages that the server has already generated. Tip: Views are also frequently used to improve performance in certain record entry situations. For example, if you frequently use the dynamic lookup feature to retrieve related data. A dynamic lookup brings back all of the fields from the related table. If any of those fields are virtual calculations or lookups, many additional SELECT statements are issued, slowing data access time dramatically. Instead, create a view that displays just the fields necessary to select the appropriate record.

How to Insert an ASCII Text File into a DQL Script


1. Place the cursor in the script at the location where you want to insert the contents of the text file.

86

Help File

2. 3.

Choose Script>>Insert File. DataEase displays the Insert File dialog. Specify the drive, directory, and name of the source text file, then click OK. DataEase inserts the text at the cursor location.

How to Join Tables in a DQL Script


Question How do I instruct DataEase to perform any necessary table joins When I write a DQL Procedure? Solution DataEase performs the join automatically. The type of script you define determines the type of join that DataEase performs on the server. Except for the following case, DataEase performs a left outer join on any tables that are joined in a script. Example When you define a script that contains nested for commands, with no intervening DQL statements, DataEase performs an inner join on the two tables. For example, when you run the following script: for ACTIVITIES ; for MEMBERS list records ACTIVITIES ACTIVITY ; LAST NAME ; MEMBER ID . end end This example tells DataEase to: 1) process all the ACTIVITIES records. 2) For each ACTIVITIES record, list the name of the activity, and the LAST NAME and MEMBER ID from each related MEMBERS record. The result of the join is a list of activities that currently have members who favor the activity. Any activities without members who list that activity as their favorite are not listed. Additionaly, any members who haven't indicated a favorite activity are not listed.

How to Join Tables Stored on Different Engines


Question How can I create a procedure that lists or manipulates data stored on two different types of database engines? Solution When you write a script like the example shown below, and the data is stored on two separate servers (regardless of engine type), DataEase must perform the join on the workstation. Depending on the number of records the script selects, this can have a significant impact on performance. If there is any selection criteria, the selection is performed by the SQL engine before the join is performed by DataEase at the workstation. Example for ACTIVITIES ; list records ACTIVITY in groups ; all MEMBERS MEMBER ID . end This example tells DataEase to: 1) open the ACTIVITIES table and group the records by activity. 2) List the name of the activity and the last names of all the members who chose that activity as their favorite. The processing required to find the matching member records must be performed on the workstation because the MEMBERS and ACTIVITIES tables are stored on different servers. Caution Anytime DataEase has to perform a join on a workstation, performance is affected. If the script selects a large number of records, the impact on performance can be significant. If you find that you are frequently joining tables across servers, you may find it worthwhile to move a table from one server to another to improve performance.

How to Join Two Independent One-to-Many Relationships


Question What happens internally When I write a script that contains nested for commands that access two separate one-to-many relationships? Solution This scenario generates a disjoint report. A disjoint report combines information from two or more independent relationships. If your script requests data from two (or more) independent one-to-many relationships, DataEase performs the first join on the server. Any additional processing that is required is done at the workstation. Depending on the number of records the script selects, this can have a significant impact on performance. Example for ACTIVITIES list records ACTIVITY in groups ;

87

Printed Documentation

all MEMBERS LAST NAME in order ; all CLUB ACTIVITIES CLUB NAME in order . end This example tells DataEase to: 1) process all the ACTIVITIES records listing the activity in groups. 2) For each activity, list the last names of all the members who favor that activity along with the names of all the clubs that offer the activity. Discussion The ACTIVITIES table is related to both the MEMBERS and the CLUB ACTIVITIES tables, but these two tables are not related to each other. When DataEase processes this script, it joins ACTIVITIES and MEMBERS using the SQL engine, but the additional processing that is needed to join the ACTIVITIES and CLUB ACTIVITIES data must be performed at the workstation. If one of the one-to-many relationships was instead a one-to-one relationship, in the last all statement or you use the highest of or any statement (under the list records command), and all the data was stored on the same server, both joins could be performed on that engine.

How to List Detail Information from a Related Table


Question How can I list detail level information from a related table? Solution 1. 2. 3. Use a for command to open the primary table. Use a list records command to list any fields from the primary table to be grouped or ordered first. Based on the primary table you choose, use the relational operators any or all to list individual field values from a related table. The relational operator you choose depends on the direction in which you are navigating the relationship. Use:

any in a manytoone (or one-to-one) direction when there is only one related record for DataEase to find. all in a one-to-many direction when the related file stores multiple related records for each primary record. Example 1 for MEMBERS ; list records MEMBER ID in groups ; LAST NAME ; all FAMILY MEMBERS FIRST NAME ; all FAMILY MEMBERS AGE STATUS ; TOTAL DUE . end Example 1 tells DataEase to: 1) process all the MEMBERS records listing 2) the MEMBER ID and LAST NAME of each member, 3) the FIRST NAME, LAST NAME, and AGE STATUS, from each related record in FAMILY MEMBERS, and finally, 4) the total membership fees. Example 2 for FAMILLY MEMBERS ; list records any MEMBERS MEMBER ID in groups ; any MEMBERS LAST NAME ; FIRST NAME ; AGE STATUS ; any MEMBERS TOTAL DUE . end Example 2 can be formatted to present the identical output as Example 1. The only difference is that this script uses the many side of the relationship as the primary table for the report. Tip While Example 2 is perfectly viable, you should notice a significant speed improvement running Example 1. Because Example 1 starts on the one side of the relationship, there are fewer records for DataEase to process. You are not limited to listing all primary fields first, then all related fields; the two can be intermingled as shown in the above Examples.

How to List the First Few Records in a Table


Question How can I list just the first 10 records in a table? Solution 1. 2. 3. Use a for command to open the primary table for the report. Use a list records command to list the fields you want to include in the report output. Use an if command within the list records portion of the script to check the current item number.

88

Help File

4.

Use the exit or break command to terminate processing when the current item number exceeds the number of records you want to process.

Example for ACTIVITIES ; list records ACTIVITY ; PICTURE . if current item number > 10 exit end --if end --for Tip: In the above example, we used the exit command to terminate DQL processing. If the script included additional processing commands (e.g., a second complete for loop), we would have used the break command instead of exit. Caution You may be tempted to test for the current item number in a with clause in script (e.g., with current item number <= 10), however, this Solution doesn't work since the current item number variable doesn't begin accumulating its value until the processing phase of the procedure begins.

How to Organize the Commands in a Simple Script


Question How should I order the commands in a script when I'm using ordering, grouping and statistical operators? Solution 1. 2. 3. 4. 5. Begin with a for command to specify the primary table for the report. Use the list records command to list the fields you want to include. List the grouped field(s) in groups with group totals first under the list records command. List the ordered field(s) in order (or in reverse) after the grouped field(s). List the field(s) on which you wish to generate statistics using the conditional statistical operators or the relational statistical operators.

Example for CLUBS ; list records COUNTRY in groups with group totals ; CLUB NAME in order ; mean of RESERVATIONS TOTAL DUE ; ROOMS : item sum . end This example tells DataEase to: 1) open the CLUBS table and process all the records. 2) Group the records by country. 3) Within each country group, sort the club names in ascending order (a-z). 4) Calculate the average reservation total for each club. 5) List the number of rooms at each club, the number of rooms in each country and the total number of club rooms in Club ParaDEASE. Discussion DataEase processes the commands in a script in the order it encounters them. Therefore, as a general rule you must:

place any grouping commands before any ordering commands . place any statistical operators after any grouping and/or ordering commands.

Tip: When you use multiple or nested for loops, you must terminate each for loop with an end command. Although DataEase doesn't require an end command in a simple script, we recommend that you get in the habit of using an end command to signal the end of each for loop. Caution When you place statistical operators (conditional or relational) before ordering and grouping commands in a script, DataEase generates the requested statistic(s) before sorting the records. Since the records haven't yet been sorted into groups, DataEase doesn't calculate group totals. Placement of any ordering commands prior to any grouping commands causes DataEase to sort the records in order first. Once the records have been sorted in order, DataEase cannot reorder the records to formulate groups correctly.

How to Post Totals to Another Table


Question I can get DataEase to generate report subtotals but how can I transfer those totals to a separate summary table? Solution 1. 2. Define a temporary variable of the same type as the field you are listing in groups. Use a for command to specify the primary table for the report.

89

Printed Documentation

3. 4. 5. 6.

Include a list records command. You only need to list the field that you are grouping. List the field in groups and terminate the list records command with a period. Use an if command to check the status of the temporary variable. Use the enter a record command to enter a new record in the summary table each time the group changes. Reassign the temporary variable for the next pass of the for loop.

Example define temp "LAST GRP" Numeric String 5 . for RESERVATIONS ; list records MEMBER ID in groups . if MEMBER ID not = temp LAST GRP then enter a record in RESERVATION SUMMARY MEMBER_ID := RESERVATIONS MEMBER ID ; TOTAL_SPENT := sum of RESERVATIONS with (MEMBER ID = RESERVATION SUMMARY MEMBER_ID) TOTAL DUE . assign temp LAST GRP := MEMBER_ID . end --if end --for This example tells DataEase to: 1) define a temporary variable called last grp as a 5 digit numeric string. 2) Open the reservations table and process every record. 3) List the MEMBER ID in groups. This step is only required to establish the required group. DataEase will not print the MEMBER ID if you don't create a layout. 4) Using an if command, compare the value in the MEMBER ID field (in the record being processed) with the value in the LAST GRP variable. If the two values are different, DataEase enters a new record in the summary table (RESERVATION SUMMARY). The information entered in the new record includes the MEMBER ID and the sum of the total cost of all the reservations for that member. 5) Finally, assign the temp LAST GRP variable the current MEMBER ID. The first end command terminates the if command and the second end terminates the for loop.

How to Prevent Deadlocks


To prevent a deadlock from occurring while DataEase is processing a transaction, you can use a technique called gating. Gating prevents deadlocks by requiring that each user who runs the procedure acquire an exclusive lock on a special table before he/she can execute the procedure. Although this technique prevents deadlocks, it reduces concurrency and should be used only where recovery from a deadlock cannot be ensured. The procedure for preventing deadlocks uses the DQL exec SQL command to create a barrier action that blocks other users from accessing the data to be modified by the transaction. See the following example. Example exec SQL BEGIN TRANSACTION ; exec SQL UPDATE BARRIER_FORM SET BLOCK_FIELD = BLOCK_FIELD + 1; for SAVINGS ACCOUNTS ; modify records ACCOUNT BALANCE := ACCOUNT BALANCE - DEBITS . end exec SQL COMMIT TRANSACTION ; Explanation of Example The first two query statements read: exec SQL BEGIN TRANSACTION ; exec SQL UPDATE BARRIER_FORM SET BLOCK_FIELD = BLOCK_FIELD + 1; This part of the query uses the exec SQL command to initiate a transaction (but not the actual DQL transaction we want to protect against a deadlock). This preliminary SQL transaction updates the BLOCK FIELD in every record in a table named BARRIER FORM. This form should only contain one record. Note: Once a user gets an exclusive lock on the BARRIER FORM, no other DataEase user can get past this barrier until the entire exec SQL transaction is committed. A user of another frontend product or another database application, however, may still be able to lock the table we want to modify before we gain access to it. The next part of the query reads: for SAVINGS ACCOUNTS ; modify records ACCOUNT BALANCE := ACCOUNT BALANCE - DEBITS . end --for This is the actual DQL transaction that we are trying to process without running into a deadlock. The for statement tells DataEase to modify all the records in the SAVINGS ACCOUNT table by subtracting the DEBITS amount from the ACCOUNT BALANCE amount. The next part of the query reads: exec SQL COMMIT TRANSACTION ; Once the DQL transaction is completed, this statement commits the SQL transaction and releases the lock on the BARRIER FORM. At this point, other DataEase users can access the BARRIER FORM.

90

Help File

Caution Although the DQL transaction cannot be deadlocked by another DataEase user in the same application at this point, it may still be impossible to commit the transaction because a non DataEase user has locked the data, or the server is temporarily down, etc.

How to Produce Multiple Printouts of Each Record in a Report


Question How can I print several copies of each record in a report? For example, I frequently need to print three or four mailing labels for each person. Solution 1. 2. 3. 4. 5. Define a temporary variable to keep track of how many labels have been printed. Use a for command to open the primary table. Assign the temporary variable a starting value. This should be done within the for loop. Open a while loop within the for loop. This tells DataEase to continually loop through the list records command as many times as requested for each record processed. Use a list records command to list the desired fields. Reassign the temporary variable to increment as each interior looping action is completed.

Example define temp "KOUNT" Number . for MEMBERS ; assign temp KOUNT := 1 . while temp KOUNT <= 3 do list records FIRST NAME ; LAST NAME ; STREET ; CITY ; STATE ; ZIP . assign temp KOUNT := temp KOUNT + 1 . end --while end --for This example tells DataEase to: 1) define a temporary variable (temp KOUNT) that will be used as a counter. 2) Use a for command to open the members table. Since there is no selection criteria, process all the records. 3) Assign the temp KOUNT variable to one. Since the assign command is within the for loop, temp KOUNT is reassigned for each record processed. 4) Use a while looping command to check the value in temp KOUNT. As long as the count is less than four, continually loop through the list records command. 5) Each time a record is listed, increment temp KOUNT by one. When temp KOUNT reaches 4, exit the while loop and repeat the entire process for each successive record until all the records have been processed. Tip: Rather than hard code the number of times you want DataEase to loop through the list records, the value can be entered in a Dataentry form. The words DATAENTRY FIELDNAME would then replace the numeral 3 in the above example where fieldname represents the name of the Dataentry field. If you reverse the placement of the while and for commands in the above example, DataEase runs the entire report as many times as requested. This Solution has the same effect as requesting three copies of the report in the Windows Print dialog and checking the Collate Copies option. Caution To improve printing speed, whenever possible, avoid using the Collate Copies option in the Windows Print dialog. This is particularly important if your report output includes graphic elements.

How to Replace DQL Explicit Table and Field Locking Commands in a Procedure by Creating a Semaphore
Question Can I use DQL locking commands to lock data on my SQL engine? Solution The locking commands available in DQL control locking in native DataEase forms only. When used with SQL tables, the DQL locking commands are ignored. If there are multiple users accessing the same SQL tables, all required locks are placed by the SQL engine. There are no DataEase options or DQL commands that let you explicitly control the locks placed by the SQL engine. One way to lock a procedure for exclusive access is to define a semaphore. A semaphore is a flag used to regulate the number of users who can simultaneously access a network resource. The following Examples describe how you can define a semaphore that lets only one user at a time run a procedure. Example 1: Defining a DataEase-based Semaphore If the only users who can access the SQL tables in the application are DataEase users signed on to the same application, you can use a DataEase defined semaphore to lock a procedure for exclusive access. To define a DataEase-based semaphore:

91

Printed Documentation

1.

Define a native DataEase table. This table can have just one 1-character field.

2. Modify each procedure that you want to lock exclusively to include the following query statements: lock file NATIVEFORM exclusive. (Query statements for the procedure that you want to to lock exclusively) unlock file NATIVEFORM. (or end the procedure) Where NATIVEFORM is the native table you defined in Step 1. When you include the lock and unlock commands in the query, only one user at a time can execute the procedure. The first user who runs the procedure places an exclusive lock on the native DataEase table that you defined in Step 1. Any other users who try to run this procedure are locked out until the lock placed on NATIVEFORM is released (this happens when either the unlock command is executed or the procedure has finished running). Example 2: Defining an SQL Enginebased Semaphore If other DataEase applications and/or other frontend products will access the SQL tables in the current application, you must use an SQL enginedefined semaphore to lock a procedure for exclusive access. To define an SQL engine based semaphore: 1. Define an SQL table in a database that all users can access. Enter one row of data into the table. 2. Modify each procedure that you want to lock exclusively to include the following query statements: exec SQL BEGIN TRANSACTION ; exec SQL UPDATE TABLEA SET COLUMN1 = COLUMN1 + 1; (Query statements for the procedure that you want to to lock exclusively) exec SQL COMMIT TRANSACTION; Where TABLEA is the name of the SQL table you defined in Step 1 and COLUMN1 is a column in this table. When you include the exec SQL commands in the query, only one user at a time can execute the procedure. The first user who runs the procedure updates the single row in the SQL table that you defined in Step 1, thus locking the SQL table exclusively. Any other users who try to run this procedure are locked out until the exclusive lock on the table is released (this only happens when the COMMIT TRANSACTION command is issued to the server).

Reformatting a Report Output


When you alter the structure of a DQL report/procedure, it may be necessary to reformat the DQL Output. If so, you will be offered four choices, as shown below.

Option 1 Creates a New Layout, transferring only the Text and Field objects. This leaves you to recreate any fancy formatting that the original DQL output contained. Option 2 Creates a New Layout, transferring as many objects into it as possible. This includes Text and Field objects, plus items such as graphics. Option 3 Attempts to merge changes from a revised DQL back into the original format. However, if you have added new fields to the List Records, then these new fields are all automatically appended to the end of the procedure format which could be annoying, if you hadn't wanted half these fields to appear in the format at all, or wanted them to appear somewhere else. Option 4 Is very similar to Option 3, but works slightly differently. Any new fields added to the List Records statement will NOT be automatically appended at the end the format. Thus you are left to manually add in any new fields which you want included in the format.

92

Help File

How to Save a DQL Script as ASCII Text


1. 2. 3. Choose Script>>Save As File. DataEase displays the Save As File dialog. Specify a target drive and directory in which to save the file. Specify a name for the text file, then click OK. DataEase saves the file.

How to Sort the Values in a Choice Field


Question When I try to list a choice field in order, DataEase always lists the values in the order they were originally entered in the choice list. How can I sort the text value of the choice rather than the choice number? Solution Whenever you sort a choice list field, DataEase lists the values in order based on the number associated with the choice since the number is what is actually stored in the field. To list the values, you must use a predefined function to extract at least enough of the value to identify it uniquely: 1. 2. Under the list records command, use a function such as firstc or firstw to extract enough of the choice value to identify it uniquely. Sort the extracted value using in order, in groups, in groups with group totals, or in reverse.

Example for MEMBERS ; list records firstw (FAVORITE ACTIVITY, 1) in groups ; MEMBER ID ; LAST NAME . end This example tells DataEase to 1) process every record in the MEMBERS table. 2) Sort the records by the first word of text value of the choice. 3) List the FAVORITE ACTIVITY, MEMBER ID, and LAST NAME of each member. Discussion If the choice list contains lengthy values that are identical after a certain number of characters (e.g., XYZ Corporation, BBB and Sons Corporation, LMN & P Corporation), it may be more efficient to have DataEase sort just enough of the text string to identify it uniquely. For example, if the sample corporation names listed above constituted the entire list, the very first letter of each string is uniquely identifying. In such a case it is more efficient for DataEase to compare just the first character instead of the entire string. Tip: The easiest Solution to this problem is to enter the choices in alphabetic or numeric order when you first create the table. And then to maintain the order whenever the list is updated. Caution You must exercise extreme care when rearranging the choices in a preexisting choice list. Failure to update a choice list correctly can result in lost or corrupt data.

How to Specify an Explicit Inner Join in a DQL Procedure


Question Is there an easy way to force DataEase to perform an inner join when it would normally perform a left outer join? Solution When you write the script, create an ad-hoc relationship to select the related records. Name the relationship and precede the name with the keyword inner: as demonstrated in the following example. Example for MEMBERS ; list records any ACTIVITIES named "inner:favorites" with (ACTIVITY = MEMBERS FAVORITE ACTIVITY) ACTIVITY ; MEMBER ID ; LAST NAME . end This example tells DataEase to: 1) process all the MEMBERS records, but list the ACTIVITY, MEMBER ID and LAST NAME from only those MEMBERS records that have at least one related ACTIVITES record. Discussion Whenever a procedure requires data from two different database tables, DataEase temporarily joins (merges) the two tables. Tables can be joined by an outer join that selects all parent (Primary form) records and all child (related form) records or an inner join that selects only those parent records with at least one matching child record. By default, DataEase uses a left outer join to join two tables (selects all parent records regardless of whether any matching child records exist). To make DataEase use an inner join instead of a left outer join, simply insert the prefix inner: immediately before the unique relationship name following the named relational operator. Tip: As an alternative, you can specify inner: as a prefix in the Optional Relationship Name field on the Relationships form.

How to Use Indexes to Improve DQL Processing Speed

93

Printed Documentation

Question Will indexing the fields that I typically sort and use in selection criteria improve the processing speed of my scripts? Solution There is no simple yes or no answer to this Question, however, understanding how DataEase processes a procedure can help you optimize your scripts. This Tech Tip is tells you when and how DataEase uses a field's associated index file so you can make an informed decission as to when an index will speed (or perhaps slow) the processing time required to run each of your DQL Procedures. DataEase uses a three phase process to execute a procedure that contains a Processing command (e.g., list records, modify records):

A record selection phase - used only if there is selection criteria that includes an indexed field. A qualification phase - used when there is selection criteria and one or more fields are not indexed. A processing phase - used to process the data.

In a Processing procedure (one that includes a processing command), the processing phase is always used. Record selection and/or qualification are only used if the script includes a with statement. The availability and size of the indices in the selection criteria determine when and how DataEase processes a simple script. Lets begin by taking a sample script and looking at how DataEase will use any available indexes: Example for FAMILY MEMBERS with STATE = "CA" and AGE STATUS = "ADULT" ; list records FIRST NAME ; LAST NAME in order . end Example 1 Depending on which fields are indexed and their placement in the script, DataEase may or may not use an associated index file. Using just the selection criteria from the above example, lets take a look at each possibility: with STATE = "CA" and AGE STATUS = "ADULT" ; If both the STATE and AGE STATUS fields are indexed, DataEase will normally use both indices to generate an array of record numbers that meet each criterion. The arrays are then compared (in memory) for matching record numbers. Since this example uses an and operator, the intersection of the list is then processed by the list records portion of the script. Example 2 In the second scenario, we use the identical with clause except that the and operator is replaced with the or operator: with STATE = "CA" or AGE STATUS = "ADULT" ; Once again, if both fields are indexed, DataEase uses both indices to generate two arrays of record numbers that meet each criterion. Example 3 In the third scenario, using the and operator again, suppose the STATE field is indexed, but the AGE STATUS field is not: with STATE = "CA" and AGE STATUS = "ADULT" ; As before, DataEase will use the available index to generate an array of record numbers that meet the STATE = "CA" criterion. However, since the AGE STATUS field is not indexed, DataEase must qualify each of the records in the first array against the second criterion. Example 4 In the last scenario, suppose again that we are using the or operator and that the STATE field is indexed, the AGE STATUS field is not: with STATE = "CA" or AGE STATUS = "ADULT" ; In this scenario, DataEase does not use the index on the STATE field. Since every record in the FAMILY MEMBERS table must be qualified for the second criterion, there is no benefit in building an array of the matching STATE records. It is much faster for DataEase to qualify each record simultaneously for both criteria. Those records that qualify are passed on to the processing phase of the procedure. Discussion The order in which you list selection criteria can also have a dramatic impact on performance. If DataEase is going to use an index in selecting records, it automatically opens the index for first field listed after the with command. For example, in the following with statement: with STATE = "CA" and AGE STATUS = "adult" if both fields are indexed, DataEase automatically opens the STATE field's index and builds the array of matching record numbers. If the second criteria's array is determined to be at least four times greater than the first, (e.g., STATE = "CA" selects 1,000 records, while AGE STATUS = "ADULT" selects 6,000 records), DataEase does not take the time to build the second array and compare the arrays in memory. It is faster to simply qualify the first 1,000 records for the second criterion. If however, the order of the fields is reversed (e.g., AGE STATUS = "ADULT" and STATE = "CA"), DataEase automatically opens and uses the indexed on the AGE STATUS field, forcing the comparison of the two arrays in memory

94

Help File

and potentially slowing performance dramatically. Therefore, you should always list the fields in your selection criteria in order from most discriminating to least. Example 5 Now let's look at the orignal script and consider the use of indexes when you sort the procedure's output. for FAMILY MEMBERS with STATE = "CA" and AGE STATUS = "ADULT" ; list records FIRST NAME ; LAST NAME in order . end In this example, we list the LAST NAME field in order. If the LAST NAME field is indexed, DataEase will only use the index if an index was not used in the selection phase of processing (i.e., if neither the STATE field nor the AGE STATUS fields are indexed). If DataEase does use an index in selecting records, the index on the sorted field is not used. If DataEase can use an index for sorting the records, it will only use the index on the primary sort level. For example, in the script shown above, if the FIRST NAME field was also indexed and listed in order, DataEase would use the index on FIRST NAME and ignore the index on LAST NAME. Tip: Always index the match (key) fields in a relationship. Both the primary and foreign keys should be indexed. Caution Indexing a field like a YES/NO or another choice field with just two or three choices where either selection is likely to select a large percentage of the records in the file is a particularly ineffective use of an index. Indexes are most effective in improving DQL processing speed when they select a relatively small number of records.

How to Use Stored Procedures in a DQL Script


Question Since I am accessing data on Sybase SQL Server, there are a number of stored procedures I would like to be able to execute when I'm running a DQL Procedure. Is there an easy way to do that? Solution 1. Use the exec SQL command within your script to execute the required stored procedure. Example exec SQL EXECUTE ARCHIVE_OLD_MEMBERS WHERE EXPIRATION_DATE < ':current date"' ; This example tells DataEase to: 1) execute a stored procedure called ARCHIVE_OLD_MEMBERS. Discussion Some SQL engines, including Microsoft/Sybase SQL Server, let you define and save stored procedures (also called precompiled procedures). Stored procedures are collections of SQL statements that are compiled the first time they are executed and stored in a precompiled format so that subsequent executions of the procedure are very fast. If you are using DataEase with one of these engines, you can use the exec SQL command to run a stored procedure. Note: Since stored procedure execution is almost instantaneous, they are an ideal way to enhance performance. We strongly recommend that you use stored procedures whenever possible. To find out if your SQL engine supports stored procedures, see your DataEase Engine Information Guide and your SQL engine documentation. Tip: When you use the DataEase Backup Application and Restore Application menu options (or the equivalent DQL commands), DataEase only backs up the application definition files and data. Any stored procedures or other server operations associated with the application are not backed up. For this reason, we recommend that you define all the stored procedures, rules, etc. that your application requires as DQL Procedures (using the exec SQL command). Once these features exist as DQL Procedures, they will be backed up with the application and can be easily migrated to a different server or database. After you restore your application, you just have to run the appropriate DQL Procedures to recreate the performanceenhancing SQL features.

External Data
Objects>>OLE
Lets you create an OLE object. An OLE object is an object from another Windows application such as a chart created in Microsoft Excel that you embed onto a DataEase document. An OLE object lets you embed or copy (not link) an object from another Windows application such as a Bar, Pie, or 3D chart into a DataEase document using the Microsoft OLE (Object Linking and Embedding) protocol. A document that contains an OLE object is called a compound document. When you embed an object created in another Windows application, the object is stored as part of the DataEase document.

Overview of OLE Concepts


Object an entity that contains data from an external source application.

95

Printed Documentation

Client the application that receives and stores an OLE object. DataEase is an OLE client (e.g., when you embed a Microsoft Excel chart in a DataEase form, DataEase is the client application). Server the application that remotely creates, updates, and displays an object. For example, when you embed a Microsoft Excel chart in a DataEase document, Excel is the server (or source) application. DataEase is not an OLE server. Linking inserting a link into a DataEase document. When you link an object, DataEase references the information stored by the server application. Links are created using the Copy DDE Link button on the Create OLE Object dialog. Links are also created using the Paste Link and Paste Special options on the Edit menu. Embedding inserting a new or existing object into a DataEase document. When you embed an object, all the information normally stored by the server application is stored by DataEase. Differences Between Linking and Embedding The differences between linking and embedding an OLE object are summarized below:

Create an OLE Object


1. 2. 3. 4. Choose Objects>>OLE. DataEase displays the OLE cursor. Draw a rectangular OLE area in the Form object on the document. Click and drag the mouse on the document to mark the upper left and lower right corners of the OLE area. As you move the mouse, DataEase displays dashed lines that mark the OLE area border. When you release the mouse, DataEase displays the Insert OLE Object dialog. 5. Choose which object class you want to create. Then, click on Linked or Embedded and click OK. 6. DataEase opens the source application that contains the object type you selected. 7. Create a new object. If you chose Linked on the Create OLE Object dialog, you can open an existing object. 8. If you are creating a Linked object, choose File>>Save As from the source application's File menu. Then, press Alt+Tab one or more times to return to DataEase. 9. If you are creating an Embedded object, choose File>>Update from the source application's File menu. Then, choose File>>Exit to return to DataEase. 10. DataEase displays the OLE Paste Dialog. Click OK to paste the OLE object. DataEase displays the document and the Linked or Embedded object. NOTE: When you access a source application from DataEase via OLE, the source application's File>>Save option is replaced by File>>Update if you are embedding the object.

The Create OLE Object Dialog


Object Class tells DataEase what type (or class) of source object you want to link or embed in the current document. When you display the Create OLE Object dialog, DataEase lists all the OLE-aware applications available on your computer. A sample Object Class list is shown below. Choose: Excel Chart - to link or embed a Microsoft Excel chart. Excel Worksheet - to link or embed a spreadsheet created in Microsoft Excel. Package - to embed a package. A package is a custom-defined OLE object that invokes another OLE object, executable program, and/or command line from within a DataEase document. A package is represented by an icon or graphic. Paintbrush Picture - to link or embed a picture created in Microsoft Paintbrush. Sound - to play a sound file (if your computer has a multimedia sound adapter card). For example, you can digitize a spoken help message or other sound effect for your document. Linked lets you insert an existing object (that references the information stored by the server application) into a DataEase document. Copy DDE Link opens the Paste Special dialog. The Paste Special dialog lets you paste data (not visible in Designer View) or a link to another Windows product in a DataEase document. Embedded lets you insert a new or existing object (that tells DataEase to store the information normally stored by the server application) into a DataEase document. Adding Sound and Video to a DataEase Document To enhance your application with multimedia, DataEase lets you add pre-recorded sound and video clips to any form, report, procedure, or menu document. You can embed pre-recorded sound and video clips in two ways, by using either:

96

Help File

Window's built-in OLE capability. OLE displays the sound or video clip in a window with default controls. This method of adding multimedia to a DataEase document is explained on the following pages. A DataEase Custom-Defined Function (CDF). A CDF lets you hide the default OLE controls and create custom controls using DataEase buttons. Embedding Mutimedia in a DataEase Document You can easily enhance a document by adding a music, sound effect, or recorded speech sound clip saved as a waveform (.WAV) file, or by adding a full-motion video clip saved as an audio/video (.AVI) file. Try recording a help message as a .WAV sound file instead of displaying a form or field help messages on the screen. Similarly, you can annotate a report to clarify the importance of the newly generated data. System Requirements To embed a sound (.WAV) file in a document using OLE, you must have Windows Sound Recorder or Media Player installed on your computer. To play a sound file, you must have a Windows-compatible sound card or a speaker driver such as Microsoft's SPEAKER.DRV file installed on your computer. To embed an OLE video (.AVI) clip in a document, you must have both Video for Windows and Media Player installed on your computer. See your Windows documentation for information on installing the Windows Sound Recorder and Media Player applications.

How to Play an Embedded Sound Clip in User View


To listen to a sound clip embedded in a DataEase document, double-click on the Sound Recorder microphone object. DataEase plays the .WAV file associated with the current record.

How to Play an Embedded Video Clip


1. 2. To play a video embedded in a DataEase document, double-click on video window. DataEase plays the .AVI file associated with the current record. Using OLE, you can embed a sound (.WAV) file in a DataEase document. The steps below describe how to add a help message to the ACTIVITIES form.

How to Add a Sound Clip to a Document


1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Without exiting DataEase, switch to the Windows Program Manager by pressing the Alt+Tab one or more times. Start the Windows Sound Recorder application by double-clicking on the Sound Recorder icon (which should be located in the Accessories group). Sound Recorder opens. Choose File>>Open from the Sound Recorder File menu. Sound Recorder displays the Open dialog. Locate the C:\DFW\CLUB directory and highlight the ACTHELP.WAV file. Click OK to load the .WAV file. Choose Edit>>Copy to copy the .WAV file to the clipboard. Return to the DataEase ACTIVITIES form by pressing Alt+Tab one or more times. Switch to Designer View by clicking the Designer View button on the Toolbar. Choose Edit>>Paste to paste the sound file into the ACTIVITIES form. DataEase displays the hand pointer. Click and drag to position the sound object above the Activity picture. DataEase pastes the Sound Recorder microphone icon into the ACTIVITIES form to indicate the presence of an embedded sound file. Using OLE, you can embed a video (.AVI) file in a DataEase document. The steps below describe how to add a resort's promotional video to the CLUBS form.

How to Add a Video Clip to a Document


1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Without exiting DataEase, switch to the Windows Program Manager by pressing the Alt+Tab one or more times. Start the Windows Media Player application by double-clicking on the Media Player icon (which should be located in the Accessories group). Media Player opens. Choose File>>Open from the Media Player File menu. Media Player displays the Open dialog. Locate the C:\DFW\CLUB directory and highlight the BORABORA.AVI file. Click OK to load the .AVI file. Choose Edit>>Copy Object to copy the .AVI file to the clipboard. Return to the DataEase CLUBS form by pressing Alt+Tab one or more times. Switch to Designer View by clicking the Designer View button on the Toolbar. Choose Edit>>Paste to paste the video file into the CLUBS form. DataEase displays the hand pointer. Click and drag to position the video object above the club name. DataEase pastes the video, paused at the first frame, into the CLUBS form, to indicate the presence of an embedded video file.

Working with Links

How to Change the Update Method for a Link

97

Printed Documentation

1. 2. 3. 4. 5. 6.

Choose Edit>>Links. DataEase opens the Links dialog. Click on the link in the Links list box that you want to change. DataEase highlights the selected link in reverse. Click on one of the following radio buttons: Automatic to update the link information displayed in DataEase whenever a change is made to the source file. Manual to update the information only when you click the Update Now button. Click OK to close the dialog.

How to Update a Manual Link


1. 2. 3. 4. Choose Edit>>Links. DataEase opens the Links dialog. Click on the link in the Links list box that you want to update. DataEase highlights the selected link in reverse. Click on the Update Now button. DataEase updates information for the highlighted link with the current data from the source application. Click OK to close the dialog.

How to Break a Link


1. 2. 3. Choose Edit>>Links. DataEase opens the Links dialog. Click on the link in the Links list box that you want to delete. DataEase highlights the selected link in reverse. Click on the Cancel Link button. DataEase removes the selected link from the Links list box, permanently breaks the connection from the original file, and changes the linked object in the DataEase document to a static image (i.e., it cannot be modified). Click OK to close the dialog.

4.

How to Repair a Broken Link


1. 2. 3. 4. 5. Choose Edit>>Links. DataEase opens the Links dialog. Click on the link in the Links list box that you want to restore. DataEase highlights the selected link in reverse. Click on the Change Link button. DataEase opens the Change Link dialog. Choose the drive, directory, type of file, and filename of the file that now contains the linked information. Click OK to close the dialog.

Change the Format of Inserted Data

How to Change the Format of Data Inserted in a Document from Another Program
1. 2. 3. 4. 5. With the data you want to insert stored in the clipboard, choose Edit>>Paste Special. DataEase opens the Paste Special dialog. Click on the format that you want from the Data Type list box (e.g., Bitmap). This list varies depending on the source of the data in the clipboard. To insert the data as a new Document object, click: Paste to insert the data in the DataEase document exactly as it appears in the original file at the time you paste it. This object does not change when the data in the original document changes. Paste Link to insert the data in the DataEase document as a link to the data that appears in the original document.

Client Server Terms

Using Foreign Data Sources In User View


Using ODBC drivers, DataEase makes it easy to access data stored in SQL tables and other popular data formats such as Microsoft/Sybase SQL Server, Oracle Server, IBM DB2, and Access. In User View, you can interact with foreign data in easy-to-use DataEase forms and reports at a PC (called a client or front-end machine) while the database engine (called the server or back-end machine) stores and processes the data. The database table(s) an application references may reside on multiple database servers, even servers of different database engine types. DataEase transparently accesses information in various tables on multiple servers - you don't need to know the actual location of the tables. The table below summarizes some special terms used in the documentation related to running DataEase in a Clientserver environment.

98

Help File

Using predefined Imports How to Create and Run a Predefined Import


1. 2. 3. 4. 5. 6. 7. 8. Define a destination form and table (if they do not already exist). Open the destination table in User View. Choose File>>Import. DataEase displays the Import Data dialog. Choose the Import file format. Specify the path and filename of the source file. If the source file is stored in the application directory, you don't need to specify a path. You can click on the Browse button to search for the source file. Specify whether the source data is organized by Field Name or Field Order. If the source file includes field names in the first record, accept Field Name (the default). If the first record contains data values, select Field Order. When you import records organized by Field Order, fields in the source file must appear in the same sequence as in the destination table. Specify which characters are used as field and record separators (for Variable Length Text format only).

9.

10. To specify the character used to separate fields or records, choose the appropriate character from the Field Separator or Record Separator drop-down list in the Import Data dialog. If the appropriate character does not appear on the list, select Other, then type the character in the entry box. 11. Click Save. DataEase displays the Save Predefined Import dialog. 12. In the Import File box, enter a name of up to eight characters and click OK. DataEase names the predefined import and returns you to the Import Data dialog. 13. Click Run. DataEase imports the records and displays the progress of the import in the Status Bar.

99

Printed Documentation

NOTE: To open a predefined import, click Open. In the Open Predefined Import dialog, select the predefined import name and click OK. To save a predefined import with a new name, click Save As . In the Save As Predefined Import dialog, enter the new name for the import, and click OK. To delete a predefined import, click Delete. In the Delete Predefined Import dialog, select the predefined import name and click OK.

The Server Batch Facility


The server batch facility is an SQL engine feature that is used to insert a group of records into a table in a single step, rather than one at a time, greatly reducing the time it takes to perform an import. If you are importing data into a form that defines or uses an SQL table, DataEase replaces the Lock Destination Table During Import option in the Import Data dialog with the Use Server Batch Facility option, as described below. If your server supports the DataEase server batch facility and you import records with this option selected, DataEase copies a batch of records into memory. If no invalid data is discovered, the entire batch is entered as a unit. If any records in the batch are invalid, DataEase retrieves the entire batch, and inserts the records into the destination table one at a time, discarding the invalid records in the process. Discarded records are noted in the Exception file. When all records for the first batch have been inserted, DataEase processes the next batch of records. NOTE: When DataEase inserts records one at a time, each INSERT statement is treated as a separate transaction. Customizing the Batch Size The default batch size depends on your database engine type. You can customize the batch size by modifying the database engine IN file (e.g., DESYBASE.INI, DEDB2.INI, etc.) in your DataEase System directory. For example, the DESYBASE.INI file contains the lines: ADD_BATCH_SIZE=50UPDATE_BATCH_SIZE=25 where 50 records is the default batch size if you choose the Import New (Unique) Records option, and 25 records is the default batch size if you choose the All Records option. How Changes in the Batch Size Affect Performance If you change the value of ADD_BATCH_SIZE in the database engine INI file, the modification also affects the batch size used by restore, data transfer, and form modification operations in all your applications that use that SQL engine. If you import a large amount of data, you can increase the batch size to speed up import. However, if one record in the batch fails, DataEase retrieves the entire batch and inserts each record individually. If this happens, you may notice a drop in performance. NOTE: Because each batch of records is stored in memory, increasing the batch size may cause an out of memory error.

Installation Command Files

Creating An Installation Command File


When you choose Application>>Utilities>>Install, DataEase displays the Install dialog, which lets you install documents using an Installation Command File. The Installation Command file tells DataEase which document(s) to install into the current application. To install documents using the Installation Command File, click the Install From Command File radio button. You can create an Installation Command file in an ASCII text editor, such as Windows Notepad. To tell DataEase which documents to install in the current application, you type commands in the Installation Command file. These commands include the document filename and the complete DataEase- assigned DOS filename for each document. DataEase automatically assigns a filename extension to each document depending its type. For example, DataEase assigns the DOS filename extension .FRM to a form definition. Therefore, the DOS filename DataEase assigns to the MEMBERS form in Club ParaDEASE is MEMBERS.FRM. DataEase assigns the filename extension .TDF to tables, .DBM to data files, and .DBI to imports. You can use any combination of the commands in the table below to create an Installation Command file in an ASCII text editor. The Installation Command file you create can contain as many commands as you require. A command can occupy more than one line, and a line can contain more than one command. After you complete the Installation Command file, save it with the filename extension .DIW. You can use any combination of the commands in the following table to create an Installation Command File. Installation Command File Commands To.. Install a document that uses a table Install a document that defines a table Install a document that defines a table and the data associated with the table Install additional data, such as Relationships, User data, and Custom Functions Enter this command in the file... install <document name> from: <DOS filename.FRM> install <document name> from: <DOS filename.FRM> table: <dos filename.TDF> ; install <document name> from: <DOS filename.FRM> table: <DOS filename.TDF data: <DOS filename.DBM> ; install <system filename> from: <DOS filename.DBM> ; Example install MEMBERS from: MEMBCAAA.FRM ; install MEMBERS from: MEMBCAAA.FRM table: MEMBCAAA.TDF ; install MEMBERS from: MEMBCAAA.FRM table: MEMBCAAA.TDF data: MEMBCAAA.DBM ; install Relationships from: RELACAAA.DBM ;

100

Help File

Replace a document in the current application with a new version.

Replace <document name> from: <DOS filename.FRM> ;

replace MEMBERS from: MEMBCAAA.FRM ;

Note: The .FRM file in the replace statement must have the same filename as the .FRM file that you want to replace (with the exception of the fifth letter in the filename). Replace a document and table in the current application with a new version. Replace a document, table and data in the current application with a new version. Replace data, such as Relationships, User data, and Custom Functions in the current application Add remarks to a command file Replace <document name> from: <DOS filename.FRM> table: <DOSfilename.TDF> ; Replace <document name> from: <DOS filename.FRM> table <DOS filename.TDF> data: <DOS filename.DBM> ; replace <table name> data: <DOS filename.DBM> ; replace MEMBERS from: MEMBCAAA.FRM table: MEMBCAAA.TDF ; replace MEMBERS from: MEMBCAAA.FRM table: MEMBCAAA.TDF data: MEMBCAAA.DBM ; replace RELATIONSHIPS data: RELACAAA.DBM ;

Note: The .DBM file in the replace statement must have the same filename as the .DBM file that you want to replace. REM <enter any text here> REM This Installation Command File REM installs the MEMBERS form into REM the current application.

How to Install a Single Document


1. 2. 3. 4. 5. Choose Application>>Utilities>>Install. Choose the install type option, Single Document. Click the FRM Browse button. DataEase displays the Document File dialog, which lets you search for the document you want to install. DataEase also lets you manually enter the filename and pathname in the Document File Name (FRM) box. In the Document File dialog, select the file you want to install and click OK. DataEase enters the document name in the Document File Name (.FRM) text box. If the form defines a table, DataEase enters the table name in the Table Definition File Name (.TDF) text box. To include data files with the form and table, check Include Data for Table. DataEase automatically displays the data file name in the Data File Name (.DBM) text box. To store the system messages in a file, check Log Messages to File. Click OK. DataEase installs the selected document and displays the Install Finished dialog. Click Yes to view the Log file, or click No to close the dialog.

6. 7. 8.

How to Create and Run an Installation Command File


1. 2. 3. 4. 5. 6. 7. 8. 9. Open an ASCII text editor, such as Windows Notepad. Enter the commands you require for the installation. Refer to the Installation Command File commands table shown earlier in this chapter. Save the file in the ASCII text editor with the filename extension .DIW. To execute the file in DataEase, choose Application>>Utilities>>Install. DataEase displays the Install dialog. Choose the install type Install From Command File. DataEase displays the Command File Name (DIW) text box and the DIW Browse button. Click the DIW Browse button. DataEase displays the Script File dialog which lets you search for and select the Installation Command file you want to install. Select the Installation Command filename and click OK. DataEase also lets you enter the command filename and pathname manually in the Command File Name (DIW) text box. To store system messages in a file, check Log Messages to File.

10. Click OK in the Install dialog. DataEase installs and/or updates the documents specified in the command file. NOTE: As you create the Installation Command file, be sure to insert a space after each colon and before each semicolon.

DataEase Forms and Tables


In DataEase, a form consists of three parts. The table below summarizes each of the three form components.

101

Printed Documentation

Delete Permission
To delete a record in a form that defines or uses a foreign table, you must have DELETE permission on the corresponding table. When you choose Edit>>Delete to delete a record in a form that defines or uses a foreign table, it is permanently removed from disk. When you choose Edit>>Delete to delete a record in a form that defines or uses a foreign table and no Unique fields are defined on the form, DataEase displays the Deleting Multiple Records Alert dialog if at least one record in the form is identical to the record on the screen. When you click OK, all the records that match the one on the screen are deleted. NOTE: There should always be at least one Unique field on each form to avoid duplication of data. If you encounter the dialog displayed above, notify your system administrator. You cannot recover a deleted record in a form that defines or uses a foreign table. If you inadvertently delete a record in an SQL table, it must be re-entered.

Deleting Records In A Multiform


When you try to delete a record in a Multiform, DataEase asks you to specify exactly what you want to delete by selecting one of several choices. The choices DataEase displays (see below) differ depending on which referential integrity option is specified on the Relationships System form and whether the cursor is in the Main form or a Subform when you choose Edit>>Delete Record. If the referential integrity option specified on the Relationships System form is Server C or Server SN, and the cursor is in the Main form when you choose Edit>>Delete Record, DataEase displays the Delete Record dialog. If you choose Cancel, no records are deleted. If you select OK, DataEase deletes the Main form record. The referential integrity option specified on the server regulates whether the Subform records are deleted, set to null (blanked), or maintained.

If the referential integrity option specified on the Relationships System form is Server C or Server SN, and the cursor is in the Subform when you choose Edit>>Delete Record, DataEase displays the Delete Record dialog. If you select Cancel, no records are deleted. If you choose Main Form (only), DataEase deletes the Main form record and the effect on Subform records is regulated by the referential integrity option specified on the server. If you choose Subform (only), DataEase deletes the current Subform record (only) and leaves the record in the Main form intact.

102

Help File

NOTE: If the referential integrity option specified on the Relationships form is Server C or Server SN, the foreign engine, not DataEase, is responsible for enforcing referential integrity.

Recovering A Deleted Record


When you delete a record in a form that defines or uses a foreign table, the record is removed from disk and cannot be recovered unless the following conditions are met:

The form is displayed in Table View.

You have not pressed Edit>>Save As New Record or Edit>>Save. To recover a deleted record under these conditions, move the cursor to the deleted record and choose Edit>>Restore Record. You can use the same procedure to recover a record deleted from the Main form in a Multiform.
NOTE: The Subform and its nested Subforms option is only available when the subform in focus contains a nested Subform. When the data is being accessed on a foreign database engine, the foreign engine is responsible for maintaining referential integrity.

Displaying SQL Commands


When you select View>>Generated SQL, DataEase displays the automatically generated SQL statements that correspond to the current operation. For example, DataEase automatically generates SQL statements when you insert, update, or delete a record, search for a record, add a user, or create or modify a table.

How to Display SQL Commands


1. 2. Choose View>>Generated SQL. Each time you perform an action, DataEase displays the corresponding SQL command in the SQL Syntax dialog in the middle of the active window. Click OK to close the SQL Syntax dialog.

NOTE: DataEase only displays Generated SQL when it is running in a Client-server environment.

Exporting Data

How to Export Data


1. 2. 3. 4. Open the form or table that contains the records you want to export in User View. Use QBF or QBM to enter selection criteria to filter the records to be exported. Choose File>>Export. DataEase opens the Export Data dialog. Select an Export Format Type (Variable Length Text, Fixed Length Text, or Lotus 1-2-3). Type an Export File Name including the drive letter and directory path. Optionally, you can choose the Browse button to search your directory structure for a previously defined export file. Check the Include Field Names checkbox if you want to include the name of each selected field as the first record in the export file. Choose a Field Separator character from the drop-down list, or choose other and type the desired character in the entry box. Be sure to select a character that does not appear in the data. This option is only available if you choose the Variable Length Text export format. Choose a Record Separator character, or choose other and enter a character that doesn't appear on the list. Be sure to select a character that does not appear in the data. This option is only available if you choose the Variable Length Text export format. Click the Options button to expand the dialog, then choose the name of the Table that contains the records you want to export. If the target program requires a special Text Delimiter in addition to the Record Separator, choose one from the drop-down list or choose other and enter another character. Choose which records (Selected Records) to include in the export file (Current, All, or Range). If you choose Range, enter the first and last record numbers in the Selection Boxes below.

NOTE: The remaining steps are optional. 5. 6.

7.

8.

9.

10. Remove any Selected Fields that are not required for the export. Click OK. After DataEase closes the Export Data dialog, it immediately begins creating the export file. While this process is taking place, DataEase displays a message box that tracks the progress of the export. Click the Cancel button or press Escape to abort the export process.

Saving and Loading Export Definitions


Export Definitions created by the File>>Export option can be saved as .dbe files, and these files can be reloaded and run whenever you wish. In the example shown below, we save a new Export as "MyOtherExport.dbe".

103

Printed Documentation

By selecting the Load option from the Export dialog box, we can select and reload any previously defined export.

How DataEase Security Levels Affect Record Entry


To perform Record Entry operations on a form that defines or uses a foreign table, you must have the required user permissions on the SQL table in addition to the appropriate DataEase security level.

NOTE: If you try to perform a Record Entry function (e.g., view, save, modify or delete a record) without the appropriate DataEase security level or SQL user permission, DataEase displays an error message. To run a procedure that installs an application, you must have CREATE TABLE privileges on the server. See your system administrator to obtain the required user permissions.

How Field Characteristics Affect Record Entry


The table below summarizes how the field characteristics assigned to a field affect record entry in a foreign table. Record Entry and Field Characteristics

104

Help File

Field Type/ Characteristic Text Required

Effect When Data is Stored in a Native Table Wild card (*, ?, and ~) characters should never be entered as data. Data must be entered in all Required fields to save a record.

Effect When Data Is Stored in a Foreign Table Wild card characters (*, ?, and ~) are acceptable data values in an SQL table. Data must be entered in all the NOT NULL (Required) fields to save a record. When you create a form over an existing table, all NOT NULL columns in the database table must be included in the form. In an SQL table, records are stored in order by the clustered index which is comprised of all the Unique fields.

Unique

The combined data in all Unique fields cannot be duplicated in an existing record. If DataEase finds a duplicate record, the new record cannot be saved. When you choose Edit>>Save or Edit>>Save as New Record on a record with invalid values, DataEase displays an error message. The value(s) must be corrected before you can save or modify the record.

Validation Formula

A DataEase Validation Formula, which restricts the values that you can enter into a field to a specific range, are not enforced by the server. If the data is modified by another product, you may see values displayed that violate the range limit.

NOTE: When you enter (or modify) a record in a form that defines or uses a foreign table, and no Unique fields are defined on the form, the foreign engine is solely responsible for the way in which records are ordered.

Importing Data into a Table

How to Import Data into a DataEase Table


1. 2. 3. 4. 5. 6. 7. 8. Define a destination form and table (if they do not already exist). Open the destination table in User View. Choose File>>Import. DataEase displays the Import Data dialog. Choose the Import file format. Specify the path and filename of the source file. If the source file is stored in the application directory, you don't need to specify a path. You can click on the Browse button to search for the source file. Specify whether the source data is organized by Field Name or Field Order. If the source file includes field names in the first record, accept Field Name (the default). If the first record contains data values, select Field Order. When you import records organized by Field Order, fields in the source file must appear in the same sequence as in the destination table. Specify which characters are used as field and record separators (for Variable Length Text format only).

9.

10. To specify the character used to separate fields or records, choose the appropriate character from the Field Separator or Record Separator drop-down list in the Import Data dialog. If the appropriate character does not appear on the list, select Other, then type the character in the entry box. 11. Click Run. DataEase closes the Import Data dialog, imports the records, and displays the progress of the import in the Status Bar. NOTE: Once you click Run, you cannot cancel or abort an import.

Install a Single Document

How to Install a Single Document


1. 2. 3. 4. 5. Choose Application>>Utilities>>Install. Choose the install type option, Single Document. Click the FRM Browse button. DataEase displays the Document File dialog, which lets you search for the document you want to install. DataEase also lets you manually enter the filename and pathname in the Document File Name (FRM) box. In the Document File dialog, select the file you want to install and click OK. DataEase enters the document name in the Document File Name (.FRM) text box. If the form defines a table, DataEase enters the table name in the Table Definition File Name (.TDF) text box. To include data files with the form and table, check Include Data for Table. DataEase automatically displays the data file name in the Data File Name (.DBM) text box. To store the system messages in a file, check Log Messages to File. Click OK. DataEase installs the selected document and displays the Install Finished dialog. Click Yes to view the Log file, or click No to close the dialog.

6. 7. 8.

Database Links

105

Printed Documentation

Opens the Add Database Connection dialog. This dialog is used to link your application to an external database on a database server to which your computer is physically connected. NOTE: If you select ODBC as the Engine Type to access dBASE or Paradox files, DataEase displays another dialog that lets you specify the Drive and Directory where the database files are stored. The new dialog replaces the Server and Database Name, which are not necessary. When you open an application to create a database link, you must sign on with a User Name that is also a valid Login Name on the server. Client-server Architecture Structured Query Language (SQL) is used as a common intermediary language in the Client-server environment making it possible for desktop applications (like those you create with DataEase) to manipulate mainframe, mini, and local PC databases. DataEase lets you link an SQL database of several supported engine types or a foreign database such as a dBASE or Paradox to your application. A foreign database is created in a database management system other than DataEase.

Sql Database Link Requirements


Before you can link an SQL database to your application you must:

Sign on to your application with a DataEase User Name that also exists as a valid Login Name on the SQL server such as SA (an acronym for System Administrator). Know the database engine type, the name of the server that stores or accesses the database, and the name of the database.

Foreign Database Link Requirements


DataEase uses a driver called ODBC (Open Database Connectivity) to translate dBASE and Paradox databases. Before you link a foreign database to your application, you need to know the directory location of the database files you want to access.

The Database Links Dialog


Link Name lets you assign an alias to the database. The Link Name is used to refer to the database from within your application. You may want to use the actual database name as specified on the server or a more descriptive name. NOTE: The Link Name is shared by all DataEase workstations that use the application. TIP:If databases on two servers use the same name, use Link Name to assign different names for use within your application. After you enter the Link Name, DataEase automatically enters that name in the Database Name text box. When you link a database to your application, DataEase stores the names of all the database tables in the application. Because DataEase does not have to log onto the server to generate this information, the information displays quickly in the Catalog. Engine Type tells DataEase the database engine type of the database you want to link to your application. When you click on the Engine Type combo box, DataEase lists all the types supported by DataEase. Choose one of the listed database engine types (e.g., SQL Server, ORACLE, or ODBC). If you are linking to a dBASE or Paradox database, choose ODBC as the engine type. Server or Directory tells DataEase the name of the server or directory that stores the database you want to link to your application. If you are linking to an SQL database type the name of the server that stores or accesses the database. The server is the computer running the specified database engine software. For example, the data the Club's Sales and Reservations staff uses is stored on a minicomputer recognized on the network as the Finance server. Club developers specify Finance as the server for DataEase. Database Name tells DataEase the name of an existing database you want to link to your application. Type the name of a database that exists on the specified server. Table List lists all tables in a linked database. To view the list for a database link, double-click on the Link Name. Add saves the link from a DataEase application to the external database you specify using the controls located above the buttons in the dialog. When you add a new database link, DataEase displays the following messages:

Loading Database Engine Driver... Logging on to the server Server Name...

Opening the database Database Name... where Database Engine, Server Name, and Database Name are the values from your system. When you add a link, DataEase automatically lists the tables in the specified database in the Table List box.

106

Help File

Refresh updates the list of tables and synchronizes each table with the table definition on the server. You must refresh the database link if any table is modified by another front-end product or another DataEase application. To refresh a database, double-click on the Link Name and click Refresh. When DataEase displays an alert message, click OK. Delete removes a database link from your application. To delete a database link, double-click on the Link Name and click Delete. Rename lets you change the Link Name for an external database. When you click Rename, DataEase displays the Rename Database Link dialog shown below.

The Rename Link Dialog


Rename Connection displays the name of the chosen database link. To tells DataEase the new name for the link.

How to Link a Database to an Application


1. 2. 3. 4. 5. Choose Application>>Database Links. DataEase opens the Database Links dialog. In the Link Name combo box, type the name you want to refer to the database by from within your application. When you click on the Engine Type combo box, DataEase lists supported types. Choose an Engine Type (e.g., SQL Server, ORACLE, or DB2 Gateway). Type the name of the server (e.g., Server1) in the Server or Directory text box. Click Database Name and type the name of a database that exists on the specified server.

To be sure you specify the right database, scroll through the table names listed in the Table List box. Link a Document to other applications

Paste Link
Inserts the clipboard's contents at the cursor's position in the active document as a link. A link displays an image of the original file in DataEase. The actual data or image remains in its original file (e.g., Microsoft Word for Windows document, Lotus 1-2-3 for Windows spreadsheet, etc.). Whenever the data in the original file changes, the image of the file changes in DataEase. If multiple objects are stored in the clipboard, each object is pasted in the same relative position as it was in the original document.

How to Link Another Windows Application and a DataEase Document


1. 2. 3. In the other Windows program, select all or part of the document you want to place in DataEase. Copy the data using the other program's Copy command. (Do not choose Cut.) Open the DataEase document in which you want to place the data in Designer View, and choose Edit>>Paste Link. DataEase displays the hand pointer, which lets you draw an area on the DataEase document to paste the link to the original document. Position the mouse where you want the upper left corner of the linked object to appear and click to paste it into the DataEase document.

4.

Database Links Dialog

The Database Links Dialog


Link Name lets you assign an alias to the database. The Link Name is used to refer to the database from within your application. You may want to use the actual database name as specified on the server or a more descriptive name. NOTE: The Link Name is shared by all DataEase workstations that use the application. TIP: If databases on two servers use the same name, use Link Name to assign different names for use within your application. After you enter the Link Name, DataEase automatically enters that name in the Database Name text box. When you link a database to your application, DataEase stores the names of all the database tables in the application. Because DataEase does not have to log onto the server to generate this information, the information displays quickly in the Catalog. Engine Type tells DataEase the database engine type of the database you want to link to your application.

107

Printed Documentation

When you click on the Engine Type combo box, DataEase lists all the types supported by DataEase. Choose one of the listed database engine types (e.g., SQL Server, ORACLE, or ODBC). If you are linking to a dBASE or Paradox database, choose ODBC as the engine type. Server or Directory tells DataEase the name of the server or directory that stores the database you want to link to your application. If you are linking to an SQL database type the name of the server that stores or accesses the database. The server is the computer running the specified database engine software. For example, the data the Club's Sales and Reservations staff uses is stored on a minicomputer recognized on the network as the Finance server. Club developers specify Finance as the server for DataEase. Database Name tells DataEase the name of an existing database you want to link to your application. Type the name of a database that exists on the specified server. Table List lists all tables in a linked database. To view the list for a database link, double-click on the Link Name. Add saves the link from a DataEase application to the external database you specify using the controls located above the buttons in the dialog. When you add a new database link, DataEase displays the following messages:

Loading Database Engine Driver... Logging on to the server Server Name...

Opening the database Database Name... where Database Engine, Server Name, and Database Name are the values from your system. When you add a link, DataEase automatically lists the tables in the specified database in the Table List box.
Refresh updates the list of tables and synchronizes each table with the table definition on the server. You must refresh the database link if any table is modified by another front-end product or another DataEase application. To refresh a database, double-click on the Link Name and click Refresh. When DataEase displays an alert message, click OK. Delete removes a database link from your application. To delete a database link, double-click on the Link Name and click Delete. Rename lets you change the Link Name for an external database. When you click Rename, DataEase displays the Rename Database Link dialog shown below. #

The Rename Link Dialog


Rename Connection displays the name of the chosen database link. To tells DataEase the new name for the link.

How to Link a Database to an Application


1. 2. 3. 4. 5. Choose Application>>Database Links. DataEase opens the Database Links dialog. In the Link Name combo box, type the name you want to refer to the database by from within your application. When you click on the Engine Type combo box, DataEase lists supported types. Choose an Engine Type (e.g., SQL Server, ORACLE, or DB2 Gateway). Type the name of the server (e.g., Server1) in the Server or Directory text box. Click Database Name and type the name of a database that exists on the specified server.

To be sure you specify the right database, scroll through the table names listed in the Table List box.

Opening an Application
The sign on process for DataEase is the same whether or not your application provides access to a foreign engine. The first time you access the foreign engine, DataEase automatically tries to log you on, using the same User Name and Password you enter to sign on to the application. If your User Name and Password are not valid on the server, DataEase displays the Foreign Engine Login dialog. If DataEase displays this dialog when you try to open a document, simply enter a valid User Name and Password and click OK. If you haven't been assigned a valid User Name and Password that lets you log on to a foreign database you need to access, see your system administrator.

Record Entry

108

Help File

User View is used to enter, modify, or delete the records in a DataEase form. Once your data is entered into a form, you can easily locate specific information, generate printed reports, and take advantage of all the data integrity and performance benefits that Client-server architecture provides. Except as detailed in this appendix, you perform Record Entry functions in the same way in DataEase whether you're connected to a foreign database or not.

Types Of Record Entry Forms


Because DataEase documents can access data stored in either a network or local directory or in a foreign database, these documents are divided into two types:

Native DataEase form, which stores data on a local hard drive or a network file server.

A form that defines or uses a foreign table, which stores data on a foreign database engine. Several record entry functions (e.g., viewing, modifying, and deleting records) behave differently depending on the type of form you are using. The remainder of this chapter explains the differences in record entry when you access a foreign database.
NOTE: DataEase reports can use native and/or foreign data tables, but a report can never define a table.

Record Entry Transactions


A transaction is any number of actions that should be treated as an indivisible unit of work performed on the data in an application, such as ensuring that DataEase reserves lodging for every person entered in the same record in the RESERVATIONS form. When you are performing Record Entry operations on a form that defines or uses a foreign table, DataEase divides the work into transactions as explained below:

If the form is not a Multiform, each record that is saved, modified, or deleted is treated as a separate transaction.

If the form is a Multiform, DataEase treats saving, modifying, or deleting a Main form record and all its related Subform records as a single transaction. Most SQL engines support a more advanced concept of transaction processing that guarantees that the entire transaction is completed before it is committed. If any portion of the transaction fails, the entire transaction is rolled back so that no data is changed. The steps that begin and end a transaction are specified on the server. NOTE: Future versions of DataEase will support the use of the exec SQL statement. This type of advanced DQL feature lets you use commit and rollback commands from within DataEase to control exactly what constitutes a transaction. If you are using the DataEase character-based version and DataEase as interoperable front-end tools, you can use the exec SQL command in the character-based version to control transaction processing.

Multi-User Options
Lets you override the default Record Entry locking rules and refresh the screen for the document currently in use. When you choose Edit>>Multi-User Options, DataEase opens the Multi-User Options cascade menu.

How Dataease Controls Record Access


When you use DataEase in a network environment, multiple users can access the same data. As you view data, other users may be modifying or deleting the same data. To preserve data integrity and to prevent multiple users from viewing or modifying the same records, the System Administrator defines default locking rules for the application in the Application Preferences dialog. These locking rules control how many users can simultaneously access a record or table. In most cases, the default locking rules the System Administrator chooses are sufficient for the database. You should not try to override the default locking rules unless you are thoroughly familiar with network environments. What Happens When a Record or Table is Locked? In some instances, a record or table may be exclusively locked to prevent multiple users from viewing or modifying the same data. If a record is in use (or locked) and you try to access the record, DataEase displays a Resource Conflict message, which tells you that the resource is not available. The messages, such as the one described below, vary slightly depending on the type of resource DataEase is trying to access. DataEase tries to access the resource every five seconds and indicates the number of attempts in the message box. When the resource becomes available, the message box disappears and DataEase resumes processing. To abort the transaction, you can click Cancel. If you cannot abort the transaction without jeopardizing data integrity, DataEase does not display a Cancel button in the Resource Conflict message box.

How to Regulate Record Access in a Multi-User Environment


1. 2. Choose Edit>>Multi-User Options>>All Record Access to remove any Record Entry locks on the document. Other users can view, modify, or delete the record(s) you are viewing. Choose Edit>>Multi-User Options>>Read Record Access to place a shared lock on the records in the document. Other users can view the record(s) you are viewing but cannot modify or delete these records until you release them. Choose Edit>>Multi-User Options>>No Record Access to place an exclusive lock on the records in the document. Other users cannot view, modify, or delete any record you are viewing.

3.

109

Printed Documentation

NOTE: If you follow the above steps in Table View, DataEase applies the locking rule to all records in the table, not just the records you are viewing.

How to Refresh the Current Record


1. 2. 3. Choose Edit>>Multi-User Options>>Refresh to update the on screen record(s) with the latest changes saved to disk. Choose Edit>>Multi-User Options>>Continuous Refresh to automatically refresh the record(s) on the screen every two seconds. To change refresh interval, choose Edit>>Multi-User Options>>Set Refresh Time and enter a number in the Set refresh time in seconds box. DataEase refreshes the screen at the interval you specify. All Record Access Read Record Access No Record Access Refresh Continuous Refresh Set Refresh Time

Select Permission
If your View security level is too low or you do not have SELECT permission in the foreign table, you can select a form from the Application Catalog, but when you choose View>>Next Record or View>>Table to view records, DataEase displays a error message similar to the one shown in the figure below and no records are displayed. NOTE: See your system administrator to obtain the necessary permissions.

Searching For A Particular Record


The time DataEase takes to find a particular record depends on the number of records and the number of Indexed fields in the form. If you are using a form that defines or uses a foreign table, the foreign engine performs the search. Because each database engine has its own searching algorithms, the time required to find a record varies from engine to engine.

Server Enforced Referential Integrity


DataEase provides two special referential integrity options that transfer the responsibility of enforcing referential integrity to a foreign database engine: Server C (Cascade) and Server SN (Set to Null). When you modify a Match field value in the Main Form of a Multiform, the Match field in the related Subform records may or may not be modified depending on the referential integrity option defined in the Relationships form (see table below).

NOTE: By transferring RI responsibility to the server, referential integrity can be ensured regardless of which client application is used to modify data, however, the integrity rule must be recreated on the server or it will not be enforced. See your Database Engine Guide for information on how to create rules and triggers.

Update Permission
To modify a record in a form that defines or uses a foreign table, you must have UPDATE permission on the table. When you choose Edit>>Save to modify a record in a form that defines or uses a foreign table, DataEase updates the table row with the data saved in the record currently displayed on the screen. When you choose Edit>>Save to modify a record in a form that defines or uses a foreign table and no Unique fields are defined on the form, DataEase displays the Multiple Record Update Alert dialog (shown below) if at least one record in the form is identical to the record on the screen.

110

Help File

NOTE: You can only modify records in a form if the minimum DataEase security level required to modify records on the Document Security dialog is set to your level or lower.

Modifying Records In Table View


When you modify records in Table View in a form that defines or uses a foreign table, DataEase treats each record as a separate transaction (an indivisible unit of work), that is, each record is saved individually. If DataEase cannot commit a record (e.g., the attempted action violates a server-specified rule or you do not have the necessary server permission), no more records are saved and DataEase displays an error message. All the records are saved up to, but not including, the record that cannot be committed. You must return to the uncommitted record and choose Edit>>Restore Record. Then choose Edit>>Save as New Record or Edit>>Save to save the remaining records.

User Privileges and Permissions


To perform Record Entry functions on a form that defines or uses a foreign table, you must have the necessary access rights on the server. The two levels of server access rights are explained in the table below.

NOTE: User privileges and permissions can be granted or revoked through an SQL program or utility outside of DataEase, or through an exec SQL statement within the DataEase Query Language. DataEase security levels, however, can only be specified within DataEase. The SQL system administrator can revoke user permissions on the server without changing a user's DataEase security level. For example, if your UPDATE permission in a specific SQL table is revoked through SAF (Server Administration Facility), you might not be aware of the change until you try to modify a record in DataEase. Even though your DataEase security level may appear high enough to modify records, the server will display an error message informing you that you are unable to perform the requested action.

OLE DB
Introduction to OLE DB
DataEase 7 contains support for OLE DB, which allows other software to easily access live data from DataEase applications. The following discussion covers connectivity issues, making it clear why OLE DB support is of such major importance. Connectivity Issues DataEase can both store data itself, and manage data in other data sources. This means that DataEase is a "consumer" of data (when it accesses other data sources) on the one hand and a "provider" of data from its own relational database management system (RDBMS) on the other. DataEases own RDBMS, as with most other RDBMSs such as Sybase, Oracle, etc, stores information in files in a proprietary format, i.e. information is stored in a DataEase native format. In order to communicate with other programs this information must be easily accessible and exposable to any type of applications both DataEase and external. But equally, direct access to the data without using our RDBMS is not permissible for reasons of security and data integrity again, in line with all other major RDBMSs. So, it is of fundamental importance what mechanisms are employed to provide connectivity between different databases. Moreover, in the current and future computing environment, it is frequently necessary to exchange data with other products that are not databases, or indeed exchange objects such as images, charts etc. which are not, strictly speaking, data. There are two main ways to exchange data with other products in the DataEase environment: 1. Import / Export

111

Printed Documentation

2.

Through one of the standard data interchange interfaces we support these are; DDE/OLE ODBC (Open Database Connectivity) OLE DB (Object Linking and Embedding Database).

There are substantial enhancements to import and export facilities in DataEase 7, but of course these facilities are only important where live access to data is not required. DDE and OLE operate at the document level, and although they provide live access to data and objects that may be updated by other products, they operate on a limited scale. Here we will concentrate on full live database connectivity, achieved through ODBC and OLE DB. A comment on Native database interfaces In many cases, data stored within a database can be accessed through special data access mechanisms or application programming interfaces (APIs) that are made available to systems programmers. Implementations of programming interfaces are libraries that contain packages of functions providing all the necessary functionality for handling data ability to connect to a database, create and process queries, etc. Most DBMS vendors implement their own sets of functions to provide native connections to data stored in its databases. The data processing functionality is provided by the core of each DBMS, called a database engine. Different native database interfaces can be implemented in different languages (even proprietary to a specific vendor). In fact, functions from different vendors libraries can be called differently and have different numbers and types of parameters even through in most cases they perform the same actions. DataEases engine is included in the PRISM module (PRISMDQL.DLL). It has an API that could be used (by an advanced C/C++ programmer!) to provide an efficient way for handling data in the DataEase native format. However, this approach suffers from many disadvantages. Obviously it is highly technical, it is different for each vendor s database, and would likely be bespoke to each application, among other problems. Plus not many users are C programmers with a few months to spare! As this is a common problem to most DBMS, a variety of standard approaches have been developed which avoid these problems. Standard database interfaces (ODBC) ODBC is an industry standard to access data from a variety of relational data stores. In common with the other industry standard technologies mentioned above, it can be viewed from two sides an application that wishes to acquire data from an external source must make use of the standard calls, and a data source must provide a means of taking those calls and applying them to its own proprietary database. The data stored within a specific DBMS is exposed through an ODBC driver that creates a standardized interface that can be used by any application that issues calls to it. The interface can be interrogated to determine the level of support provided by the data source in question. The ODBC driver translates standard queries and data handling functions contained in calls made to the ODBC interface into commands that can be understood by a specific DBMS, for which the particular ODBC driver is written. DataEase does not supply an ODBC driver. We do not do so because our database incorporates features that are more powerful than the typical database, for example the ability to produce complex views easily by means of our MultiView technology. We believe the tradeoffs needed to create an ODBC driver for DataEase would be unacceptable to the majority of our users. DataEase is supplied with an ODBC interface for acquiring and interacting with data from other data sources. This enables DataEase to integrate tables from sources as diverse as Excel and Oracle into a single application. The data can then be reported on and manipulated much as if it was in DataEases own files. This is only one side of the equation, however. It was obviously necessary for DataEase itself to be able to provide live data to other applications. This is now possible, using the newer OLE DB technology. Switching to OLE DB Whereas ODBC provides a fairly simple SQL based API, which, incidentally, means that data is processed as if it was in relations (tables) even if the data source is non-relational, OLE DB can handle more complex structures. These, conveniently, map more readily to DataEases internal structure. Moreover, since OLE DB is designed to expose data from all kinds of data stores, it provides access to a much wider variety of sources than just databases. The form in which data is retrieved from any information source neednt be SQL-compliant, as in the case of ODBC. As with ODBC, OLE DB is a standard set of calls presented as an interface. The driver that takes these calls and applies them to the data source in question is called a provider. At a minimum, an access provider must implement the interfaces to databases necessary to expose data in tabular form. In addition, an application that wishes to use data from a provider must produce the calls to the interface the software that does this is called the consumer. DataEase 7 supports both OLE DB Consumer and Provider software, making it equally easy for DataEase to obtain data from other sources, and for other applications Oracle or Access, say to obtain data from DataEase. The sections which follow describe how the Provider and Consumer software can be used.

112

Help File

Consumer and Provider


OLE DB is an open specification designed to access data from both relational and non-relational data sources. The DataEase implementation of a standard set of OLE DB interfaces enables your DataEase applications to seamlessly exchange data with such external OLE DB-enabled data sources as MS SQL Server, Oracle and MS Access, and with other DataEase applications (versions higher than DataEase v.5.x). OLE DB consists of two software layers: the Provider and the Consumer. Stated briefly, the Provider allows other applications to access data from DataEase, and the Consumer allows DataEase to access information from other applications. Each OLE DB Provider is specific to a data source. The Provider which ships with DataEase 7 is a COM-based driver that reads DataEase data in its native format and returns the data in tabular format to the Consumer, which can be any software which is OLE DB compliant. Implementation of standard interfaces allows the DataEase OLE DB Consumer to access data from any OLE DB Provider.The Consumer processes the data exposed by the Provider and returns the data to your DataEase application in the native DataEase file format. You can easily incorporate this data into your existing forms or build new forms based on the tables from an external data source. OLE DB lets you directly modify data in another DataEase application or read the live data without the need of intermediary files - Export and Import files. Export and Import files are needed only to transfer data to or from a particular location or for some other purposes. To access other DataEase applications, your best choice will be the DataEase OLE DB Provider. DataEase 7 is provided both with an OLE DB data Provider and data Consumer. OLE DB Provider: Summary The Provider is a software layer that allows other products (e.g. Excel, Crystal Reports, Access) to read and modify DataEase tables. The provider is compatible with all databases in the DataEase tagged format, i.e. all versions since DFD5. So the Provider does work with DOS DataEase 5.The provider also allows for the processing of raw SQL against a DataEase native database. OLE DB Consumer : Summary An OLE DB Consumer is responsible for retrieving information from any external OLE DB - compliant data source. DataEase can use this information to create links to the tables in the external source, build DataEase forms upon the tables, and then to process the data largely as if it was in DataEases own files. The source can be any kind of data relational or hierarchical, structured or flat, written in a standard or a proprietary format, as long as the source is equipped with an appropriate provider. However it should be noted that the Consumer is not intended for creating complete applications over external data sources - DataEase is not intended as an alternative to specialized (and hence more complex) client server development environments. For the serious client server developer we provide our NetPlus suite of products. In conjunction with the DataEase Provider, the Consumer permits DataEase to access native DataEase tables in a different application. This has a number of advantages. It allows for much more convenient data sharing between different DataEase applications (and so many imports and exports will be obsolete). In many cases this facility will permit large existing applications to be split into more manageable smaller ones, and also it will allow new development in DataEase to take place without disturbing existing working apps, at least when only some of the tables need to be used by both applications. Unlike interoperability, it promotes many smaller applications rather than heaping everything together in one huge complex system.

Using the Consumer


The DataEase OLE DB Consumer is part of the DataEase system designed to access data from any OLE DB-enabled application via an OLE DB Provider. To enable your application to connect to an external data source, you must customize the Consumer for each application. The Consumer customization includes providing all the necessary information about the data source you want to access, specifying an OLE DB Provider to the data, Providers parameters, etc. This connection-specific information is stored in a standard Universal Data Link (.udl) file and can be entered into your system via a special dialog window. So, to configure your DataEase OLE DB Consumer, you must perform the following three actions: 1. 2. Create a new Universal Data Link (.udl) file. Used to store connection information Configure the UDL file. This is where you customize the Consumer for use with a particular data source by specifying the connection details such as data source, data source location, the Provider type, etc. Create an OLE DB Database link. This is done from within the DataEase application, and allows the Consumer to transfer the data from the Provider into your application.

3.

113

Printed Documentation

Note: Each OLE DB Database Link requires a different copy of a UDL file. Step 1: Create a Universal Data Link (.udl) file All connection information your DE application will use to link to an external relational or non-relational data source is stored in a Universal Data Link file that has a .udl extension. To create a .udl file, please follow the instructions: 1. 2. 3. Open Windows Explorer. Select the folder in which you want to store your .udl file, e.g. C:\OLEDB\. If you are running Windows 2000 or later, select File>>New >>Text Document. A new file named New Text Document.txt appears in the directory. Rename this file, changing the file extension to .udl, e.g. OLEDB.udl

Note: A warning that changing file extensions can cause files to become unusable might appear. Disregard it. If you are running with Windows NT systems with Microsoft Data Access Components (MDAC) installed, right-click the right pane, or results pane, select New >>Microsoft Data Link. A new file named New Microsoft Data Link.udl appears in the directory. You should rename this file to something more meaningful but its best to keep the name fairly short, since some products may have string length limitations. For example, when you define a DataEase Datalink you are allowed a maximum of 29 characters for the combined path and source name. You now have a new empty .udl file with no information specified. The next task is to fill this file with actual data, by configuring the udl, as described below. Step 2: Configure the universal data link (.udl) file It is not enough to simply create a .udl file. Each .udl file must contain the actual connection parameters and data sources details. To customize your .udl file, follow these steps: 1. 2. Double-click your universal data link file (.udl) to load it. The Data Link Properties dialog box opens, displaying the following tabs: Provider, Connection, Advanced, and All. On the Provider tab, select a provider most suitable for your application needs from the list of available OLE DB Providers.

3.

For example;

MS Access databases can be accessed via Microsoft OLE DB Provider for Jet 4.0 and Microsoft OLE DB Provider for ODBC. To access MS SQL databases you should use Microsoft SQL Server OLE DB provider. The data in another DataEase application can be accessed via Sapphire DataEase OLE DB Provider.

Your software will advise you as to which OLE DB Provider you should select. 4. After you have chosen a Provider, proceed to the Connection tab and specify the connection details.

Note: the number and type of connection details vary with each Provider. For example, if you choose the Microsoft OLE DB Provider for SQL server, you will be presented with the following screen:

114

Help File

On the Connection tab, specify the connection properties specific for each Provider. Click Test Connection to test your connection to the data source specified. If the test connection fails, check the connections parameters and do another test. Note: For more information about connection properties, refer to the documentation provided by each specific OLE DB Provider. 5. Use the Advanced tab to view and set other initialization properties for your data.

Note: For the Sapphire DataEase OLE DB Provider the Advanced tab is inaccessible. You will be unable to get into this tab, and instead you will be taken to the All tab. 6. Use the All tab to review and edit all OLE DB initialization properties available for your OLE DB provider. For example, the Microsoft OLE DB Provider for SQL server this tab will be similar to the one shown below:

115

Printed Documentation

7.

Choose OK to save the connection information in the Universal Data Link (.udl) file.

Once you have configured your .udl file and tested the connection, you must create a new OLE DB Database link within your application. Step 3: Create an OLE DB Database Link To enable the DataEase OLE DB Consumer to use the data exposed by the Provider, you must create a new database link inside your DataEase application, via the Application>>Database Links dialog window. Note: You must have a different copy of the .udl for each OLE DB Database Link. 1. 2. 3. Choose Application>>Database Links to display the Database links dialog. Specify the following options: Link Name is the name of a link you want to create. Enter any descriptive and meaningful name into this field. The Link Name is used to refer to this link from within your application. Select OLEDB Provider from the drop-down Engine Type box. DataEase will use this engine for data retrieval. Server Name. Use this field to enter the full path to the .udl file.This string can be no longer than 29 characters. If your path/udl name are longer than this, please shorten one or both of them.

4.

5.

116

Help File

6. 7.

Database Name. Enter any name into this field. Do not leave this field empty. Tables Available. This field displays nothing until you add this link into your database by clicking the Add button. Default Link. Leave the default value (NATIVE). Add. When you click the Add button: DataEase saves this link into your application and adds its name into the Catalogue>>DB Links. DataEase automatically lists the tables available from the data source you have specified in the .udl file.

8. 9.

Note: In the Tables Available list the name of each table is followed by the Username value you have specified in the .udl file. 10. If you click Build Forms, DataEase will build a form based upon the table you choose. 11. Click Done to close the window. As a result, the Application Catalogue lists:

All the Database Links existing within your application; Properties for each Database Link; The tables contained within each data source that can be seen if you click a particular Database Link: The graphic below illustrates a database which has multiple links via OLE DB.

Using the Provider


The Sapphire DataEase OLE DB Provider, which ships with 7, gives developers an efficient method of accessing data from DataEase databases.

How to configure your Sapphire DataEase OLE DB Provider


To configure your DataEase Provider, perform the following actions: 1. On the Provider tab, select the Sapphire DataEase OLE DB Provider as a database provider.

117

Printed Documentation

2.

On the Connection tab, specify the following connection properties: The Data Source Location (a full path to the data source). The Data Source Name that is the name of a particular database, file, etc. you want to access. User Name and Password to use for authentication when you log on to the Data Source you have specified.

118

Help File

3.

Click Test Connection to test your connection to the data source specified. If the test connection fails, check the connections parameters and then retest. Use the All tab to review and edit the current connection properties.

4.

119

Printed Documentation

5.

Choose OK to save the connection information in the Universal Data Link (.udl) file.

Once that you have configured your .udl file and tested the connection, you must create a link to the data within your application. This process varies from one piece of software to another, but the process used by DataEase is typical, and is described here.

OLE DB Notes
1. Choice fields and yes/no fields in a DataEase database will appear as text fields in all consumers (not just the DataEase consumer). Lookup fields will not display a drop down arrow. This is a restriction of the API and cannot be changed. The ability to create new tables in a datalink is not supported (this includes datalinks to DataEase databases as well as to other database types). This omission is deliberate, since table creation is a complex area best left to dedicated client server development tools, such as NetPlus. The ability to claim ownership of a remote table is not supported. A form created over a table may Define the table (in Document/Properties) so that the form itself can be worked on, e.g. virtual fields added. Numeric fields with length greater than 14 will reverse engineer, but maths on fields of more than 14 digits will produce uncertain results. Text and character columns in remote databases will map as text fields with a maximum length of 255 characters in DataEase (consumer) applications. The DataEase consumer does not utilise the identity option on numeric columns of tables in MS SQL Server.

2.

3.

4.

5.

6.

120

Help File

7.

A small number of characters, like forward slash and square brackets should not be used in table names or field names as they are not understood by the OLE DB consumer. The underscore character is fine. Similarly, table and field names must not contain spaces, e.g. 'Club Rooms' is unacceptable, whereas Club_Rooms is fine. Binary large objects in non DataEase databases, e.g. image type in SQL Server, are not mapped in a DataEase consumer link, since DataEase has no matching data type. There are some limitations to SQL commands that will be understood by the provider: Tables cannot be created in DataEase through the provider; Column names must be explicitly listed in an insert statement; An insert cannot be made by a select on another table, i.e. insert into <DE table name> select * from <another table name>, will not work.

8.

9.

10. The password to a database must be supplied when an OLE DB link is set up. DataEase does not ask for login and password to databases accessed via OLE DB when the connection is made (unlike access to databases via ODBC).

Document Objects
Objects>>Subform
Lets you define a Subform object. A Subform is a form embedded in another form. You can place any document object in a Subform, including another Subform. You can define any type of field on a Subform, including custom fields (e.g., Image, Check Box, Radio Button). The combination of a Main form and one or more Subforms is called a Multiform. You can define up to 32 Subforms per Multiform (arranged vertically or side-by-side), or define Subforms within other Subforms (called nested Subforms). DataEase lets you arrange the records in a form or Subform in many different layouts. For ease of understanding, layouts are divided into three groups: Horizontal Record Scroll, Vertical Record Scroll, and Matrix (multiple records in both directions).

How to Define a Subform


1. 2. 3. 4. 5. 6. 7. 8. 9. Define a relationship between the Main form and the Subform (if none exists). Choose Objects>>Subform. DataEase displays the Subform cursor. Draw a rectangular Subform area on the document. Click and drag the mouse on the document to mark the upper left and lower right corners of the Subform area. As you move the mouse, DataEase displays dashed lines that mark the Subform area border. When you release the mouse, DataEase displays the Form Definition dialog. Choose a related table or grouping field and click OK. DataEase displays the Layout Options dialog. Specify the field layout, record layout, appearance, and scroll direction for the Subform.

NOTE: To define a Subform quickly, click the Subform cursor on the parent document to create a default size Subform.

Selecting the Data Source


After you mark the Subform area, DataEase displays the Form Definition dialog. The Form Definition dialog lets you choose which table provides the data displayed in the Subform. The dialog lets you choose either a Relationship or a Group Field as the data source for the Subform. If you choose: Relationship the Subform displays data from the related table that you specify. The related table can be any table that is related to the table associated with the parent form. For example, if the parent form displays MEMBERS records, the Subform can display the related records from the FAMILY MEMBERS table. the Subform displays data from the current table (the table associated with the parent form), grouping records that have the same value in the Group Field that you specify. For example, if the parent form displays the STATE field from the MEMBERS table, the Subform can display the MEMBERS records from each state as a separate group.

Group

Modifying a Subform
If you double click on an existing Subform, DataEase displays the Form Definition dialog with two minor changes. First, DataEase lets you view (but not modify) the Relationship or Group information. Second, DataEase activates the Display and Layout buttons that were grayed out previously.

121

Printed Documentation

FORM DEFINITION DIALOG


Current Table displays the name of the associated database table. Relationship lets you choose a related table to use as the data source for the Subform. Highlight the table name and click OK. To use a table that does not appear on the drop-down list, you must define a relationship between it and the current table. Choose Application>>Relationships to display the Relationships dialog. Group lets you choose a field (from the current table) to group records in the Subform. Highlight the field name and click OK. Group is only available when you are defining a form over an existing table or report.

Layout Options
When you click OK after filling in the Form Definition dialog, DataEase displays the Layout Options dialog. The Layout Options dialog lets you choose a predefined layout and quickly specify the arrangement of the fields in a form or Subform. In addition to choosing the basic record layout, the Layout Options dialog also lets you choose the number of records the form displays both vertically and horizontally, and whether it displays row numbers, field labels, scroll bars, and other conveniences. When you create a form, use the Layout Options dialog to tell DataEase how each record should be laid out and how many records to display at a time. When you click OK, DataEase automatically builds the layout and clones the record layout as many times as necessary to match your specification. NOTE: By default, DataEase includes all the fields from the selected table in a Subform. When DataEase displays the layout, you can delete any fields you don't need by holding down the Shift key, clicking on each field, and then pressing the Delete key or choosing Edit>>Cut to remove these objects.

The Layout Options Dialog


Field Layout tells DataEase how to display fields in one of six layouts. Choose: Original Form to arrange the fields exactly as they appear on the form that defined the current table. Field/Line to arrange fields vertically, one per line, with each field preceded by its Field Name. Table to arrange fields as columns in a table, where each row is a record. Table Across to arrange fields as rows in a table, where each column is a record. Mailing Labels to arrange fields vertically, one per line, with no labels. Custom to arrange fields manually on the Subform in a custom layout which you design. Movie Credits to arrange fields vertically, one per line, preceded by their Field Names (if you select Add Labels). DataEase aligns the left edges of the fields in a vertical column and aligns the Field Names flush right along the field column. NOTE: If you use the Layout Options dialog to change the layout of a document from Original Form, Field per Line, Movie Credits, or Custom, to Table or Table Across, DataEase excludes all non-database objects from the new layout it generates (including Background Pictures, Image Fields, Buttons, and Object Styles). If you add or subtract Form or Field objects, but you don't request a different layout, DataEase displays a dialog asking if you want to create a new layout or merge your changes into the existing layout. Choose the Merge option to avoid losing the images, buttons, and styles already incorporated in the document. Record Layout Preview tells DataEase how many records to display horizontally and vertically. By default, DataEase displays one record at a time. Click on the + (plus sign), ++ (double plus sign), and - (minus sign) to add and delete rows and columns on the form. Appearance lets you specify whether DataEase displays row numbers, Field labels, label shading, scroll bars, and/or titles on the form. Choose: Add Row # to display the row number at the start of each record. Add Labels to display Field Names as column labels (Table) or row labels (Table Across). You must choose Add Labels to use the next four options. Link Labels to automatically select the label when you select the corresponding field on the form. Shade Tops to add color to the top row of the form (Table and Table Across only). Shade Sides to add color to the leftmost column of the form (Table and Table Across only). Add Grids to display grid lines between rows and columns (Table and Table Across only).

122

Help File

Add Scrollbar to display a scroll bar used to scroll records. See Scroll Direction below. Add Title to display the Relationship Name (Relationship) or Table Name (Group) as the form title. Scroll Direction lets you specify how you want to scroll records. Choose: Horizontal to scroll records left to right. Vertical to scroll records up and down. NOTE: DataEase displays a scroll bar only if all records cannot fit on the screen. Record Size Lets you specify the size of the record object. Label - choose a predefined Avery or Dennison label from the drop-down list that DataEase displays (only if you select Mailing Label as the Field Layout). Choose Other: Set Size to enter a custom size. Height - specify the Height of the record area in inches or centimeters. Width- specify the Width of the record area in inches or centimeters. NOTE: To resize the form, specify new Height and Width values or simply click and drag the form area.

Align Objects

Edit>>Align
Moves all selected objects into vertical or horizontal alignment with the reference object. The reference object is the last object selected when multiple objects are being aligned and is displayed with solid handles.

How to Align Objects


1. 2. Select the objects you want to align. Select the object on which the alignment will be based (i.e., the reference object) last. Select Edit>>Align and an alignment option from the cascade menu DataEase displays. DataEase aligns the selected objects with the reference object.

Right Edges Left Edges Horizontal Center Top Edges Bottom Edges Vertical Center To Grid

Objects>>Style>>Apply
Lets you apply a predefined Object Style to an object.

How to Apply a Style to an Object


1. 2. 3. 4. Highlight all objects that will be assigned the same style. Choose Objects>>Style>>Apply. DataEase opens the Object Style drop-down list box on the Object Style Dropdown List. Choose the name of the style you want to apply to the object(s). DataEase displays the highlighted object(s) using the style you specified.

Action

How to Assign an Action to an Object


1. or... 2. or... 3. 4. 5. # Highlight the object and click the Action button on the Toolbar. Click the drop down arrow to open the Select Action list and choose an action. Click OK. Highlight the object and click the right mouse button then select Action from the Object Properties pop-up menu. Click the Action button on the Display Attributes dialog.

The Action Selection Dialog

123

Printed Documentation

Select Event tells DataEase which event triggers the selected action. The Clicked event tells DataEase to execute the action when you click on the object. In DataEase for Windows version 1.0, the only available event is Clicked. Select Action lets you choose any one of the actions listed in the table below. Button Action No Action Clear Form Save Record Delete Record First Record Last Record Next Record Previous Record Next Records Page Previous Records Page Save As New Record Restore Record Queried Records Query By Form All Records Set Filter Clear Selection Filters Add Filter (AND) Add Filter (OR) Set Sort Order Set Selection Filter Import Data Used To... Perform no action (default). Clear all data from the current record. Save (modifies) the data on screen, overwriting the existing record. Delete the current record. Display the first record saved in the document (native database) or the record with the highest Unique key value (SQL database). Display the last record saved in the document (native database) or the record with the lowest Unique key value (SQL database). Display the next consecutive record. Display the previous consecutive record. Display the next page of records when in Table View. Display the previous page of records when in Table View. Save the data on screen as a new record. Undo changes made since the record was last saved. Display records that match the selection criteria in the Record Filter. View the next record that matches the selection criteria. Display all records in the document (ignore any record selection criteria). Enter record selection criteria. Type the selection criteria in the PARAMETER field on the Action Selection dialog. Remove all selection criteria. Add selection criteria to the existing record filter, using the and operator (e.g., SEASON = April - June and DEPARTURE ZONE = 2). Add selection criteria to the existing record filter, using the or operator (e.g., SEASON = April - June or DEPARTURE ZONE = 2). Display records in a sequence based on the value stored in one or more Sort fields. To specify a Sort field, simply click on the field. Specify selection criteria for the document. Enter the selection criteria on the Record Selection Filter dialog and click OK. Let you specify the data format, source file, field sequence, and other information that defines how DataEase imports data from another program on the Import Data dialog. Let you specify the format, file name, and other information that defines the structure of the DataEase export file on the Export Data dialog. Open a document. Specify the name of the document you want to open in the PARAMETER field on the Action Selection dialog. Alternatively, leave the PARAMETER field empty to display the Open a Document dialog. Open a related document. Specify the name (or optional relationship name) of the document you want to open in the PARAMETER field on the Action Selection dialog. Alternatively, leave the PARAMETER field empty to display the Open a Document dialog. Display a list of related records in the Related Records dialog. Specify the name (or optional relationship name) of the document you want to open in the PARAMETER field on the Action Selection dialog. Close the current document and return to the document DataEase displayed immediately before displaying the current (related) document. Return data to the document DataEase displayed immediately before displaying the current (related) document. Close the current document. Invoke an executable program. Specify the name and path of the

Export Data

Open Document

Open Related

Dynamic Lookup

Return to

Return Data to Close Document Execute File

124

Help File

program in the PARAMETER field on the Action Selection dialog. Expression (CDF) Custom Functions View as Table Toggle Toolbar Toggle Status Bar Toggle Catalog Preferences Print Setup Printer Query By Model Close Application Close All Windows Exit DataEase Edit Links Show SQL Users Database Links Execute a Custom-Defined Function. Specify the CDF name in the PARAMETER field on the Action Selection dialog. Display the Custom Functions form. Display the current form in Table View. Hide/display the Toolbar. Hide/display the Status Bar. Hide/display the Application Catalog. Display the Application Preferences dialog. Display the Print dialog. Display the Printer Setup dialog. Display the Query By Model dialog. Close the current application. Close all DataEase windows (forms, reports, etc.), including the current document. Close and exit the current application and return to the DataEase desktop. Insert an OLE-linked object. When you select this action in User View, DataEase displays the Links dialog. Display SQL statements that DataEase sends to the SQL engine. Display the Users System form. Let you add, delete, refresh, or rename a database link. When you select this action in User View, DataEase displays the DB Links dialog. Display the Main Index to the DataEase Help system. Create a custom help message for the current object in User View via the Help dialog. Display the document in its original size. Display the document in its previous zoom size. Magnify a document to 1 1/2 times (150%) its current size. Reduce a document to 2/3 times (67%) its current size. Magnify a document to a percentage of its original size. Specify the percentage (between 1 and 2000) in the PARAMETER field on the Action dialog. Magnify a document to a percentage of its current size. Specify the percentage in the PARAMETER field on the Action dialog. Resize the document to fill the entire window. Resize the document to fill the width of the window. Resize the document to fill the height of the window. Display the Custom Zoom dialog. Remove any record entry lock and lets other users view, modify, enter, or delete records that you are using. Place a shared lock on the records in the form. A shared lock lets two or more users view the same record, but prohibits a user from modifying or deleting a record when another users is viewing it. Place an exclusive lock on the records in the form. An exclusive lock prohibits two users from viewing the same record at one time. Reread the record(s) on the screen from disk and redisplay it. Set the interval, in seconds, that DataEase waits before refreshing the record(s) on screen when you select Refresh Continuously. Specify the number of seconds between each refresh in the PARAMETER field on the Action Selection dialog. Otherwise, DataEase displays the Set Refresh Time dialog in User View when you select this action. Automatically refresh the record(s) on the screen every few seconds. Display the character-based DataEase Main Menu. The options on the Main Menu are Form Definition and Relationships Record Entry, Query By Model-Quick Reports, DQL Advanced Processing, Menu Definition, Application Maintenance, and System Administration.

Help Index User Help Zoom Off Zoom Previous Zoom In Zoom Out Zoom To

Zoom By Zoom Fill Window Zoom Fill Across Zoom Fill Down Zoom Dialog Allow ALL Access Allow READONLY Access Allow NO Access Refresh Screen Set Refresh Time

Refresh Continuously Main Menu

125

Printed Documentation

Form Definition Menu

Display the character-based DataEase Form Definition menu. The options on the Form Definition menu are Define New Form and Table, Define Form over Existing Table, View or Modify Form, Define Relationships, Delete Form, and Reorganize Form. Switch to Designer View and create a new form and table. When you select this action in User View, DataEase displays the New Document dialog. Switch to Designer View and create a new form over an existing table. When you select this action in User View, DataEase displays the New Document dialog. Switch to Designer View and open an existing form. When you select this action in User View, DataEase displays the Open Document dialog. Delete a form. When you select this action in User View, DataEase displays the Delete a Document dialog. Display the Relationships System form. Reorganize a form. Specify the name of the document you want to reorganize in the PARAMETER field on the Action Selection dialog. Alternatively, leave the PARAMETER field empty to display the Reorganize Form dialog when you select this action in User View. Open a form. Specify the name of the form document in the PARAMETER field on the Action dialog. Open a form. When you select this action in User View, DataEase displays the Open a Document dialog. Open a QBF - Quick Report. Specify the name of the Quick Report in the PARAMETER field on the Action dialog. Display the character-based DataEase Quick Reports menu. The options on the Quick Reports menu are Run Report, Start New Report, Define Record Selection, Define List Fields, Define Format, Define Print Style, Save Report, Load Report, Delete Report, and Print Report Definition. Run a QBF-Quick Report. When you select this action in User View, DataEase displays the Open a Document dialog. Start a new QBF-Quick Report. When you select this action in User View, DataEase displays the New Document dialog. Specify the criteria by which DataEase chooses the records to list in the QBF-Quick Report. Type your selection criteria directly into one or more fields on the form. Specify which fields from the selected records you want to appear in the QBF-Quick Report. Click on a field to select it. Select a format for the QBF-Quick Report. When you select this action in User View, DataEase displays the Layout Options dialog. Select a destination for the procedure output. When you select this action in User View, DataEase displays the Print Setup dialog. Save the current QBF-Quick Report. Load an existing QBF-Quick Report. When you select this action in User View, DataEase displays the Open a Document dialog. Delete a QBF-Quick Report. When you select this action in User View, DataEase displays the Delete a Document dialog. Print the QBF-Quick Report definition, including the record selection criteria, list fields, a sample report format, and brief field definitions. Open a Quick Report or DQL Procedure. Specify the name of the report or procedure in the PARAMETER field on the Action dialog. Display the character-based DataEase DQL menu. The options on the DQL menu are Run Procedure, Start New Procedure, Define Dataentry Form, Define Query, Define Format, Define Print Style, Save Procedure, Load Procedure, Delete Procedure, and Print Procedure Definition. Run the DQL Procedure that you specify in the PARAMETER field on the Action dialog. Start a new procedure by clearing the current procedure from memory. Create a Data-Entry Form for a DQL Procedure.

Define New Form and Table New Form Over Existing Table View or Modify Form

Delete Form Define Relationships Reorganize Form

Record Entry Records Menu Quick Reports Quick Reports Menu

Run Report Start New Report Define Record Selection Define List Fields Define Report Format Define Report Print Style Save Report Load Report Delete Report Print Report Definition Procedure DQL Menu

Run Procedure Start New Procedure Define Data-entry Form

126

Help File

Define Query

Create/modify the query statements for the current procedure. When you select this action in User View, DataEase displays the Edit Procedure dialog. Create/modify the format for the current procedure. When you select this action in User View, DataEase displays the Layout Options dialog. Select a destination device for the report output. When you select this action in User View, DataEase displays the Print dialog. Save the current procedure. Load an existing procedure. When you select this action in User View, DataEase displays the Open a Document dialog. Delete a procedure. When you select this action in User View, DataEase displays the Delete a Document dialog. Print the current procedure. When you select this action in User View, DataEase prints the procedure definition, including the query, the Data-entry form (if one is defined), sample report format, and brief field definitions. During a Control Procedure, execute the program, operating system command, or batch file that you specify in the PARAMETER field on the Action dialog. Display the New Document dialog. Display a custom user menu or execute a Chain menu. Specify the name of the menu in the PARAMETER field on the Action dialog. Display the character-based DataEase Application Maintenance menu. The options on the Maintenance menu are Application Status, Backup Application, Restore Application, Operating System Functions, Lock Application, and Unlock Application. Restore the current application using the DataEase Restore facility. When you select this action in User View, DataEase displays the Restore dialog. Display the status of the forms, procedures, or import specifications in the current application by running a database status report. Backup the current application using the DataEase Backup facility. When you select this action in User View, DataEase displays the Backup dialog. Display the character-based DataEase Operating System menu. The options on the Operating System menu are Database File List, Check Database Disk, Format New Disk, Operating System Backup, Operating System Restore, and Operating System Other. Locks the application to completely prohibit other users from accessing the current application. Lock Application is functional only when using DataEase in a multi-user environment. Unlocks the application to let other users access the current application. Unlock Application is functional only when using DataEase in a multi-user environment. Display a list of the files in the current application directory. To display a list of the files in another directory, specify the drive letter and directory name in the PARAMETER field on the Action Selection dialog (e.g., C:\SALES). Execute the Check Data Disk (CHKDSK) operating system command for the drive that contains the current application directory. To check another drive, specify the drive letter in the PARAMETER field on the Action Selection dialog (e.g., D:\). Format a diskette. Specify the drive letter in the PARAMETER field on the Action dialog. Backup the current application using your operating system's Backup utility. Specify the destination drive and directory in the PARAMETER field on the Action dialog (e.g., C:\DEWIN\CLUB). Restore the current application using your operating system's Restore utility. Specify the source drive and directory in the PARAMETER field on the Action dialog (e.g., C:\DEWIN\CLUB). Display the Application Preferences dialog. Display an operation system shell. You can issue any operation system command or run any non-TSR program. To return to DataEase, type exit.

Define Format

Procedure Print Style Save Procedure Load Procedure Delete Procedure Print Procedure Definition

Call Program

Menu Definition User Menu Application Maintenance Menu

Restore Application

Application Status Backup Application

O.S. Menu

Lock Application

Unlock Application

File List

Check Disk

Format Disk O.S. Backup

O.S. Restore

Define Configuration O.S. Other

127

Printed Documentation

Admin. Menu

Display the character-based DataEase Administration menu. The options on the Administration menu are Define Users, Define Configuration, Define Printers, Define Screen Styles, Define Custom Functions, and Application Utilities. Display the Users system form. Display the Print Setup dialog. Display the Application Preferences dialog. Display the Custom Functions system form. Display the character-based DataEase Utilities menu. Display the character-based DataEase Data Import menu. The options on the Data Import menu are One-Time Import, Run an Import, New Import, View or Modify Import, and Delete Import. Copies data from one form to another form in the same application. Copy a form from one application to another application, with or without data. Copy a procedure from one application to another application. Copy the forms, reports, procedures, menus, and data from one application to another application, or install an application from another spreadsheet or database program into DataEase. Change the name of the current application. Delete the current application, including all forms, reports, procedures, menus, and data. Define a temporary import specification. Execute a predefined import specification. Create a new import specification. Display an existing import specification. Delete an import specification from the application. The three Future Use actions are reserved for button actions that will be available in the future.

Define Users Define Printers Define Screen Styles Define Custom Functions Application Utilities Menu Data Import Menu

Transfer Data Install Form Install Procedure Install Application

Rename Application Delete Application One-Time Import Run Defined Import New Import View or Modify Import Delete Import Future Use 1,2,3

Display Color Font Layout

Changing Styles

How to Change a Document's Style Sheet


1. 2. 3. Choose Document>>Properties. DataEase opens the Document Properties dialog and displays the document's current Style Sheet. Choose a new Style Sheet from the drop-down list box. Click OK to close the dialog. Objects with the same style name in the new Style Sheet switch to the new attributes. Objects with a style name not in the new Style Sheet become unstyled objects that retain their original styles' attributes.

Color

How to Change the Color of an Object


1. or... 2. or... 3. 4. 5. or... 6. 7. Click on More Colors and select a color from the Basic Colors palette. When you finish selecting colors for each of the Display Elements, click OK. Highlight the object and click on the Display Attributes button on the Toolbar. Click on the Element drop down arrow to select the Display Element whose color you want to change. Click on the color you want from the Color Selection palette. Highlight the object and click the right mouse button then select the Display menu option. Double-click on the object to display the object definition dialog.

128

Help File

How to Define Custom Colors


1. 2. 3. or... 4. 5. 6. Type the appropriate values in the Hue/Sat/Lum or Red/Green/Blue text boxes. Click the Add to Custom Colors button. The new color is added to the Custom Colors palette. When you finish adding all the custom colors you want, click OK to save the Custom Colors palette, then click OK to save the Display Attributes. Click on the Define Custom Colors button on the Color dialog. Highlight the box in the Custom Colors palette where you want the new color to display. Use the color refiner cursor in the color grid and the pointer on the Vertical Luminosity bar to select the color you want.

The Color Dialog


Basic Colors displays the colors available for every object. Click on a color to select it. Alternatively, use the arrow keys to move through the colors and press the spacebar to highlight your choice. DataEase lets you create and save up to 16 custom colors. Custom Colors displays previously-defined colors (if any). Define Custom Colors expands the Color dialog so you can create and save custom colors that are not offered on the Basic Colors palette. The Expanded Color dialog is described below. Color Refiner Box Click and drag the mouse on the color grid in the color refiner box to choose a new color. Move the cursor horizontally to change the color from red to yellow to green, etc. Move the cursor vertically to change the saturation of the color from pure color (top of the grid) to gray (bottom of the grid). Vertical Luminosity Scroll Bar Click and drag the mouse on the intensity scroll bar to change the luminosity (brightness) of the current color. The purest version of the current color is displayed at the middle of the vertical luminosity bar. As you move the pointer up, the color becomes lighter until you hit the top of the bar where the color is white. When you move the pointer down, the color becomes increasingly darker until you hit the bottom of the bar where the color is black. Text Boxes When you move the color refiner cursor on the color grid or move the pointer along the vertical luminosity bar you simultaneously change the values in the following text boxes:

Hue increments the hue of the color (along the horizontal axis of the color grid). Sat increments the saturation of the color (along the vertical axis of the color grid from gray (0) to pure color (240). Lum increments the luminosity of the color (from black (0) to white (240). Red increments the amount of red in the current color (from 0 to 255). Green increments the amount of green in the current color (from 0 to 255).

Blue increments the amount of blue in the current color (from 0 to 255). Alternatively, use these text boxes to make or fine tune your color selection. A text box value can be entered into the box manually, or you can click on the up and down arrow keys to increment the value. You can assign values to Hue, Saturation, and Luminosity ranging from 0 to 240. For example, a saturation of 0 is gray, a saturation of 240 is the most intense color. The amounts of red, green, and blue can range from 0 to 255. For example, if red is set at 255 and green and blue are both set at 0, the color is red, but if green is also set at 255, the color is yellow.
Color Solid displays the color you select as both a color (pattern) and a solid. When you select Add to Custom Colors, the color displayed on the color side of the box is saved in the Custom Color palette. Double click on the solid to change the color (pattern) to the solid. Add to Custom Colors saves the new custom color into the currently highlighted custom color box. Display Font Action Layout

Font

129

Printed Documentation

How to Change the Font Used in an Object


1. or... 2. or... 3. 4. 5. 6. 7. 8. 9. Highlight the object and click the Font button on the Toolbar. Use the up and down arrow keys s to select a Font. Click on a Font Style. Type the point Size or use the up and down arrow keys to select the Font Size. Click the drop down arrow to select a color. Optionally choose an Effect. When you finish selecting Font characteristics, click OK. Highlight the object and click the right mouse button then select Font from the Object Properties pop-up menu. Click the Font button on the Display Attributes dialog.

The Font Dialog


Font Name displays the typeface used by the text part of the object. Font Style displays the emphasis assigned to text part of the object. Size displays the point size of the text part of object. Effects tells DataEase what special effects to assign to the text part of object (see below). Choose:

Strikeout to display the text with a horizontal line through it. Underline to display the text with a horizontal line beneath it.

Color displays the color of the text part of object. Sample illustrates the choices made on the Font dialog with sample text. Display Color Action Layout

Deleting Objects
Selecting Edit>>Clear permanently erases the selected object from the document. When you choose Edit>>Clear, DataEase does not overwrite any information that is already stored in the clipboard.

How to Clear a Document Object


1. 2. Select the object(s) you want to clear. Choose Edit>>Clear. DataEase permanently deletes the object from the document.

How to Create a Document Object


1. 2. 3. 4. Select the object type. Choose the type of object you want to create from the Objects menu or click on the corresponding icon on the Object Palette. Draw the object area. The object area marks the maximum space occupied by the object. To create a default-size object area, click (and release) on the screen to mark the upper left corner of the layout object. DataEase displays the object in its default size. By default, DataEase sets Size to Fit On. To create a custom-size object area, click (and hold) to mark the upper left corner of the layout object. Drag the mouse to the lower right corner and release the mouse. By default, DataEase sets Size to Fit Off. Define the object characteristics.

5. or... 6.

7. 8.

130

Help File

9.

Fill in the object properties dialog.

NOTE: When you create a form over an existing table, you do not have to include all columns in the table as fields on the form.

Objects>>Style>>Create
Lets you define a new Object Style for any document object (Text, Field, Subform, Button, Line, Rectangle, Ellipse, Application Variable, Image Field, Record, and Form). Object Styles An Object Style is a named set of Display attributes that can be assigned to a Document object. Instead of individually changing the display attributes for each document, you can define a set of display attributes, give it a style name, and then apply it to objects one by one with a single mouse click. Style Sheets A Style Sheet is a named set of Object Styles, which can be assigned to one or more documents. DataEase includes several predefined Style Sheets (including the Style Sheet for Club ParaDEASE) that are stored in the C:\DFW\STYLES directory by default. Using Object Styles and Style Sheets Together By defining a set of display attributes as an Object Style and saving several Object Styles in a Style Sheet, you can quickly change the appearance of a document with a few keystrokes. To use styles effectively, every Style Sheet should contain a set of identically named styles for each class of object.

How to Create an Object Style


1. 2. 3. 4. 5. 6. 7. # Highlight the object on the screen that you want to use as the template for the style. If you want to modify the appearance of the object before you create the style, double-click on the object to display the Display Attributes dialog. When you are finished modifying the display attributes, click OK. Choose Objects>>Style>>Create. DataEase displays the Create a Style dialog. Type a name for the style and click OK. DataEase assigns (or tags) the object with the new style.

The Create A Style Dialog


Style Name lets you specify a name for the current style. Make Default tells DataEase to use the current style as the default style. DataEase automatically assigns the default style to each new object you create.

Objects>>Button
Lets you define a Button object. A Button is a graphic object that performs an action (such as saving the current record) when it is pressed in User View. The actions you can assign to a Button are summarized in the table at the end of this section. NOTE: To define a Button quickly, click the Button cursor on the document to create a default-size Button area and display the Action Selection dialog.

How to Define a Button Object


1. 2. 3. 4. Choose Objects>>Button. DataEase displays the Button cursor. Draw a rectangular Button area on the document. Click and drag the mouse on the document to mark the upper left and lower right corners of the Button area. As you move the mouse, DataEase displays dashed lines that mark the outline of the Button area. 5. When you release the mouse button, DataEase automatically creates a Button object in the size that you specified. 6. Delete the default label Action by pressing Del six times. Type the Button label that you want to display on the screen. 7. You can create a Button label as either single or multi- line text. To start a new line of text, press Sh+Enter or Ctrl+Enter. 8. When you finish typing characters, press Enter. Then, click on the Display Toolbar icon (the fourth icon from the right) to display the Display Attributes for Button dialog. 9. Specify the Button Display characteristics. 10. Click on Action to display the Action Selection dialog. Specify the action associated with the button and click OK.

The Display Attributes For Button Object Dialog


Style Name

131

Printed Documentation

displays the name of the current style. To apply a different style to the Button object, choose Objects>>Style>>Apply. Select a style from the drop-down list box in the Designer Toolbar. Element lets you choose which part of the Button object you want to alter. By default, DataEase highlights the Fill element. Choose: Fill to change the color of the Button area. When you select Fill, DataEase lets you choose a background pattern from the Fill Type drop-down list. Line to change the color of the Button area border. When you select Line, DataEase lets you choose a border pattern from the Line Type drop-down list. Text to change the color of the characters that make up the Button label. Shade to change the color of the lower and right edges of the Button object (usually a dark color). Shine to change the color of the upper and left edges of the Button object (usually a bright color). Fill / Line Type lets you select a background/border pattern for the Button area. Color Selection lets you change the color of each display element in a Button object by clicking on the color you want. More Colors displays the Common Object Color dialog which is explained earlier in this chapter. Printing Options let you tell DataEase how to print the Button object. By default, DataEase prints the Button object as it appears on the screen. Choose: Don't Print to tell DataEase not to print the Button object (although the Button displays normally on screen). Start New Page to tell DataEase to print the Button object at the top of a new page. To Prevent Split to tell DataEase to start a new page if it cannot fit the entire Button on the current page. Always to tell DataEase to start a new page each time it prints the Button object. Sample shows you how the Button object appears on the document. Size to Fit tells DataEase to size the Button object according to the font specifications automatically. Fonts when you click on the Fonts button, DataEase displays the Font dialog. Actions When you click Action on the Display Attributes for Button Object dialog, DataEase displays the Action Selection dialog. This dialog lets you choose the action associated with the Button object. The Action Dialog

Objects>>Custom Field>>Check Box


Displays choices in a single box that toggles between no (unselected) and yes (selected). The default is no. When you choose CheckBox, DataEase displays the Field Name as the caption to the right of the checkbox. Field Object The Field Definition Dialog

Choice Fields
A Choice List field displays a list of predefined values in User View. The advantages of using Choice List fields are:

Significantly reduced disk space - DataEase stores each choice as a number, not as a text string. Faster and more accurate record entry - users can only choose values that you define.
Choice List Limits DataEase lets you define up to 99 choices of up to 60 characters each for each Choice List field. Visual Control DataEase lets you display a Choice List field in two ways.

RadioBox - displays choices as radio buttons. ListBox - displays choices in a drop-down list.

TIP: To use the options that appear in another Choice List field in the list you are currently defining, just type its name in the LIST NAME field.

132

Help File

Modifying a Choice List


DataEase displays the following prompt when you modify a Choice List:

Update data with new choice list?


Answer Yes if you change the order of the choices, or if you add or delete a choice from the list. Answer No if you only change the text (e.g., change Golfing to Golf).

How to Define a Choice List Field


1. 2. 3. 4. 5. Choose Choice List as the Data Type on the Field Definition dialog. To add a choice to the list, type the text for the first choice as you want it to appear on the screen. Click Add. DataEase adds the last choice entered at the end of the list. Type a List Name for the Choice List. Specify the Visual Control for the field.

Define Custom Colors

How to Define Custom Colors


1. 2. 3. or... 4. 5. 6. Type the appropriate values in the Hue/Sat/Lum or Red/Green/Blue text boxes. Click the Add to Custom Colors button. The new color is added to the Custom Colors palette. When you finish adding all the custom colors you want, click OK to save the Custom Colors palette, then click OK to save the Display Attributes. Click on the Define Custom Colors button on the Color dialog. Highlight the box in the Custom Colors palette where you want the new color to display. Use the color refiner cursor in the color grid and the pointer on the Vertical Luminosity bar to select the color you want.

Objects>>Ellipse
Lets you draw an Ellipse object.

How to Define a Graphic Object


1. 2. 3. 4. 5. 6. 7. Choose Objects>>Line, Rectangle, or Ellipse. DataEase displays the corresponding Graphic object cursor. Draw a rectangular Graphic object area on the document. Click and drag the mouse on the document to mark the upper left and lower right corners of the Graphic object area. As you move the mouse, DataEase displays dashed lines that mark the Graphic object area border. When you let go of the mouse button, DataEase automatically displays the Display Attributes dialog for the corresponding object. Specify the Graphic object characteristics. Set the controls on the Display Attributes dialog.

The Display Attributes Dialog

How to Draw a Symmetrical Graphic Object


To easily 1. 2. 3. 4. create a 45 angle (Line), a Square (Rectangle), or Circle (Ellipse), follow the steps below. Press and hold the Control (Ctrl) key. Click and drag the mouse on the document to draw the Graphic object area. DataEase displays the Graphic Object area in red and only lets you create a symmetrical object. When you are finished drawing the Graphic object, release the mouse button and the Control key. If you are resizing an existing object, drag an object border towards the red dotted line that DataEase displays in the Graphic object area until the object border turns to red.

Objects>>Field
lets you define a Field object. A Field object is an area on a document that accepts and displays data. Each field has a distinctive name used to reference the value it contains. A field accepts and displays user-entered data or automatically calculates a value based on a formula or the data in one or more fields. NOTE: To define a field quickly, click the Field cursor on the document to create a default-sized Field object and display the Field Definition dialog.

How to Define a Field Object


1. 2. Choose Objects>>Field. DataEase displays the Field cursor.

133

Printed Documentation

3. 4. 5. 6. 7.

Draw a rectangular Field area on the Record object. Click and drag the mouse on the document to mark the upper left hand and lower right hand corners of the field area. As you move the mouse, DataEase displays dashed lines that mark the outline of the Field area. When you let go of the mouse button, DataEase automatically displays the Field Definition dialog. Specify the field characteristics. Set the controls on the Field Definition dialog.

Field Definition
After you draw the Field area, DataEase displays the Field Definition dialog. This dialog lets you specify the characteristics of the Field object (e.g., set the Field Type, enter a Derivation or Validation formula, create a Help message, and define other important Field Characteristics). The Field Definition Dialog Select One or More Objects Size an Object Move an Object

Objects>>Custom Field>>Image
Lets you define an Image Field object. An Image Field is a field on a document that accepts a filename and displays graphic data in User View.

How to Define an Image Field


1. 2. 3. 4. 5. 6. Choose Objects>>Custom Field>>Image. DataEase displays the Image Field cursor. Draw a rectangular Image Field area in the Record object on the document. Click and drag the mouse on the document to mark the upper left and lower right corners of the Image Field area. As you move the mouse, DataEase displays dashed lines that mark the Image Field area border. When you release the mouse, DataEase displays the Field Definition dialog. Specify the Image Field characteristics.

The Image Field Definition Dialog


To define an Image field, you only need to set the Field Name, Data Type, and Length controls on the Image Field Definition dialog. The other controls on the Field Definition dialog are automatically deactivated when you create an Image Field object. Because DataEase stores the data for an Image field as a Text value (the filename of the graphic file), when it generates an autolayout (except when you choose Original Form), DataEase uses Text fields to replace the Image fields in the original document. If DataEase replaces an Image field with a Text field when you change the layout of a document, delete the Text field and insert an Image field in its place. Then double-click (or use the Express menu) to display the Field Definition dialog and select the name of the Image field from the drop-down list DataEase displays. Click OK to save the Image field in the new layout. Field Name identifies the Image Field. Each Image Field must have a Field Name. Default Field Names DataEase automatically creates a default Field Name for each field (e.g., the first field on the form is assigned the default name FIELD1, the second field is assigned FIELD2, etc.). To change the default, simply type another name. Custom Field Names A Field Name can be up to 30 characters long, including letters, numbers, ANSI characters, and spaces. Data Type lets you specify the type of data that you want to store in the field. When you define an Image field, you must choose Text as the Data Type so you can enter the filename and path for the images you want to display in User View. Length must be at least 12 digits long to accommodate an 8-digit DOS filename, a period (.), plus a 3-digit extension. If you plan to enter a path with nested subdirectories with each filename, you must increase the length of the field. Default Image Search Path The directories that DataEase searches for image files are: (1) Application directory, (2) DataEase program directory (e.g., C:\DFW), (3) Image search path. To change the default Image Search Path, or add more directories to the default Image Search Path, choose Application>>Preferences and enter the desired path(s) in the Image Search Path text box.

How to Assign Image Field Characteristics

134

Help File

Type a name for the Image Field below Field Name (e.g., BICYCLE.BMP). Select Text as the Data Type. Specify the Field Length. The Field Length must be at least 12 digits long to accommodate an 8-digit DOS filename, a period (.), and a 3-digit extension. If you want to include the drive and directory with the filename, increase the Field Length. Image File Formats DataEase supports the widely-used image formats listed in the table below. File Format Bitmap Graphic Interchange Format Windows Metafile PC Paintbrush Encapsulated PostScript Extension .BMP .GIF .WMF .PCX .EPS DataEase Supports... All uncompressed images. All non-interlaced images. All images that conform to the Aldus Placeable Metafile format. All monochrome, 16 color, 24 color, or 24-bit color images. All images (with or without display images).

1. 2. 3.

NOTE: If the .EPS file contains a display image (e.g., a TIFF or Windows Metafile), DataEase can display the image on screen. If not, DataEase displays the image filename. Tagged Image File Format (TIFF) .TIF All monochrome, grayscale, 256 color, and 24-bit color (uncompressed), and LZW, Packbits, Modified Huffman, CCITT Group 3 1D, Group 3 2D, and Group 4 (compressed). All 8, 16, 24, 32-bit version 1 and 2 images.

Targa

.TGA

NOTE: A compressed version 1 image takes longer to display than a compressed version 2 image. Joint Photographic Experts Group GEM Image WordPerfect Graphics Digital Multi-Page .PCX File .JPG .IMG .WPG .DCX All images. All images. All images. All images.

Objects>>Custom Field>>List Box


A Choice List field displays a list of predefined values in User View. The advantages of using Choice List fields are: Significantly reduced disk space - DataEase stores each choice as a number, not as a text string. Faster and more accurate record entry - users can only choose values that you define. Choice List Limits

DataEase lets you define up to 99 choices of up to 60 characters each for each Choice List field. Visual Control DataEase lets you display a Choice List field in two ways. RadioBox - displays choices as radio buttons. ListBox - displays choices in a drop-down list.

How to Define a Choice List Field


1. 2. 3. 4. 5. Choose Choice List as the Data Type on the Field Definition dialog. To add a choice to the list, type the text for the first choice as you want it to appear on the screen. Click Add. DataEase adds the last choice entered at the end of the list. Type a List Name for the Choice List. Specify the Visual Control for the field.

Field Object The Field Definition Dialog

Objects>>Line
Lets you draw a Line object.

135

Printed Documentation

How to Define a Graphic Object


1. 2. 3. 4. 5. 6. 7. Choose Objects>>Line, Rectangle, or Ellipse. DataEase displays the corresponding Graphic object cursor. Draw a rectangular object area on the document. Click and drag the mouse on the document to mark the upper left and lower right corners of the Graphic object area. As you move the mouse, DataEase displays dashed lines that mark the Graphic object area border. When you let go of the mouse button, DataEase automatically displays the Display Attributes dialog for the corresponding object. Specify the Graphic object characteristics. Set the controls on the Display Attributes dialog.

The Display Attributes Dialog

How to Draw a Symmetrical Graphic Object


To easily 1. 2. 3. 4. create a 45 angle (Line), a Square (Rectangle), or Circle (Ellipse), follow the steps below. Press and hold the Control (Ctrl) key. Click and drag the mouse on the document to draw the Graphic object area. DataEase displays the Graphic Object area in red and only lets you create a symmetrical object. When you are finished drawing the Graphic object, release the mouse button and the Control key. If you are resizing an existing object, drag an object border towards the red dotted line that DataEase displays in the Graphic object area until the object border turns to red.

Define on OLE Object

Objects>>OLE
Lets you create an OLE object. An OLE object is an object from another Windows application such as a chart created in Microsoft Excel that you embed onto a DataEase document. An OLE object lets you embed or copy (not link) an object from another Windows application such as a Bar, Pie, or 3D chart into a DataEase document using the Microsoft OLE (Object Linking and Embedding) protocol. A document that contains an OLE object is called a compound document. When you embed an object created in another Windows application, the object is stored as part of the DataEase document.

Overview of OLE Concepts


Object an entity that contains data from an external source application. Client the application that receives and stores an OLE object. DataEase is an OLE client (e.g., when you embed a Microsoft Excel chart in a DataEase form, DataEase is the client application). Server the application that remotely creates, updates, and displays an object. For example, when you embed a Microsoft Excel chart in a DataEase document, Excel is the server (or source) application. DataEase is not an OLE server. Linking inserting a link into a DataEase document. When you link an object, DataEase references the information stored by the server application. Links are created using the Copy DDE Link button on the Create OLE Object dialog. Links are also created using the Paste Link and Paste Special options on the Edit menu. Embedding inserting a new or existing object into a DataEase document. When you embed an object, all the information normally stored by the server application is stored by DataEase. Differences Between Linking and Embedding The differences between linking and embedding an OLE object are summarized below:

How to Define an OLE Object


1. 2. 3. 4. 5. 6. 7. 8. Choose Objects>>OLE. DataEase displays the OLE cursor. Draw a rectangular OLE area in the Form object on the document. Click and drag the mouse on the document to mark the upper left and lower right corners of the OLE area. As you move the mouse, DataEase displays dashed lines that mark the OLE area border. When you release the mouse, DataEase displays the Insert OLE Object dialog. Choose which object class you want to create. Then, click on Linked or Embedded and click OK. DataEase opens the source application that contains the object type you selected. Create a new object. If you chose Linked on the Create OLE Object dialog, you can open an existing object. If you are creating a Linked object, choose File>>Save As from the source application's File menu. Then, press Alt+Tab one or more times to return to DataEase.

136

Help File

9.

If you are creating an Embedded object, choose File>>Update from the source application's File menu. Then, choose File>>Exit to return to DataEase. 10. DataEase displays the OLE Paste Dialog. Click OK to paste the OLE object. DataEase displays the document and the Linked or Embedded object. NOTE: When you access a source application from DataEase via OLE, the source application's File>>Save option is replaced by File>>Update if you are embedding the object.

The Create OLE Object Dialog


Object Class tells DataEase what type (or class) of source object you want to link or embed in the current document. When you display the Create OLE Object dialog, DataEase lists all the OLE-aware applications available on your computer. A sample Object Class list is shown below. Choose: Excel Chart - to link or embed a Microsoft Excel chart. Excel Worksheet - to link or embed a spreadsheet created in Microsoft Excel. Package - to embed a package. A package is a custom-defined OLE object that invokes another OLE object, executable program, and/or command line from within a DataEase document. A package is represented by an icon or graphic. Paintbrush Picture - to link or embed a picture created in Microsoft Paintbrush. Sound - to play a sound file (if your computer has a multimedia sound adapter card). For example, you can digitize a spoken help message or other sound effect for your document. Linked lets you insert an existing object (that references the information stored by the server application) into a DataEase document. Copy DDE Link opens the Paste Special dialog. The Paste Special dialog lets you paste data (not visible in Designer View) or a link to another Windows product in a DataEase document. Embedded lets you insert a new or existing object (that tells DataEase to store the information normally stored by the server application) into a DataEase document. Adding Sound and Video to a DataEase Document To enhance your application with multimedia, DataEase lets you add pre-recorded sound and video clips to any form, report, procedure, or menu document. You can embed pre-recorded sound and video clips in two ways, by using either:

Window's built-in OLE capability. OLE displays the sound or video clip in a window with default controls. This method of adding multimedia to a DataEase document is explained on the following pages. A DataEase Custom-Defined Function (CDF). A CDF lets you hide the default OLE controls and create custom controls using DataEase buttons.

Embedding Mutimedia in a DataEase Document You can easily enhance a document by adding a music, sound effect, or recorded speech sound clip saved as a waveform (.WAV) file, or by adding a full-motion video clip saved as an audio/video (.AVI) file. Try recording a help message as a .WAV sound file instead of displaying a form or field help messages on the screen. Similarly, you can annotate a report to clarify the importance of the newly generated data. System Requirements To embed a sound (.WAV) file in a document using OLE, you must have Windows Sound Recorder or Media Player installed on your computer. To play a sound file, you must have a Windows-compatible sound card or a speaker driver such as Microsoft's SPEAKER.DRV file installed on your computer. To embed an OLE video (.AVI) clip in a document, you must have both Video for Windows and Media Player installed on your computer. See your Windows documentation for information on installing the Windows Sound Recorder and Media Player applications.

How to Play an Embedded Sound Clip in User View


To listen to a sound clip embedded in a DataEase document, double-click on the Sound Recorder microphone object. DataEase plays the .WAV file associated with the current record.

How to Play an Embedded Video Clip


1. 2. To play a video embedded in a DataEase document, double-click on video window. DataEase plays the .AVI file associated with the current record. Using OLE, you can embed a sound (.WAV) file in a DataEase document. The steps below describe how to add a help message to the ACTIVITIES form.

137

Printed Documentation

How to Add a Sound Clip to a Document


1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Without exiting DataEase, switch to the Windows Program Manager by pressing the Alt+Tab one or more times. Start the Windows Sound Recorder application by double-clicking on the Sound Recorder icon (which should be located in the Accessories group). Sound Recorder opens. Choose File>>Open from the Sound Recorder File menu. Sound Recorder displays the Open dialog. Locate the C:\DFW\CLUB directory and highlight the ACTHELP.WAV file. Click OK to load the .WAV file. Choose Edit>>Copy to copy the .WAV file to the clipboard. Return to the DataEase ACTIVITIES form by pressing Alt+Tab one or more times. Switch to Designer View by clicking the Designer View button on the Toolbar. Choose Edit>>Paste to paste the sound file into the ACTIVITIES form. DataEase displays the hand pointer. Click and drag to position the sound object above the Activity picture. DataEase pastes the Sound Recorder microphone icon into the ACTIVITIES form to indicate the presence of an embedded sound file. Using OLE, you can embed a video (.AVI) file in a DataEase document. The steps below describe how to add a resort's promotional video to the CLUBS form.

How to Add a Video Clip to a Document


1. 2. 3. 4. 5. 6. 7. 8. 9. Without exiting DataEase, switch to the Windows Program Manager by pressing the Alt+Tab one or more times. Start the Windows Media Player application by double-clicking on the Media Player icon (which should be located in the Accessories group). Media Player opens. Choose File>>Open from the Media Player File menu. Media Player displays the Open dialog. Locate the C:\DFW\CLUB directory and highlight the BORABORA.AVI file. Click OK to load the .AVI file. Choose Edit>>Copy Object to copy the .AVI file to the clipboard. Return to the DataEase CLUBS form by pressing Alt+Tab one or more times. Switch to Designer View by clicking the Designer View button on the Toolbar.

10. Choose Edit>>Paste to paste the video file into the CLUBS form. 11. DataEase displays the hand pointer. 12. Click and drag to position the video object above the club name. 13. DataEase pastes the video, paused at the first frame, into the CLUBS form, to indicate the presence of an embedded video file.

Objects>>Picture
Lets you define a Picture object. A Picture object is a background picture that appears the same on each record, such as the logo in the upper right corner of each document in the Club ParaDEASE application. You can assign any Button object action to a Picture object.

How to Define a Picture Object


1. 2. 3. 4. 5. 6. 7. 8. 9. Choose Objects>>Picture. DataEase displays the Picture cursor. Draw a rectangular Picture area on the document. Click and drag the mouse on the document to mark the upper left and lower right corners of the Picture area. As you move the mouse, DataEase displays dashed lines that mark the Picture area border. When you let go of the mouse button, DataEase automatically displays the Picture Definition dialog. Specify the name of the image you want to display. After you specify an image, click OK. Specify the Picture characteristics. Double-click on the Picture object to display the Picture Definition dialog. Click on Display to display the Display Attributes for Picture Object dialog. Click on Actions to display the Action Selection dialog.

The Picture Definition Dialog


Picture File lets you choose the name of the image you want to display. Directories lets you choose the directory path containing the image you want. Drives lets you choose a local or network drive as the current drive. File Types

138

Help File

tells DataEase which file type format(s) to display in the Picture File section of the dialog. To display all format types, choose All Supported Formats. DataEase supports the widely-used image formats listed in the table below. File Format Bitmap Graphic Interchange Format Windows Metafile PC Paintbrush Encapsulated PostScript Extension .BMP .GIF .WMF .PCX .EPS DataEase Supports... All uncompressed images. All non-interlaced images. All images that conform to the Aldus Placeable Metafile format. All monochrome, 16 color, 24 color, or 24-bit color images. All images (with or without display images).

NOTE: If the .EPS file contains a display image (e.g., a TIFF or Windows Metafile), DataEase can display the image on screen. If not, DataEase displays the image filename. Tagged Image File Format (TIFF) .TIF All monochrome, grayscale, 256 color, and 24-bit color (uncompressed), and LZW, Packbits, Modified Huffman, CCITT Group 3 1D, Group 3 2D, and Group 4 (compressed) All 8, 16, 24, 32-bit version 1 and 2 images.

Targa

.TGA

NOTE: A compressed version 1 image takes longer to display than a compressed version 2 image. Joint Photographic Experts Group GEM Image WordPerfect Graphics Digital Multi-Page .PCX File .JPG .IMG .WPG .DCX All images. All images. All images. All images.

The Display Attributes For Picture Object Dialog


Style Name displays the name of the current style. To apply a different style to the Picture object, choose Objects>>Style>>Apply. Select a style from the drop-down list box on the Designer Toolbar. Element lets you change the color of the Picture area border. See Line Type and Color Selection below. Line Type lets you select a border pattern for the Picture area. Color Selection lets you change the color of the object border by clicking on the color you want. More Colors displays the Color dialog, which is explained earlier in this chapter. Printing Options let you tell DataEase how to print the Picture object. By default, DataEase prints the picture as it appears on the screen. Choose: Don't Print to tell DataEase not to print the picture (although the picture displays normally on screen). Start New Page to tell DataEase to print the picture at the top of a new page. To Prevent Split to tell DataEase to start a new page if it cannot fit the entire picture on the current page. Always to tell DataEase to start a new page each time it prints the picture. Sample shows you how the picture appears on the document. Size to Fit tells DataEase to adjust the size of the picture to match the size of the image stored in the picture file. Stretch to Fit tells DataEase to scale the picture to fit the entire frame, even if this distorts the image. Actions Like a Button object, you can assign an action to a Picture object that is triggered when the mouse is clicked on the Picture in User View. To assign an action, open the Picture Definition dialog by double-clicking on the Picture object.

139

Printed Documentation

Then, click on the Actions button to display the Action Selection dialog. This dialog lets you choose the action associated with the Picture object. The Action Dialog

Objects>>Rectangle
Lets you draw a Rectangle object.

How to Define a Graphic Object


1. 2. 3. 4. 5. 6. 7. Choose Objects>>Line, Rectangle, or Ellipse. DataEase displays the corresponding Graphic object cursor. Draw a rectangular Graphic object area on the document. Click and drag the mouse on the document to mark the upper left and lower right corners of the Graphic object area. As you move the mouse, DataEase displays dashed lines that mark the Graphic object area border. When you let go of the mouse button, DataEase automatically displays the Display Attributes dialog for the corresponding object. Specify the Graphic object characteristics. Set the controls on the Display Attributes dialog.

The Display Attributes Dialog

How to Draw a Symmetrical Graphic Object


To easily 1. 2. 3. 4. create a 45 angle (Line), a Square (Rectangle), or Circle (Ellipse), follow the steps below. Press and hold the Control (Ctrl) key. Click and drag the mouse on the document to draw the Graphic object area. DataEase displays the Graphic Object area in red and only lets you create a symmetrical object. When you are finished drawing the Graphic object, release the mouse button and the Control key. If you are resizing an existing object, drag an object border towards the red dotted line that DataEase displays in the Graphic object area until the object border turns to red.

Objects>>Custom Field>>Radio Box


Displays choices as radio buttons. Field Object The Field Definition Dialog

Define a Summary Field

How to Define a Summary Field


1. 2. 3. 4. 5. 6. Draw the Field area on the screen by clicking and dragging the Field cursor on a record in the document. DataEase displays the Field Definition dialog. Choose the Summarize option located near the Field Name on the Field Definition dialog. DataEase displays the Summarize options on the Field Definition dialog. Specify the Summary Level (document), Summary Field (field), and Summary Type (statistical operator). When you are finished specifying the Summary controls, click OK.

NOTE: After you create the SUMMARY PRICE field, you can delete the PRICE Subform.

Summarize Dialog
Summarize on Level displays the names of the current document and all documents that are nested on the current document. Choose the document that contains the field you want to summarize. Summarize on Field displays the names of all the fields that appear on the highlighted document. Summary Type lists all the statistical operators available for the highlighted field. The table below summarizes the statistical operators that can be used to create a Summary field. Statistical Operators Available in a Summary Field Statistical Operators Sum Mean Value Returned by the Field Total Average Corresponding Field Types Number, Currency Number, Currency, Date, Time Examples (TOTAL DUE Field on the RESERVATIONS Form) Total cost of all reservations. Average cost of all reservations.

140

Help File

Max

Highest (maximum)

Text, Number, Numeric String, Currency, Date, Time, Choice, Yes/No, Sequenced ID, Memo Text, Number, Numeric String, Currency, Date, Time, Choice, Yes/No, Sequenced ID, Memo Text, Number, Numeric String, Currency, Date, Time, Choice, Yes/No, Sequenced ID, Memo Number, Currency Number, Currency

Highest cost of a reservation.

Min

Lowest (minimum)

Lowest cost of a reservation.

Count

Number of records that satisfy a condition

Count of all reservation records.

Stddev Variance

Standard Deviation (square root of the variance) Average of the squared difference between each item value and the mean value Standard Error (standard deviation divided by the square root of the number of items)

Standard Deviation of all reservations. Variance of all reservations.

Stderr

Number, Currency

Standard Error of all reservations.

Report Summary Fields In addition to using a Summary field in a form document, you can use a Summary field in report document.

Objects>>Custom Field>>Spin Button


Displays numeric values. You can type in a value or use the vertical arrow controls to display a value. Field Object The Field Definition Dialog

Objects>>Text
Lets you define a Text object. A Text object is a block of descriptive text such as a Form Name or a Field label. Text objects are generally used to provide contextual information about fields, Subforms, and other objects on the document. NOTE: To define a Text object quickly, click on the document to create a default-size Text area and display the Display Attributes for Text Object dialog.

How to Define a Text Object


1. 2. 3. 4. 5. 6. 7. 8. 9. Choose Objects>>Text. DataEase displays the Text cursor. Draw a rectangular Text area on the document. Click and drag the mouse on the document to mark the upper left hand and lower right hand corners of the Text area. As you move the mouse, DataEase displays dashed lines that mark the Text area border. When you release the mouse button, DataEase creates a Text object in the size that you specified. Type the text that you want to display on the screen. You can create a Text object as either a single or multi-line object. To start a new line of text, press Sh+Enter or Ctrl+Enter. When you finish typing characters, press Enter. Press Enter once more to display the Display Attributes for Text Object dialog.

10. Specify the Text Display characteristics. 11. Set the controls on the Display Attributes for Text Object dialog. The Text Object Dialog Select One or More Objects Size an Object Move an Object

Objects>>Variable
Lets you define a Variable object. A Variable is a field-like object on a document that displays variable system-generated information (e.g., current date, current time, current page number), rather than the actual data from the database.

141

Printed Documentation

How to Define a Variable


1. 2. 3. 4. 5. 6. 7. 8. Choose Objects>>Variable. DataEase displays the Variable cursor. Draw a rectangular Variable area on the document. Click and drag the mouse to mark the upper left and lower right corners of the Variable area. As you move the mouse, DataEase displays dashed lines that mark the Variable area border. When you release the mouse, DataEase displays the Variable Definition dialog. Specify the type and format for the Variable. When you click OK, DataEase displays the Display Attributes for Variable dialog. Specify the Variable display characteristics.

Defining a Variable

The Variable Definition Dialog


Select Type lets you choose the type of variable you want to create. The variable types are summarized in the table below. Variable Object Types Variable Type Page Number Date Time Document Name Application Name User Name Select Format lets you choose the format for the currently highlighted variable. The variable types are summarized in the table below. Variable Object Format Variable Format Date Format Choices MM/DD/YY DD/MM/YY YY/MM/DD HH:MM HH:MM AM/PM How a Variable is Displayed Month/Day/Year Day/Month/Year Year/Month/Day Hour:Minutes Hour:Minutes(followed by AM or PM) Used To... Display the current page number of the document. Display the current date. Display the current time. Display the name of the document. Display the name of the application. Display the User Name used to sign on to the application.

Time

The Display Attributes For Variable Object Dialog


Style Name displays the name of the current style. To apply a different style to the Variable object, choose Objects>>Style>>Apply. Select a style from the drop-down list box on the Designer Toolbar. Element lets you choose which part of the Variable object you want to alter. By default, DataEase highlights the Fill element. Choose: Fill to change the color of the Variable area. When you select Fill, DataEase lets you choose a background pattern from the Fill Type drop-down list. Line to change the color of the Variable area border. When you select Line, DataEase lets you choose a border pattern from the Line Type drop-down list. Fill / Line Type lets you select a background/border pattern for the Variable area. Color Selection lets you change the color of each display element in a Variable object by clicking on the color you want. More Colors displays the Color dialog, which is explained earlier in this chapter. Printing Options

142

Help File

let you tell DataEase how to print the variable. By default, DataEase prints the variable as it appears on the screen. Choose: Don't Print to tell DataEase not to print the variable (although the object displays normally on screen). Start New Page to tell DataEase to print the variable at the top of a new page. To Prevent Split to tell DataEase to start a new page if it cannot fit the entire variable on the current page. Always to tell DataEase to start a new page each time it prints the variable. Sample shows you how the variable appears on the document. Size to Fit tells DataEase to size the variable according to the font specifications and Variable type automatically. Fonts when you click on the Fonts button, DataEase displays the Font dialog explained earlier in this chapter. NOTE: Variable information can be displayed anywhere in any type of document. However, it is most frequently placed in the Page Header or Page Footer area.

Objects>>Style>>Delete
Lets you delete a predefined Object Style.

How to Delete an Object Style


1. 2. 3. 4. 5. # Highlight the object on the screen that uses the style you want to delete. Choose Objects>>Style>>Delete. DataEase displays the Delete a Style dialog. Choose the name of the style you want to delete from the drop-down list DataEase displays. DataEase automatically displays the name of the style used by the highlighted object. Click OK. DataEase applies the default style to all objects that used the deleted style.

The Delete A Style Dialog


Select Style to Delete tells DataEase which style to delete from the current Style Sheet.

Display a Hidden Object's Borders

View>>Form/Field Outlines
Highlights Form, Record, and Field objects when the object's display attributes specify no visible border. This option lets you select, move, or resize these objects easily.

How to Display a Hidden Object's Borders


1. 2. 3. Choose View>>Form/Field Outlines. DataEase displays a rectangle around each object that has no visible border. DataEase outlines border lines objects using the line color specified in the Presentation Attributes dialog.

NOTE: The PRICE and SEASON fields are used to calculate the cost for each member in the reservation party and are deliberately hidden from users.

Drawing Symmetrical graphics

How to Draw a Symmetrical Graphic Object


To easily 1. 2. 3. 4. create a 45 angle (Line), a Square (Rectangle), or Circle (Ellipse), follow the steps below. Press and hold the Control (Ctrl) key. Click and drag the mouse on the document to draw the Graphic object area. DataEase displays the Graphic Object area in red and only lets you create a symmetrical object. When you are finished drawing the Graphic object, release the mouse button and the Control key. If you are resizing an existing object, drag an object border towards the red dotted line that DataEase displays in the Graphic object area until the object border turns to red.

Validation Formula
lets you verify a field entry by establishing a range of acceptable values. When you enter a value in the field, DataEase checks the value to make sure that it falls within the specified range. If the value you entered falls outside the established range, DataEase first displays an information message dialog followed by an alert message dialog. DataEase does not let the cursor exit the field until the value has been changed to conform to the validation check. Validation Formula Components A Validation Formula can contain any combination of constant values, field values, lookup formulas, relational statistical operators, and any of the following comparison operators:

143

Printed Documentation

Comparison Operator = < > <= >= between...to not

Function equal to less than greater than less than or equal to greater than or equal to between [starting expression] to[ending expression] (inclusive) exclude a value

A constant value is a Text, Date, Time, Numeric String, or Number value that does not change. A DQL function returns a value in a different format. A relationship name refers to another table that the current form's underlying table is related to. A relational statistical operator lets you extract and summarize data that is stored in a related table. Sample Validation Formula For example, the expression:

PRICE between 600.00 to 2200.00


could be used as a Validation Formula in the PRICE field on the PRICES form in the Club ParaDEASE application to set a lower limit of 600.00 and an upper limit of 2200.00. If you enter a value lower than 600.00 or higher than 2200.00, DataEase displays an error message and restricts cursor movement until the error is corrected. NOTE: When you create a Validation Formula, you can establish either a lower limit, an upper limit, or both.

The Validation Formula Dialog


The Validation Formula dialog displays four list boxes: Functions lists all the DQL predefined and custom defined functions and the relational operators. Use the scroll bar to browse through the list of available functions. Relationships displays all the relationships for the active form including the current relationship which provides access to system information such as the current time, current date, current user name, current computername, and current user level. Use the scroll bar to view all the relationships. Columns displays all the field names for the active form. If a relationship is selected from the Relationships list, the Columns list displays the names of the fields in the related form. Use the scroll bar to view all the column names. Operators lists comparison operators, punctuation marks, and wild card characters. Use the scroll bar to view all the operators. Next to the list box of comparison operators, DataEase displays a numeric key pad for entering numbers into a Validation Formula.

How to Enter a Validation Formula


1. 2. 3. 4. 5. 6. Double-click on the Field object. DataEase displays the Field Definition dialog. Click on the Validation radio button. DataEase opens the Validation Formula editor. Enter the Validation Formula manually, or click on a selection from the four list boxes and the numerical keypad to enter field names, relationships, functions, operators, and numbers in the formula box. When you finish entering the formula, click OK. DataEase check the spelling and syntax. If DataEase finds an error, it positions the cursor at the start of the invalid word or expression. If the formula is valid, DataEase saves it as part of the field definition.

NOTE: Constant values (and any associated quotation marks) must be entered into the formula manually. If a Field Name or a relationship name is more than one word long, it must be enclosed in quotation marks. A constant text value, like the last name "Smith" must also be entered in quotation marks. Formula Syntax A constant value must follow the rules listed below, so DataEase can distinguish constants from Field Names and differentiate different types of constants. Rules for Constant Values Field Type Text Numeric String Number, Currency Examples "James*""James Ivory" 2033748000 1234.1212- 0.34 Comments Enclose in quotation marks. Do not type formatting characters. Do not type commas.

144

Help File

Date Time Choice

12/31/92 04:42:53 MASTER CARD

Type slashes. Type colons. Type the value, not the choice number.

Using Parentheses in a Formula You can use parentheses to control the order in which the operations are performed. When DataEase calculates a value, the operations in a Validation Formula are performed from left to right. Multiplication and division take precedence over addition and subtraction. For example, the parentheses in the expression:

(6 + 12) * 2
tell DataEase to perform the addition operation (6 + 2) and then multiply the result by 2. Parentheses are also used around any expression that follows a DQL function. For example, the weekday function in the expression:

DEPARTURE DATE >= DEPARTURE DATE +(6-weekday(DEPARTURE DATE))


tells DataEase to determine the day of the week using the value from the DEPARTURE DATE field. When multiple sets of parentheses appear in an expression, the operation in the interior-most set of parentheses is performed first. In this example, the inner function:

weekday (DEPARTURE DATE)


tells DataEase to determine the day of the week from the value in the DEPARTURE DATE field. The result is a number from 1 to 7. The second operation is to subtract the result of the first operation from 6. The new result is a number from -1 to 5. In the final operation, DataEase adds the result to the date in the DEPARTURE DATE field. The final result is a Saturday that is greater than or equal to the date entered by the user. This formula is used to verify that the date entered into the DEPARTURE DATE field is always a Saturday. Validation Formula Length DataEase allows you to enter a Validation Formula up to 4,000 characters long. If the formula you enter exceeds the area of the Validation Formula box, the formula scrolls, allowing you to continue typing. Entering a Validation Formula Manually A Validation Formula can also be entered manually. When you click the OK button to save the formula, DataEase performs a spelling and syntax check. If any errors are found, DataEase beeps and positions the cursor at the start of the invalid word or phrase. You cannot save the field definition until you correct the error. NOTE: The Validation Formula must test for a value that is compatible with the Data Type for the current field. For example, a Validation Formula that sets a lower limit of "a" and a lower limit of "z" is not a valid formula in a Date field.

The Field Definition Dialog


The Field Definition dialog is made up of several sections, (e.g., Field Name, Type, Derivation, Validation Formula, Help, and Field Data options). Each section is explained in the order it appears (from top to bottom and from left to right) beginning with Field Name below. If you define a form over an existing table, DataEase automatically uses the column definition to assign the field's characteristics. Specify the Field Name and appearance only. Field Name identifies the field and the column in the associated database table that stores entered data. When you create a form that: Defines a table, DataEase creates a new data column using the name you specify. Uses a table, you choose the name of an existing data column from a drop-down list that DataEase displays. NOTE: You cannot define a field without a Field Name. If you do not specify a Field Name, DataEase provides a default name (e.g., Field1). Default Field Names DataEase automatically creates a default Field Name for each field (e.g., the first field on the form is assigned the default name FIELD1, the second field is assigned FIELD2, etc.). To change the default, simply type another name. Custom Field Names A Field Name can be up to 30 characters long, including letters, numbers, the underscore character, and spaces. Do NOT use characters other than A-Z, a-z, 0-9, plus the space character and underscore character. If a field with the same name as the field you are creating (or pasting) already exists on the document, DataEase appends a numeric suffix to the Field Name (e.g., DataEase changes the field named ADDRESS to ADDRESS2). Each SQL engine type enforces its own restrictions on the length, characters, and words that make up a column name. NOTE: Do not use DQL commands or function names as Field Names. Field Definition Display Options The four radio buttons, Type, Derivation, Validation Formula, and Help, (beneath the Field Name) control which options DataEase displays on the Field Definition dialog. The four Field Definition Display controls are: Control Type Lets You Define Basic Field characteristics (e.g., Field Length, Format, etc.).

145

Printed Documentation

Derivation Validation Formula Help

A formula that automatically enters a field value. A formula that limits user-entered values. Custom Field Help message.

Field Data
The Field Data options on the right side of the Field Definition dialog let you specify whether a user can, cannot, or must enter data in the field when filling in a record during record entry. Required prevents a user from saving the current record until data is entered in the field. The CLUB ID field on the MEMBERS form is an example of a Required field. The Required DataEase native Field characteristic is equivalent to the Not Null column attribute in an SQL database table. Virtual does not store the field value in the table. A Virtual field value is automatically rederived each time the record is displayed or printed. The CLUB NAME field on the RESERVATIONS form (which is derived by the formula lookup CLUBS CLUB NAME) is an example of a Virtual field. Advantages Disadvantages Field is automatically rederived so Field can't be assigned the Indexed or Unique attribute. it always displays the correct value. Virtual attribute saves disk space Performance is decreased when a Virtual field is in a Derivation since the value is not stored. formula or is used to enter a record selection criteria in QBF or QBM. NOTE: A Virtual field does not save data in the associated database table. Prevent Entry prevents a user from entering data in the field. Choose Prevent Entry for any field which has a value derived by a Derivation Formula (e.g., lookup CLUBS CLUB NAME). The RESERVATION ID field on the RESERVATIONS form is a Prevent Entry field. NOTE: The cursor can only be placed in a Prevent Entry field when you are searching for records using QBF. Indexed creates an Indexed field attribute that helps DataEase find and/or sort records quickly. When you search for a particular record using an Indexed field, DataEase uses the index just as you look in the index of a book to find a particular subject. If the document defines or uses a: Native table SQL table DataEase creates an Index file for each indexed field. You can Index up to 254 fields per form. DataEase creates an Index attribute on each column that corresponds to an Indexed field. Each SQL engine type imposes its own restrictions on the number of Indexed columns allowed per table. When defining a form that uses a table, you cannot remove the Indexed field attribute from any field.

NOTE: When you remove the Index attribute from a field that defines a Native table, DataEase deletes the corresponding Index file. Which Fields Should Be Indexed? We recommend that you index fields that are used:

For searching and sorting. As Match (key) fields in a relationship.

NOTE: For maximum performance, Index as few fields as possible. If you find you need additional indexes, you can add them later. Benefits and Costs of Indexing Fields You should weigh the following benefits and costs of Indexing before creating a field: Indexing lets DataEase work much faster when:

Selecting records. Grouping and/or sorting records. Matching fields in related forms (performing lookups).

146

Help File

Finding duplicate records. The disadvantages of Indexing native tables (only) are:
Data entry functions run more slowly since it takes longer to add or modify records in each Index file. Index files take up additional storage space on your hard drive.

Fast Text Index Lets DataEase find matching records quickly and reduces the size of the index file. When you add a Fast Text Index to a field, DataEase compresses or collapses the size of the field's index key, optimizing query performance. We recommend that you add a Fast Text Index to a field that:

Is a Match field in a relationship.

You frequently use for exact match searches(e.g., PRICE=495.00). However, we recommend that you do not add a Fast Text Index to a field that:
You frequently use for range selection searches(e.g., PRICE<650.00).

Use to sort records. DataEase cannot sort records based on the values in a field with a Fast Text Index. You can create a Fast Text Index on any Text or Numeric String field greater than six characters in length. You'll notice the greatest performance increase with fields longer than 40 characters. DataEase automatically creates a Fast Text Index on any Indexed Text or Numeric String field longer than 117 characters.
Composite Indexing Most SQL engines support composite (or concatenated) indexes in addition to indexes based on single fields. A composite index identifies records based on the values in two or more fields (columns). For example, if you indexed both the LAST NAME and the FIRST NAME fields on the MEMBERS form, DataEase orders the records in the Index file in alphabetical order by LAST NAME, then by FIRST NAME. Clustering Clustering is a server feature in which data is physically stored in indexed order to speed data retrieval. The field (or column) used to index clustered data is called the cluster key. The cluster key is made up of all the unique indexed fields in the table. Clustering can greatly improve the performance of certain queries that select records based on a contiguous range of indexed values. Unique creates a Unique field attribute that prevents duplicate records and preserves data integrity. MEMBER ID is a sample Unique field. When To Create a Unique Field When you create a form that:

Defines a table - we recommend that you define at least one field as Unique. Unique fields greatly decrease the time it takes DataEase to search for or sort data in an SQL table. Uses an existing table - you must create a field for each Unique column in the table, or DataEase will not let you save records in the form. DataEase automatically defines a Unique Field attribute for each field defined over a corresponding Unique column.

NOTE: The combination of Unique fields on a DataEase form is called a Unique key. DataEase lets you save the same Unique field value in more than one record, as long as the combination (key) is unique.

Field Security
The Field Security options on the right side of the Field Definition dialog let you specify the minimum security level required to see (View) or enter and modify (Write) data. View Lets you choose the minimum security level required to view data in the current field. If your security level is less than the View security level, DataEase displays a blank field. The default View security level is Low 3. Write Lets you choose the minimum security level required to write data in the current field. If your security level is less than the Write security level, DataEase prevents the cursor from entering the field. The default Write security level is Low 3. The seven DataEase security levels (in order of decreasing security) are:

High, Medium 1, Medium 2, Medium 3, Low 1, Low 2, Low 3


NOTE: The document-level security settings specified on the Document Properties dialog take precedence over fieldlevel security. Each SQL engine type requires that you have the appropriate server permission in addition to the necessary DataEase security level.

Summarize
When you click on Summarize, DataEase displays the controls that let you specify statistical operators to derive the current field value.

147

Printed Documentation

How to Define a Summary Field


1. 2. 3. 4. 5. 6. Draw the Field area on the screen by clicking and dragging the Field cursor on a record in the document. DataEase displays the Field Definition dialog. Choose the Summarize option located near the Field Name on the Field Definition dialog. DataEase displays the Summarize options on the Field Definition dialog. Specify the Summary Level (document), Summary Field (field), and Summary Type (statistical operator). When you are finished specifying the Summary controls, click OK.

NOTE: After you create the SUMMARY PRICE field, you can delete the PRICE Subform. K

Summarize Dialog
Summarize on Level displays the names of the current document and all documents that are nested on the current document. Choose the document that contains the field you want to summarize. Summarize on Field displays the names of all the fields that appear on the highlighted document. Summary Type lists all the statistical operators available for the highlighted field. The table below summarizes the statistical operators that can be used to create a Summary field. Statistical Operators Available in a Summary Field Statistical Operators Sum Mean Max Value Returned by the Field Total Average Highest (maximum) Corresponding Field Types Number, Currency Number, Currency, Date, Time Text, Number, Numeric String, Currency, Date, Time, Choice, Yes/No, Sequenced ID, Memo Text, Number, Numeric String, Currency, Date, Time, Choice, Yes/No, Sequenced ID, Memo Text, Number, Numeric String, Currency, Date, Time, Choice, Yes/No, Sequenced ID, Memo Number, Currency Number, Currency Examples (TOTAL DUE Field on the RESERVATIONS Form) Total cost of all reservations. Average cost of all reservations. Highest cost of a reservation.

Min

Lowest (minimum)

Lowest cost of a reservation.

Count

Number of records that satisfy a condition

Count of all reservation records.

Stddev Variance

Standard Deviation (square root of the variance) Average of the squared difference between each item value and the mean value Standard Error (standard deviation divided by the square root of the number of items)

Standard Deviation of all reservations. Variance of all reservations.

Stderr

Number, Currency

Standard Error of all reservations.

Report Summary Fields In addition to using a Summary field in a form document, you can use a Summary field in report document.

Field Help
When you click on Help, DataEase lets you define a Help message for the current field. You can define a Field Help message up to 1330 characters long. How DataEase Displays the Help Message In User View, DataEase displays the Field Help message in the Status Bar. Although you can define a Help message up to 1330 characters long, the number of characters that DataEase displays on screen depends on your video resolution and monitor size. To view the entire Field Help message, press Alt+F1. DataEase displays a pop-up Field Help window on the screen that contains the entire Help message. To close the window, click on OK.

Type
When you click on Type (the default), DataEase lets you specify the Data Type and its associated options.

148

Help File

Data Type lets you specify the type of data (e.g., Text, Number, Choice List) that you want to store in the field. Text is the default Data Type. To select a different Data Type, click on the button beside the desired Field Type. Each Data Type is described in detail below. Text Numeric String Number Currency Date Time Sequenced ID Choice List Yes/No Memo

Visual Control lets you specify the appearance of the field on the form (e.g., EditBox, RadioBox, Spin). The field's Data Type determines which Visual Controls you can select. EditBox is the most common type of Visual Control. Each Visual Control is described in detail later in this chapter after the explanation of Data Types.

Text
A Text field stores and displays descriptive information such as a name or address. The maximum length of a Text field is 255 characters. Characters Allowed in a Text Field DataEase accepts all alphanumeric (and ANSI) characters in a Text field, except the three DataEase wild card characters (*, ?, and ~). Visual Control DataEase lets you display a Text field in two ways.

EditBox - displays alphanumeric values in a rectangular field. ImageField - accepts an image filename and displays graphic data during User View.

NOTE: You can include a pathname directly in the ImageField(e.g., C:\EMPLOYEE\BMPS). If you do not specify a pathname, DataEase searches the directories specified in the Image Search Path on the Application Preferences dialog. Fast Text Index Lets DataEase find matching records quickly and reduces the size of the index file. We recommend that you add a Fast Text Index to a Text field longer than six characters that you:

Frequently search for an exact matching value (by using the equal to {=} operator).

Use as a Match field in a relationship. However, we recommend that you do not add a Fast Text Index to a Text field that you:
Frequently search for a range of values (by using operators such as between to, greater than, etc.). Use to sort records.

NOTE: A Text field can contain letters, numbers, or a combination of both. ZIP CODE (above) can be a Text field or a Numeric String field.

Numeric String
A Numeric String field stores and displays numbers used for identification only (i.e., numbers that are not used for calculations). DataEase fills or pads an incompletely filled Numeric String field with leading zeros. The maximum length of a Numeric String field is 255 digits. Types of Numeric String Fields DataEase lets you define two types of Numeric String fields:

Predefined - select a Formatted String Option from the list of seven formats DataEase displays in the dropdown list box.

Custom - create a custom format by typing a nine (9) or zero (0) for each digit position and, optionally, the exact punctuation marks or formatting characters (such as dashes) you want. You can turn off the automatic padding in Numeric String fields on the Document Properties dialog. Although a Numeric String value is not designed for calculations, a DQL mathematical function can be used on it (e.g., floor). DataEase automatically converts the first (leftmost) 14 digits to a Floating Point Number and returns the first 14 digits of the result. Any other digits are truncated. Visual Control DataEase lets you display a Numeric String field in two ways.

EditBox - displays alphanumeric values in a rectangular field. SpinBox - displays numeric values. Type in a value or use the vertical arrow controls to display a value.

149

Printed Documentation

Fast Text Index Lets DataEase find matching records quickly and reduces the size of the index file. We recommend that you add a Fast Text Index to a Numeric String field longer than six digits that you:

Frequently search for an exact matching value (by using the equal to {=} operator).

Use as a Match field in a relationship. However, we recommend that you do not add a Fast Text Index to a Numeric String field that you:
Frequently search for a range of values (by using operators such as between to, greater than, etc.). Use to sort records.

Number
A Number field stores and displays a numeric value that can be used in calculations. The maximum length for a Number field is 14 digits. Types of Number Fields DataEase lets you define three types of Number fields differentiated by the location of the decimal point.

Integer - contains only whole numbers (no decimal point). Choose None in the Decimals list box. Floating Point - lets you specify the location of the decimal point by pressing the decimal key (.) in User View. Choose Float in the Decimals list box.

Fixed Point - lets you predefine the number of digits to the left and right of the decimal point. Choose the number of digits to the right of the decimal from the Decimals list box. For Integer and Fixed Point fields, DataEase automatically adds a comma after every third digit. By default, DataEase displays the comma (,) as the 1000 separator. To change the default, select International from the Windows Control Panel. The decimal point (.) and negative sign (-) each take up one digit in a Number field. When you define a Number field, be sure to allow room for a decimal and the negative symbol. Visual Control DataEase lets you display a Number field in two ways. EditBox - displays alphanumeric values in a rectangular field. SpinBox - displays numeric values. Type in a value or use the vertical arrow controls to display a value.

Currency
A Currency field value stores and displays a monetary amount that can be used in calculations. The maximum length for a Currency field is 14 digits. Decimals in a Currency Field A Currency field is a Fixed Point Number field that has either zero or two digits to the right of the decimal point. Currency Format Options DataEase uses the Currency format currently set in the Windows' Control Panel by default (e.g., 2 digits to the right of the decimal if you're using Window's North American Currency format). To change the number of decimal digits, select International>>Currency Format from the Windows Control Panel. Visual Control DataEase lets you display a Currency field in two ways.

EditBox - displays alphanumeric values in a rectangular field. SpinBox - displays numeric values. Type in a value or use the vertical arrow controls to display a value.

Date
A Date field stores and displays a calendar date. You have a choice of two Date formats - Standard and Extended. A Standard Date field has a length of 8 digits (6 numbers plus 2 slashes, e.g. 01/02/98). An Extended Date field has a length of 10 digits (8 numbers and 2 slashes, e.g. 01/02/1998). Date Format Options DataEase uses the Short Date format currently set in the Windows' Control Panel by default (e.g., month/day/year expressed in the form 12/26/94 if you're using Windows' North American Short Date field format). To change the default format to the International or Metric format, select International>>Date Format from the Windows Control Panel. Visual Control DataEase lets you display a Date field as an EditBox. An EditBox displays alphanumeric values in a rectangular field. NOTE: To make DataEase display the current date in a Standard Date field, enter ??/??/?? or lookup current date as the Derivation Formula. In an Extended Date field, you should use the formula Current Date.

Time

150

Help File

A Time field stores and displays a clock numerical value. The length of a Time field is always 8 digits (6 numbers plus 2 colons). Time Format DataEase always uses 12-hour Time field format. NOTE: You can define a Choice field to specify AM and PM. Time Calculations You can perform calculations on Time fields. If you add or subtract a time and an integer (e.g., TIME + 120), the result is a Time value. The integer is treated as a number of seconds (120 seconds in the example above). If you subtract one time from another, the result is an integer (representing the number of seconds). Visual Control DataEase lets you display a Time field as an EditBox. An EditBox displays alphanumeric values in a rectangular field. NOTE: To make DataEase display the current time in a field, enter ??:??:?? or lookup current time as the Derivation Formula.

Sequenced ID
A Sequenced ID field stores and displays an automatically incremented value. The maximum length for a Sequenced ID field is 255 characters. We recommend that you assign the Prevented attribute to each Sequenced ID field. Assigning a Starting Value DataEase assigns the Starting Value you specify to the first record entered in User View. The field value in each subsequent record is automatically incremented by 1. How DataEase Increments a Sequence Numbers increase in value from 0 to 9 and letters increase A to Z. When a character reaches its limit, DataEase resets the character, and increases the value of the character to its left by one. Visual Control DataEase lets you display a Sequenced ID field in two ways. EditBox - displays alphanumeric values in a rectangular field. SpinBox - displays numeric values. Type in a value or use the vertical arrow controls to display a value.

Choice List
A Choice List field displays a list of predefined values in User View. The advantages of using Choice List fields are:

Significantly reduced disk space - DataEase stores each choice as a number, not as a text string. Faster and more accurate record entry - users can only choose values that you define.
Choice List Limits DataEase lets you define up to 99 choices of up to 60 characters each for each Choice List field. Visual Control DataEase lets you display a Choice List field in two ways.

RadioBox - displays choices as radio buttons. ListBox - displays choices in a drop-down list.

TIP: To use the options that appear in another Choice List field in the list you are currently defining, just type its name in the LIST NAME field. Modifying a Choice List DataEase displays the following prompt when you modify a Choice List:

Update data with new choice list?


Answer Yes if you change the order of the choices, or if you add or delete a choice from the list. Answer No if you only change the text (e.g., change Golfing to Golf).

How to Define a Choice List Field


1. 2. 3. 4. 5. Choose Choice List as the Data Type on the Field Definition dialog. To add a choice to the list, type the text for the first choice as you want it to appear on the screen. Click Add. DataEase adds the last choice entered at the end of the list. Type a List Name for the Choice List. Specify the Visual Control for the field.

Yes/No
A Yes/No field is a Choice List field that accepts only Yes and No values. The length of a Yes/No field is always 3 digits. Visual Control DataEase lets you display a Yes/No field in three ways.

151

Printed Documentation

ListBox - displays choices in a drop-down list. CheckBox - displays choices in a single box that toggles between no (unselected) and yes (selected). The default is no. When you choose CheckBox, DataEase displays the Field Name as the caption to the right of the checkbox. RadioBox - displays choices as radio buttons.

Memo
In DataEase 7, Memo Fields are implemented as CLOBs (Character Large Objects). Memo Fields can contain up to 64k characters. It is not necessary to size them, since they are held as variable length records. Notes

Due to their large size, Memo Fields can not be set to Indexed or Unique, and they should not be used in Relationships. When typing data into a Memo Field, use Shift>>Carriage Return to force a New Line. (Carriage Return will just move you to the next field in the form). Although you may assign several Memo fields to one Table, you should do so with caution. Manipulating such large files may have an impact on performance. Memo fields are not part of a DataEase Tables .DBM file in other words they exist as separate files, and are not part of the normal data file. Ideally they should be used to hold discrete items of information data which adds to the usefulness of the record - rather than being part of the record. Examples would include: Complete Case Notes Relevant Legal Documents Associated Sales or Marketing Materials Technical Specifications

... and so on. Visual Control DataEase lets you display a Memo field as an EditBox (only). An EditBox displays alphanumeric values in a rectangular field.

Make Objects same size

Edit>>Same Size
Resizes a group of objects to the size of the reference object. The reference object is the last object chosen in the group. NOTE: If a Text object's size is changed, the font size remains the same. The area enclosed by handles expands or shrinks with the object.

How to Make Several Objects a Uniform Size


1. 2. Select the objects you want to resize. Select the object on which the sizing will be based last (i.e., the reference object). Select Edit>>Same Size and a sizing option from the cascade menu DataEase displays. DataEase resizes the selected objects horizontally, vertically, or in both dimensions to conform to the reference object.

Horizontal Size Vertical Size Both Sizes

Modifying Text objects

How to Modify a Text Object


1. To change the characters on the screen, click on the Text object to select it and insert the text cursor. Edit the text using Insert, Backspace, Delete, or any of the DataEase text editing keys to replace or overwrite the original characters. To change text attributes (font, color, etc.) double-click on the Text object (or click on the Color Toolbar button) to display the Display Attributes for Text Object dialog. You can double-click on a Text object to display the Display Attributes for Text Object dialog.

2. 3.

Lines of Text DataEase lets you create a single or multi-line Text object. To start a new line, press Ctrl+Enter or Sh+Enter. A Text object is treated as a single graphic object regardless of the number of words or lines it contains.

152

Help File

How to Move an Object


1. 2. To move an object, click (and hold) on the center of the object. Drag the mouse to the new position and release the mouse button. To move one or more selected object to the next grid position, press and hold the Shift key while pressing an arrow key. For example, press Sh+<arrow> to move the object to the next highest grid position.

Pasting Objects between Documents

How to Paste Field Values from One Document to Another


1. 2. 3. With one or more values saved to the clipboard, go to the new document. If only one value is stored in the clipboard, make sure the field definition of the target field is compatible with the value. For example, DataEase will not accept the value Sam in a field defined as a Number field. If more than one value is stored in the clipboard, make sure that the new document contains the same fields as the original document. For example, you can copy the NAME, ADDRESS, and PHONE values from one form to another only if both forms contain identically named fields. Choose Edit>>Paste. DataEase inserts each value in the field that has the same Field Name (e.g., the CITY value in the original form is inserted in the CITY field on the new form). DataEase retains these values in the clipboard until you Cut or Copy another value. To insert these field values in another record, repeat steps 1 and 2.

4.

5.

Printing Graphic Objects

How to Print the Graphic Objects in a Document


1. 2. 3. 4. Open the document you want to print. Choose File>>Print. DataEase opens the Print dialog. Choose the WYSIWYG Print Detail. Click OK.

Removing a Subform

How to Remove a Subform from a Document


1. 2. 3. 4. Choose Document>>Query By Model. DataEase opens the Query By Model dialog. In the Table Diagram, click on the table's title or on any column name in the table. Click on the Remove button. DataEase removes the table from the Table Diagram and places its name in the Related Tables list box. Click OK to close the dialog.

Renaming an Object
In versions of DataEase before version 6 it was not possible to select a name for some objects, such as Buttons, Lines, Rectangles, and so on. These objects were automatically assigned names, such as Button1, Button2, etc. Now that Event Scripting allows you to extensively modify these objects, it makes sense to give them more meaningful names. So In DataEase 6, you can choose to give these objects names of your choice. When you first create a line, text label, rectangle, etc, you are immediately presented with the Change Object Name dialog box, as shown below.

Simply type in the name of your choice. When naming an object, you should obey the following DataEase 'Naming' rules. These rules apply to all DataEase objects.

153

Printed Documentation

The Name should contain alphanumeric A-Z , a-z, and 0-9 characters only. The "space" and "underscore"
characters are the only non-alphanumeric characters allowed.

No two documents should have the same Name. A document can not be given the same Name as the Application itself. Within a document, no two objects should be given the same Name. The Name should be no greater than 30 characters in length. Names are not case sensitive, so, for example, you cannot have two fields in a document called "CUSTOMER"
and "Customer", since DataEase would regard them as having identical Names. If you subsequently decide to change the assigned name, right click on the object, select "Definition", and you are again presented with the Change Object Name dialog.

Selecting Objects

Select All
Highlights every object in the active document so they can be simultaneously cut, copied, or cleared. This is the easiest method to copy all or most objects in a document.

How to Select All or Most Objects


1. 2. 3. Activate the document containing the objects you want to copy and choose Edit>>Select All. DataEase displays handles on each object in the layout. If you don't want to cut, copy, or clear a particular object, press Ctrl and click the object to deselect it. Choose Edit>>Copy, Edit>>Cut, or Edit>>Clear.

NOTE: If you choose Edit>>Select All by mistake, press Esc to deselect all objects. If you choose Edit>>Select All, Form and Record objects are not included.

How to Select a Single Document Object


1. 2. 3. 4. To select a document object, simply click on it. DataEase displays eight handles to indicate it is selected. To select another object at the same time, hold down Shift and click on the other object. DataEase displays handles on both objects. To deselect an object, hold down Shift and click the object again. To select objects using the marquee, position the cursor outside the top left corner of the object, click and hold the left mouse button, and drag the mouse to enclose all the objects you want to select. The marquee must surround the entire object for DataEase to select it. When you release the mouse button, DataEase displays handles on each object to indicate it is selected.

5.

NOTE: If DataEase highlights an underlying object when you try to draw the selection box, press and hold the Shift and Control keys and redraw the selection box.

The Display Attributes Dialog


Display Element lets you choose which part of a selected object to adjust, Fill, (interior), Line (outline), or Text. Fill Type lets you choose the interior pattern for the object. Color Selection lets you choose the color of each part of the selected object. More Colors lets you select additional colors from the basic color palette, or define your own custom colors. Printing Options let you tell DataEase how to print the object. By default, DataEase prints the object as it appears on the screen. Choose:

Don't Print to tell DataEase not to print the object (although it displays normally on the screen). Start New Page to tell DataEase to print the object at the top of a new page.

To Prevent Split to tell DataEase to start a new page if it cannot fit the whole object on the current page. Always to tell DataEase to start a new page each time it prints the object.
Size to Fit tells DataEase to size the object according to the font specifications (and Field Length for Field objects) automatically. Sample shows you how the current document settings will display on the document. Multiline

154

Help File

lets you enter more than one line of data in the field. Justification aligns field values left, right, or centered in the field. Table View Options Displays the Table View Options dialog that lets you customize the appearance of a field/column in Table View.


Color Font Action Layout

Label - the name DataEase displays as the column heading. By default, DataEase uses the Field Name. Display Length - the number of characters in the column that DataEase displays on screen. By default, DataEase uses the Field Length. Hidden in Table View - do not display the column in Table View.

How to Size an Object


1. 2. To size an object, click (and hold) on a handle along any edge of the object area. Drag the mouse to resize the object and release the mouse button. To size the selected object to the next grid position, press and hold the Ctrl while pressing an arrow key. For example, press Ctrl+<arrow> to resize the object to the next highest grid position.

Layout

How to Specify Layout Options


1. or... 2. or... 3. 4. 5. 6. 7. 8. Highlight the object and click the Layout button on the Toolbar. Use the scroll bar to view the Field Layout choices. Click on the desired choice. Use the +, ++, and - keys to increment or decrement the number of records to display in Record Layout Preview. Check any of the desired Appearance options and resize the object by entering a Width and Height (if desired). Select a Scroll Direction. Click OK. Highlight the object and click the right mouse button then select Layout from the Object Properties pop-up menu. Click the Layout button on the Display Attributes dialog.

Objects>>Summary
When you choose Objects>>Summary, DataEase activates the Summary Variable tool, which lets you create a Summary Variable object. A Summary Variable object displays summary information (e.g., page totals and running totals) based on application data. You can create Summary Variable objects in Headers and Footers only. When you draw a Summary Variable object on a Header or Footer and release the mouse button, DataEase displays the Summary Variables dialog. This dialog lets you specify the source and type of information for the Summary Variable object.

How to Create a Summary Variable Object


1. 2. 3. 4. 5. 6. 7. 8. # Choose Objects>>Summary. DataEase displays the Summary Variable cursor. Click the mouse on the document to create a Summary Variable object of default size. or... Click and drag the mouse on the document to create a Summary Variable object. When you release the mouse button, DataEase displays the Summary Variables dialog. Select a table and column as the information source for the Summary Variable. Select the type of information you want to display in the Summary Variable. If you select a statistic (sum, mean, maximum, minimum, count of), use the Compute options to indicate the starting value of the range and whether or not to include the value(s) in the current body of the document. Click OK to close the dialog. Select the Summary Variable object and choose Display from the Object Express menu. DataEase displays the Display Attributes for Summary Variable object dialog. Specify the Summary Variable display characteristics and click OK.

Summary Variables Dialog Options


Used Tables lets you choose a table as the information source for the Summary Variable. The table(s) that you may select are summarized in the table below.

155

Printed Documentation

Source Tables for Summary Variables


Document Type DataEase displays... Form Table(s) used by the Main form and its Subforms. Report Table(s) included in the Data Model. Procedure Table(s) included in the DQL script. Used Fields lets you choose a column in the selected table as the information source for the Summary Variable. Summary Type lets you choose the type of summary information displayed in the Summary Variable. The values returned by different Summary Types are described in the table below.

Information Displayed in Summary Variables


Summary Type Sum Mean Maximum Minimum Count of First On Page DataEase displays... Sum of values for the selected column. The range of values is specified by the Compute options (explained later). Sum of values for the selected column divided by the total number of values. The range of values is specified by the Compute options (explained later). Highest value for the selected column. The range of values is specified by the Compute options (explained later). Lowest value for the selected column. The range of values is specified by the Compute options (explained later). Total number of values for the selected column. The range of values is specified by the Compute options (explained later). First value for the selected column that appears in the body of the document. If a value does not appear in the current body, the Summary Variable displays a blank value. Last value for the selected column that appears in the body of the document. If a value does not appear in the current body, the Summary Variable displays a blank value. Last printed value for the selected column before the current body of the document is printed. This value may or may not appear in the current body. Use this option to indicate a group header. Last printed value for the selected column after the current body of the document is printed. This value may or may not appear in the current body. Use this option to indicate changes in a group header.

Last On Page

Page Start Active

Page End Active

Compute summaries from tells DataEase the starting value of the range used to calculate the Summary Variable. Choose: Page Start to indicate the first value on the current body of the document. Select this option to display page totals. Report Start to indicate the first value on the report. Select this option to display running (cumulative) totals. Compute when tells DataEase whether or not to calculate the Summary Variable using the value(s) in the current body of the document. Choose: Page Ends to include the value(s) in the current body of the document. This is the default option. Page Starts to exclude the value(s) in the current body of the document. Select this option to display a running (cumulative) total from the previous page. Display displays the Display Attributes dialog. Font displays the Font dialog.

Display Attributes Dialog Options


The Display Attributes dialog (explained earlier) contains several options that are specific to Summary Variable objects. These options are explained below. Element

156

Help File

lets you choose which part of the Summary Variable object you want to modify. Choose: Fill to change the color of the Summary Variable object. When you select Fill, DataEase lets you choose a background pattern from the Fill Type drop-down list. Border to change the color of the Summary Variable object border. When you select Border, DataEase lets you choose a border pattern from the Border Type drop-down list. Text to change the color of the characters that make up the Summary Variable object. Size to Fit tells DataEase to resize the variable according to the font specifications and Summary Variable type automatically. Justification aligns values left, right, or centered in the field. Fonts displays the Font dialog.

How to Create a Page Total


1. 2. 3. 4. Select a table and column in the Summary Variables dialog. Select a statistic (sum, mean, maximum, minimum, count of). Choose Compute summaries from Page Start and Compute when Page Ends. Click OK to close the dialog. Select the Summary Variable object and choose Display from the Object Express menu. DataEase displays the Display Attributes for Summary Variable object dialog. Specify the Summary Variable display characteristics and click OK.

How to Create a Running Total


1. 2. 3. 4. Select a table and column in the Summary Variables dialog. Select a statistic (sum, mean, maximum, minimum, count of). Choose Compute summaries from Report Start and Compute when Page Ends. Click OK to close the dialog. Select the Summary Variable object and choose Display from the Object Express menu. DataEase displays the Display Attributes for Summary Variable object dialog. Specify the Summary Variable display characteristics and click OK.

How to Display a Running Total from a Previous Page


1. 2. 3. 4. Select a table and column in the Summary Variables dialog. Select a statistic (sum, mean, maximum, minimum, count of). Choose Compute summaries from Report Start and Compute when Page Starts. Click OK to close the dialog. Select the Summary Variable object and choose Display from the Object Express menu. DataEase displays the Display Attributes for Summary Variable object dialog. Specify the Summary Variable display characteristics and click OK.

Tab Control
The versatile Tab Control has a number of uses. It allows you to display even a large form without scrolling or having to page down or page up. It can also be used to conditionally display an area containing field o bjects for example, Credit Card detail fields, which only appear if the user clicks a "pay by credit card" option. It could also be used to hold a Help Page an identical copy of the open form, but containing on-screen text explanations of all the fields and their purposes.

Creating a Tab Object



In Designer View, click the Tab Control icon and position the Tab Control on your document. Stretch the control so that its roughly the right size you can always enlarge or reduce it in size later. The Tab Control Dialog Box, shown below, now appears. Click on the Create button to create a Tab. So if you want the Control to have four tabs, click the Create button four times. Move your cursor into the Name field and overwrite the text labels Tab1, Tab2, etc, with meaningful names. The two-tab example below calls the tabs Cheque Details and Credit Cards.

The small graphic below-right shows how the User will see the Tab Control.

157

Printed Documentation

Alignment of Tabs The three options Left, Right and Equal Width allow to specify where the Tabs will appear on the control starting on the left or on the right. Selecting Equal Width forces all the Tabs to be same size, even if their Text Labels vary in size. Alignment of Names The three options Left, Centre, Right allow you to specify where the Text Label appears in the Tab. Move to Head Highlight a text label and click this option. It will move the selected Tab to the top of the Tab List. Move to Tail Highlight a text label and click this option. It will move the selected Tab to the bottom of the Tab List. Delete Deletes the highlighted Tab. Childs displays Yes when there is an object in the Tab, and No when there isnt.

Populating the Tab Control


Having created a blank Tab Control, you now have to populate it with objects most obviously, fields. When an object is placed in a Tab Control, it can either common to all Tabs in the Control, or unique to a single Tab in the Control.

To create a common object, create the object outside the Tab, and then copy, or cut and paste, or drag and drop, the object on to the Tab Control. The object will now appear in every Tab in the Control. To create a unique object, create the object inside the Tab in which you wish the object to appear.

The simple example below shows the difference between Common and Unique. The Tab Control contains three fields and three text labels. One field and its label Payment Amount - is common to both Tabs. The other two fields and their labels Card Type and Cheque Number are unique to their own particular Tabs.

158

Help File

Note: Tab Controls can be nested, as shown below.

Objects>>Style>>Update
Lets you modify (overwrite) a predefined Object Style.

How to Update an Object Style


1. 2. 3. 4. 5. 6. 7. # Highlight the object on the screen that uses the style you want to update. To modify the appearance of the object before you update the style, double-click on the object to display the Display Attributes dialog. When you are finished modifying the display attributes, click OK. Choose Objects>>Style>>Update. DataEase displays the Update a Style dialog. Choose the name of the style you want to update from the drop-down list that DataEase displays. DataEase automatically displays the name of the style used by the highlighted object. Click OK. DataEase displays all objects using the updated style with the new attributes that you defined.

The Update A Style Dialog


Select Style to Update tells DataEase which style to update with the new attributes you specify. Make Default tells DataEase to use the updated style as the default style. DataEase automatically assigns the default style to each new object you create.

Derivation Formula
Automatically calculates a field value and enters it into the field. When you specify a Derivation Formula as part of the Field Definition, the field value is derived by DataEase instead of being entered manually by the user. A Derivation Formula can be used to speed data entry and insure that a value is entered into the field. A derived value is entered in the field when the cursor passes through the field or when the record is saved. Derivation Formula Components A Derivation Formula can contain any combination of constant values, Field Names, DQL functions, mathematical operators and/or relational statistical operators. A constant value is a text, date, time, numeric string or number value that does not change. A DQL function returns a value in a different format. A relationship name refers to another table that the current form's underlying table is related to. A relational statistical operator lets you extract and summarize data that is stored in a related table. Sample Derivation Formula For example, the expression: TOTAL ADULTS * 35.00 is the Derivation Formula in the ADULT FEES field on the MEMBERS form in the Club ParaDEASE application. This formula calculates the membership dues for all the adults entered in a record by multiplying the value in the TOTAL ADULTS field by a constant value of 35.00 dollars. When you choose Derivation Formula, DataEase displays the Derivation portion of the Field Definition dialog.

The Derivation Formula Dialog


The Derivation Formula dialog displays four list boxes:

159

Printed Documentation

Functions lists all the DQL predefined and custom defined functions and the relational statistical operators. You can use the scroll bar to browse through the list of available functions. Relationships displays all the relationships for the active form including the current relationship which provides access to system information such as the current time, current date, current user name, current computername, and current user level. Use the scroll bar to view all the relationships. Columns displays all the field names on the active form. If a relationship is selected from the Relationships list, the Columns list displays the names of the fields in the related form. Use the scroll bar to view all the column names. Operators lists comparison operators, punctuation marks, and wild card characters. Use the scroll bar to view all the operators. Next to the list box of operators, DataEase displays a numeric keypad for entering numbers into a Derivation Formula. Types of Derivation Formulas There are four types of Derivation Formulas:

Default - assigns a constant value to a field. (For example, if you define the Derivation Formula "New York" in the DEPARTURE CITY field on the RESERVATIONS form, DataEase automatically enters New York in the DEPARTURE CITY field in each record). Lookup - displays a field value from a related form. (For example, if you define the Derivation Formula lookup "CLUBS" "CLUB NAME" in the CLUB NAME field on the RESERVATIONS form, DataEase finds the related record in the CLUBS form and returns this value in the CLUB NAME field). Calculation - uses arithmetic operators (+, -, *, /) and/or DQL relational statistical operators (count of, sum of, mean of, highest of, lowest of) to calculate a field value. (For example, if you define the Derivation Formula sum of "RESERVATION DETAIL" "PRICE" in the ADULT PRICE field on the RESERVATIONS form, DataEase totals the values in the PRICE field in all the related RESERVATION DETAIL records and displays it in the ADULT PRICE field). Function - uses any DQL function to generate a field value. (For example, if you define the Derivation Formula (upper(STATE)) in the STATE field on the MEMBERS form, DataEase displays the STATE field value in upper case (e.g., CA), regardless of whether it is entered ca, Ca, or CA.)

NOTE: A relationship between the two forms must exist for the lookup to work. Any of the four types of Derivation Formulas can be combined in a complex formula.

How to Use a Derivation Formula to Calculate a Field Value


1. 2. 3. 4. 5. 6. 7. Double-click on the Field object. DataEase displays the Field Definition dialog. Click on the Derivation radio button. DataEase opens the Derivation Formula editor. Enter the Derivation Formula manually, or click on a selection from the four list boxes and the numerical keypad to enter field names, relationships, functions, operators, and numbers in the formula box. When you finish entering the formula, click OK.

DataEase checks the spelling and syntax. If DataEase finds an error, it positions the cursor at the start of the invalid word or expression. If the formula is valid, DataEase saves it as part of the field definition. NOTE: Use the numeric keypad to enter numbers into a Derivation Formula. Constant values and the associated quotation marks must be entered into a formula manually. If a Field Name or a relationship name contains more than one word, it must be enclosed in quotation marks (e.g., count of "FAMILY MEMBERS" "LAST NAME"). Otherwise, you can omit the quotation marks (e.g., highest of MEMBERS ROOMS). Constant text values, like the state abbreviation "CT" must also be entered in quotation marks. Formula Syntax A constant value must follow the rules listed below so DataEase can distinguish constants from Field Names and differentiate different types of constants. Rules for Constant Values Field Type Text Numeric String Number, Currency Date Time Choice Examples "James*""James Ivory" 2033748000 1234.1212 0.34 12/31/92 04:42:53 MASTER CARD Comments Enclose in quotation marks. Do not type formatting characters. Do not type commas. Type slashes. Type colons. Type the value, not the choice number.

160

Help File

Using Parentheses in a Formula You can use parentheses to control the order in which mathematical operations are performed. When DataEase calculates a value, the operations in a Derivation Formula are performed from left to right. Multiplication and division take precedence over addition and subtraction. For example, the parentheses in the expression:

(6 + 12) * 2
tell DataEase to perform the addition operation (6 + 12) and then multiply the result by 2. Parentheses are also used around any expression that follows a DQL function. For example, the jointext functions in the expression:

jointext (FIRST NAME, jointext (" ", LAST NAME))


tell DataEase to join the two text strings: the value in the FIRST NAME field and the value in the LAST NAME field. When multiple sets of parentheses appear in an expression, the operation in the interior-most set of parentheses is performed first. In this example, the inner function jointext (" ", LAST NAME) tells DataEase to join a leading space (indicated by the blank space between the quotation marks) to the value in the LAST NAME field. The outer function then joins the first name to the result of the first operation, producing the typical mailing label format, for example: John Smith The following example is a Derivation Formula in the DEPARTURE DATE field in the RESERVATIONS form:

if (DEPARTURE DATE < lookup "current" "date", blank, DEPARTURE DATE + (6 - weekday (DEPARTURE DATE)))
The first operation DataEase performs is the weekday (DEPARTURE DATE) function. The result is a number from 1 to 7. The second operation is to subtract the result of the first operation from 6. The new result is a number from -1 to 5. In the final operation, DataEase performs the if function. If the DEPARTURE DATE is before today's date, the field value is blank, otherwise add the result of the second operation to the DEPARTURE DATE that was entered. The final result is a DEPARTURE DATE of the first Saturday following the date entered by the user. Derivation Formula Length DataEase allows you to enter a Derivation Formula up to 4,000 characters long. If the formula you enter exceeds the area of the Derivation Formula box, the formula scrolls, allowing you to continue typing. Entering a Derivation Formula Manually A Derivation Formula can also be entered manually. When you click the OK button to save the formula, DataEase performs a spelling and syntax check. If any errors are found, DataEase displays an error message. You cannot save the field definition until you correct the error. NOTE: If the Data Entry option on the Field Type dialog is set to Allowed, a Field Derivation Formula can be overridden by the user. If you don't want the user to override the derived value, set the Data Entry option to either Prevented or Virtual. See Chapter 6 in the Designers Guide for more information on the Data Entry options. The Derivation Formula must generate a value that is compatible with the Data Type for the current field. For example, a Derivation Formula of "John" would not be a valid formula in a Date field.

Sample Applications
Sample Applications - Introduction
To illustrate what you can do with DataEase, and to offer you free, ready-to-use systems, we have included six sample applications. They are:

Membership maintain members of an organization or scheme; The Self Tester an aid to learning facts and figures; The Deadline Manager how to squeeze an hours work into 45 minutes; Bill of Materials or how the whole is made up of the parts; Product Enhancement let the user tell you want they want in the system; Time Billing record how long you spend on a client.
They were specified and built during the summer of 2001 by Adrian Jones, editor of Dialogue, the DataEase magazine, and an independent DataEase specialist. Each has been tested under Windows 98 and 2000. They are offered as standalone applications, and have not been tested for networking. This does not mean that they will not successfully run on a network, but that you will have to satisfy yourself that network operation is okay, or modify the applications accordingly. No guarantee is offered that they will perform as specified, or that their subject matter has been exhaustively explored. The author can offer the reassurance that the Deadline Manager and the Time Billing applications were tested for real in completing this work. In addition, I have run the Self-Tester many times, though have failed to learn all the capitals of the world. If you find problems within the design and implementation of these applications, please let us know, and we will endeavour to post a corrected version to the DataEase web site http://www.dataease.com If you have improvements and additions to these applications and wish to share these with other DataEase developers, please let us know.

161

Printed Documentation

And if you have any ideas for other mini-applications, also get in touch. As a guide, a mini-application contains around six each of tables, forms, reports and procedures. Note: To enter each application, use "demo" as both name and password. Note: To explore the applications via the catalog, use high as both name and password.

Membership Application

Purpose of the Membership Application


The Membership application lets you enter name, address and telephony details of potential members of an organization or scheme. A member is defined as a person having a current membership; the system records those membership details. The system produces two main reports. The first is a list of current members, grouped by the type of membership. The second is a list of the interests of members, to put other members or concerned parties in touch with like-minded people. The reports are provided as printed and also as HTML documents. "Interest" can be defined quite broadly; in conceiving this module, the Musicians Union Yearbook was used as one example, where the interest is the instrument played. The module includes confidentiality concepts, as well as letting each member be assigned a main interest, but to also appear in other sections, as in the case of multi-instrumentalists. Routines are provided for reminder letter cycles and for automatically renewing some memberships.

The System
The Membership application is run from the MembershipMainMenu menu document:

Enter Membership Details


Most membership details name, address, telephone, interests are entered directly from this screen; the actual membership itself is entered via a form opened from this screen:

162

Help File

This form can also be used to enter details of prospective members. A person is a member by virtue of having a current (i.e. not expired) membership record. Enter the name and address details. The PersonID value is derived after the surname has been entered. Two check fields concern confidentiality and assume that the appropriate questions have been asked of the person. The first asks whether their address should be included in the membership and interest directories. Leave this check box unchecked to exclude them. The second asks for confirmation that you can sell their details to third-parties. Currently the application does not use this value, but it would be easy to write a routine to produce mailing labels for sale for all those persons who have given permission. Telephone and Other Numbers In the box labelled "Telephone, etc" are spaces for the various telephony details. Enter telephone, fax, mobile and e-mail in the spaces provided, and/or select an other type via the lookup button at the bottom of the screen. Here you can include more than one telephone number, for example. To exclude a telephony detail from the directories, check the box to the right of the telephony line.

Add New Membership


A new membership is added by clicking on the Add New Membership button. The EnterMembshipDetails screen appears:

163

Printed Documentation

Select a type of membership, and enter the start and end date, and any payment details. If this person is renewing an existing and not-yet expired membership, the start date will default to the day after that previous membership expires. The end date will default to the length of this membership type, but can be changed. The Amount Paid will default to the total cost of this type of membership, but can be adjusted.

View/Change an Existing Membership


To view an existing membership, click on the blue arrow button to the right of the appropriate membership details entry on the main Details screen. This will open the same Membership Details screen as above, but this time it will display the membership selected. Add/Change Interests To assign an interest to a member, click on the lookup arrow and choose from the picklist.

Run Reminder/Auto-Renew Routine


The Membership Renewals and Reminders routine lets you produce labels to send with appropriate letters to soon-tolapse and even now-expired members. It will also automatically renew those members who have given such permission, and produce a label to accompany a corresponding renewal notice letter. Each label has a discrete code to indicate which type of letter should be included, and are sorted by that code to facilitate such mailings. Note that you will probably have to adjust the label printing report RenewRemindLabels to suit your printer and choice of label.

164

Help File

The top of this screen lets you select which routines you want to run: the reminder, the auto-renew, or simply to reprint labels. To choose the first two routines, select the corresponding yes. To reprint the labels, select the corresponding yes; the other two options will then change to no.

When to Remind
From this screen you can specify the number of days before a membership expires that you wish to send a reminder, plus how days before expiry for the final reminder. You can also include a label for now-lapsed members. You may, for example, wish to start reminding members three months in advance, send out a stronger reminder letter for those in their last month, and a "please come back" letter to those who have expired within the past two months. For this, you would enter 90 days in the first field, 30 in the second, and 60 in the final field. The system currently defaults to 60, 30, and 30 days respectively. To run the routine, click on Continue. To abandon, click on Close (Do Nothing). The system will create a set of labels, with a code in the top right-hand corner to indicate the appropriate letter to be sent: A means normal reminder; B means final reminder; C means lapsed/please come back letter; D means auto-renew notice.

Directory of Current Members


This produces a printed list of current members, grouped by their membership type. It will include the address and telephony details only where such permission has been given.

165

Printed Documentation

Directory of Current Members Interests


This produces a printed list of current members, grouped by their interest. Each member can be assigned a main interest; in this section will appear their address and telephony details where permission has been given. If a person has an interest that is not their main one, their name appears in that section with a reference to their main entry section.

HTML Versions of Directories


This produces an HTML file version of the current member and current member interest directories. When you choose this option, the following screen appears: Select Interest, Membership or both to create the appropriate output. The file name and directory where the HTML files are created is confirmed beneath your choice. The path can be changed see the reference data section below.

Reference Data
Reference data for the membership application can be accessed from the Reference menu on the opening screen. Interest Type Enter here the list of interests for members. For musical members, this might be Piano, Violin, etc; for a database of people interested in DataEase, this could be DOS, Windows, WebEase, NetPlus. Membership Type Enter the types of membership, how much they normally cost, and how long they normally last. Payment Type Enter the methods of payments, such as Cheque, Cash, Credit Card, Direct Debit. Telephony Type Enter the type of telephony, such as Telephone, E-mail, Mobile. HTML Directory Settings Use this screen to change the directory and drive in which the HTML files are created. Use DOS-style paths and not long names.

Self Tester Application

Purpose of the Self Tester Application


Ever wanted to master some common facts, such as capitals of the world or key words in a foreign language? Want to offer revision tests to staff or pupils following a training course or lesson? The self-tester generates a random set of questions, optionally based on your performance in this subject, and geared to those areas you keep getting wrong (after all, there is not much point revising what you already comfortably know).

166

Help File

Facts and questions about those facts are entered into the system. The fact could be the name of a country, Spanish words, names of people in an organization. For the tests, the user can enter up to how many questions they d like, to be asked questions previously asked at least and no more than so many times, and to see questions that theyve got wrong recently. At the end of the test, a report shows how well they did, and highlights the wrongly answered questions. A homework report lists questions according to how often they get they wrong.

The System
The menu document SelfTesterMainMenu runs the application:

Enter Pupil Details

The pupils name is entered in the system, and their DataEase user name is manually copied to the System User Name field.

System User Name is used though the system to locate the records for this user, so please ensure that you

enter the name correctly (it does not matter if it is upper or lower case). If no test appears for this pupil, it is likely that the name entered here is not the same as their DataEase user name.

Each pupil is automatically assigned a sequencing ID.

167

Printed Documentation

You can only delete a pupil that has not yet been tested.

Run Test
(This assumes that the system already contains questions and facts; otherwise the tests will not ask any questions). The user first completes details about this test:

They specify the maximum number of questions theyd like to be asked in this session. The two next fields pick out from the questions those that have been asked at least x times and up to y times. If no such criteria is needed, the fields will default to 0. So to ask questions that have only been asked up to three times, leave 0 in the first field, and enter 3 in the next. Another two fields ask about those questions that the pupil keeps getting wrong (and therefore the ones most in need to be asked again). Again, leave the fields at their default of 0 if no such selection is needed. To be asked questions wrong 2 times in the last 5 askings, put 2 in the first field and 5 in the second. The pupil can select to be asked questions about everything in the database, or just about a given classification. If this were a language system with, say "English into Spanish" and "Spanish into English" as the two criteria, the pupil could choose to be asked questions that translated in one direction, or leave this value blank to be randomly asked in both directions. The questions are answered by selecting from a picklist of all the facts that belong to this category. If the user prefers, that list can be filtered to just include the facts that are part of the current test by answering yes to this question. The quiz can be run as soon as the user has specified the number of questions. Such a test will simply ask that number of questions from all the questions in the database, irrespective of past performance. By default, the picklist of answers will include all possible answers, not just those asked in this test. To abandon the test, click on Close (Dont Run Test). The user is returned to the menu. To run the quiz, click on the Run Test button. A message will display momentarily while the system generates a random selection of questions. When this process is complete, the Self-Tester screen appears with the first question. To the right is a list of possible answers:

168

Help File

To answer the question, click on the blue arrow button next to what you think is the answer. This will close the right hand list, and your answer will appear underneath the question. To commit your answer, click on the big blue the possible answer list.

arrow button. This will move you on to the next question, and re-display

You can change your mind about an answer any time before pressing this button by clicking the blue arrow button next to the words "I think it is:". You ll be prompted "Do you want to change your answer?"; click on yes to clear the value and re-display the possible answer list. Once you ve clicked the

arrow button, your answer is committed; there s no turning back!

The score is displayed as a report when all questions have been asked. The report details your overall score, and lists those incorrectly answered questions, showing both the correct answer and what you answered:

This report can be run to screen or printed. You will be asked if you want to see the results again, so that you can first view on screen, and then perhaps print it out as revision. The quiz can be abandoned in mid-stream. If you want to do this:

169

Printed Documentation

1. Click on the question part of the screen. 2. Choose Abandon This Quiz from the File menu. You will be prompted:

3. Click on yes to leave the test, or no to continue. If you click on yes, the results report is still run. Your score will be out of the total number of questions, but the result will show how many were unanswered, and only list those answered incorrectly.

Print Overall Results


This report lists how youve got on with the tests, showing when the test was taken, what the questions were about, and your result. For easy viewing of your progress, the result is repeated as a percentage of questions answered correctly at the right:

Print Homework
This report lists the questions you get wrong, and optionally a list of those questions you have not yet been asked. A criteria screen first asks how far back you want to go for wrong answers. It defaults to 30 days ago:

170

Help File

If you want to include a list of unasked questions and their answers, click the check box. If you want questions on a given classification, click on the blue

button.

When you are ready, click the Run This Report button. To close, click Close (do Nothing) :

Add/Update/Delete Facts and Questions


You enter and change the question and fact data via this routine. It is assumed that youd want to enter records for a given category all at the same time. The "Auto-Type Question Category and Repeat Wording" screen that appears first lets you set the category for all the questions, saving you having to enter it each time:

171

Printed Documentation

Optionally, you can also enter some repeat wording. The sample data in this application is based on capital cities around the world, for example. Each question thus begins "what is the capital of ", and it would be tedious to have to keep typing this over and over. The repeat wording allows for this to be automated. Neither the category nor the wording are required. They are simply an aid to data-entry, and can be changed at any time when entering questions. Click Close (Do Nothing) to abandon this routine. When you are ready, click "Set and Continue" button. The Enter Questions and Answers screen appears:

Enter Questions and Answers


The screen displays a list of questions and answers which you can update or delete (click on the red and the blue to undelete).

button to delete,

To "auto-add" a new question, click on the Auto-Add button. This enters the ID of the category for you, and adds the wording, if any, in the Question column. Complete the question and answer. You can add further details about the fact if you wish (though currently these are not used elsewhere in the system). To add a new question, click on the blue

arrow.

172

Help File

If at any time you want to change the auto-typing, just click on the "set Auto-Type" button to redisplay that screen. Adding Several Questions about the same fact, including questions in different categories. Most the of the time, you will probably use this system to provide a single question about a fact. But you might also want to ask different questions about the same fact, including questions in the same category. For example, the fact is bonito. The questions could be: "what is the Spanish for nice", and "what is the Spanish for tuna". Whilst there is nothing stopping you from entering two separate facts that happen to be the same word, you might want to keep your facts together, where different questions are bound to the same answer. To do this, click on the More Fact Qs button to display the "Enter More Categories and Questions for This Fact":

New question categories can be added via the Self-Tester menu (choose Question Categories from the Reference top-line menu), or by clicking on the Add Type button when the Fact Categories pick list is displayed. Note: Only unused categories can be deleted.

Deadline Manager Application

Purpose of the Deadline Manager Application


The Deadline Manager is about squeezing a Quart of work into a pint-pot of time! It is a personal timetabler for short-turn, sustained bursts of energy to hit a deadline or to work out in advance that the deadline is not realistic! The idea of the Deadline Manager came from a technique I ve used when finishing each issue of Dialogue magazine. The final part of Dialogue completing the editorial, laying out the pages, and sending the material to the printers follows a predictable pattern. With the right wind behind me and strong coffee inside me, I can turn around this part of the magazine in about three days. Three days is a long time to remain focused. But I found that timetabling in detail what I expected to be doing when proved the essential tool in ensuring that I hit my deadline. If I know that I have just 45 minutes to achieve a task, it s amazing how often that task can be done in that time. Of course, one needs to be realistic, and use experience as ones guide. The Deadline Manager uses these stages: 1. Itemise all the activities that make up a given project, and divide those activities up into tasks. 2. Choose a fixed, non time-related unit of measurement, and assess all tasks in terms of this unit. 3. Work out the order in which you would like to do each task. 4. Enter the dates and times you will be able to work on this project. 5. Print out a timetable of what you are doing when.

173

Printed Documentation

At any time, the values and time bands can be changed. During a project, tasks can be flagged as being completed, and the timetable re-run.

Units of Measurement
The Deadline Manager uses an abstract but fixed measurement for assessing how long each task will take. I choose to assess all my tasks for Dialogue in terms of pages of layout. This happens to be one of the tasks that need for each activity (an activity using being a section or article in this case), and so the number of pages of layout to do the news section will, for example, always be 2. Writing that section is a bit more complicated, and Ill probably give that task 8 pages worth of effort. Proofing is much more rapid; a half page in this case. And so on. The key is to choose a single unit and to guestimate other tasks in terms of that unit. You might choose to develop DataEase applications based on how long it takes to create a ten field table, or layout a form with a single sub-form, fifteen fields and four buttons. Clean the house in terms of a particular cupboard. Write a book in terms of a particular chapter. The unit you chose does not matter, as long as you can apply it as a guestimated measurement for all the tasks in this project. So you enter in these guestimates, and you enter the time in which you will be working on the project. Total time divided by total number of units gives you a feel for whether the deadline is achievable. I can do a page in twenty minutes, in fifteen at a push. I cant do it in five, and Im slacking if it takes an hour. If the unit looks okay, you can probably proceed to print the timetable. If it doesn t, youll need to adjust your guestimates and/or the available time.

The System
The Deadline Manager is run from a series of similar looking screens, from which you can switch to any of the others, and print the schedule. Enter Project Name and Type is the opening screen. You can only add a new project from this screen, and you use it to select existing projects. It is also the only place you can delete a project, and update project type templates and application parameters, of which more later:

By default the screen opens on the last entered project, on the assumption that this is probably your current project. To enter a new project: 1. Click the button labeled "View All Projects/Add New" (or choose "View All Projects" the View menu, or press Ctrl-N). The Project ID (which you cant change) will derive to the next in sequence. 2. Add a name for this project, such as "Dialogue Spring 2002" or "Finishing Deadline Manager Demo App".

174

Help File

3. Choose a Project Type for this project, if appropriate, by clicking on the blue arrow button. A list of existing project types will appear. 4. Select a project type from the list by clicking on the small blue arrow button, or by pressing Ctrl-D when you have selected the button next to your choice. (Youll notice that you can also add a project type from here see Project Types later for more details). If you want to change the Project Type later, click again on the blue button. You will first be prompted "Clear current type"; click on yes to confirm. You can save the record by clicking on the Save button at the bottom right of the screen. The system will save records for you anyway when you move between screens. To select an existing project: 1. If the project you want appears on screen, you have already selected it. 2. If not, click on "View All Projects/Add New" (View-View All Projects; Ctrl-N), and use the four blue navigation buttons to move to the next, previous, last and first projects (or the goto menu, or F3/Sh-F3 for next and previous). This screen also details the following:

How many activities have been assigned to this project; The total number of all tasks; The number of tasks that have yet to be completed; The total number of minutes left; The total number of units for the unfinished tasks; The number of minutes per unit.
Any updates you make elsewhere in the system will be reflected in these totals, for example if you change the time slots or mark a task as complete. This is the only screen from which you can delete a project, which involves deleting all the details as well. To do this, either click on the Delete button, or press F7. You will be prompted "Are you sure you want to delete [ProjectName]"; answer yes to remove all project details. You can print the schedule from all screens see below for details. From this main screen you can also add or change the project type details (see below) and change the application parameters.

Moving to Other Main Screens


All main screen have four tabs across the top, and you can jump at any time between them, provided you have selected a project. To move between the screens, either:

Click on the tab, or; Press Ctrl-1 for Choose/Add Project, Ctrl-2 for Activities/Task Planning, Ctrl-3 for Time Slots or Ctrl-4
for Mark Complete/Task Order.

To run the Print Schedule routine at any time, press Ctrl-5. Whenever you move to another screen, any changes on the previous are saved automatically.

Activities/Task Planning
On this screen you enter the name of each activity, the units for pre-set tasks, and a description and units for other tasks:

175

Printed Documentation

The screen is similar to a spreadsheet. To move quickly between the various cells, use the tab and shift-tab keys. If you want to allocate some units to a pre-set task, enter the value under the appropriate column. Note that the list only allows for up to ten pre-set items, and that you may have blank columns without headings; dont enter numbers in these columns. If you want to add a non-pre-set item, move over to the final two columns and enter the detail description and the units. You can add several other tasks, though screen space only allows you to view one at a time. Use the number to the left of the details column as a guide to which item you are on. A scrollbar will appear to the right to let you move up and down the other tasks list. The units allocated allow for two decimal spaces, and up to five digits to the left of the decimal. The screen will only display the first two.

Time Slots
Now you can enter when you plan to work on this project, adding the date and start and end times:

176

Help File

You can add several slots on the same date, for example for morning and afternoon stints, and to work around meetings, etc. Avoid overlapping slots. To delete a date-time slot, click on the red button. To restore it, click on the blue button. Deletions are only committed when the screen is saved, but remember that this will include moving to another screen. By default the screen displays all slots. You can toggle between this and hiding those that are in the past (that is, whose date and end time is less than now). To do this:

Click on the "Show Future/All Slots" button, or : Press Ctrl-T.


A message to the right of this button confirms the current selection. Slots are shown in ascending date/time order.

Mark Completed/Task Order


This screen displays all the tasks for this project:

177

Printed Documentation

Here you can set the order of tasks, mark a task as being completed, and add notes to each task. The notes appear at the bottom of the Schedule. To mark as complete, click in the blue box to the left of the task; checked means completed, blank means yet to be done. The order is set by either:

Clicking on the blue > button to the left of the task; the next number in order will be added to the field;
or:

Entering a value directly in this field.


To add, update or delete a note: 1. Click on the ! button. The Enter Note For This Task screen appears:

Add a note (up to 1,000 characters), and click on Save/Close to save, close to close without saving, or Delete to remove this note. Tasks with notes are flagged with have an asterisk * on the Mark Project Task screen. Tasks are displayed in task order order, with tasks yet to be given an order appearing at the end of the list. Because you may be ordering tasks from a long list, it is helpful to re-display them from time to time. To refresh the display, click on the Refresh button (or type Ctrl-O). You can also toggle between displaying all tasks and just those yet to be completed. To do this, click on the Hide Complete/Show All button (or press Ctrl-T). A message to the right of this button confirms the current selection.

178

Help File

Note that the display is in columns going from top to bottom and left to right. If you have more than 25 tasks, use the horizontal scrollbar at the bottom to move the list to the left.

Project Types
As with the example of producing Dialogue magazine, many projects will involve doing the same kind of task for a set of activities. If we take Dialogue as a project, and each article in the magazine as an activity, then there are certain tasks that are likely to need doing on each article. I may need to commission, sub-edit, write, find images, and lay out and proof the pages. Not every article requires some work on each of those tasks (the cover, for example, is produced externally; all I do is write the copy for it, commission it and proof the result). But for those tasks, I simply don t enter a value. This is simply a means to order regular tasks. Other tasks not on these pre-set lists can be entered ad-lib. This tasks are entered via the Enter Types of Projects screen, and, once a Project Type is chosen for a given Project, will become the headings of the columns on the Enter Activities and Tasks screen. To enter a new project type: 1. Either choose File Open Application Settings Project Type from the opening Enter Project Name and Type screen, or: Click on Add Type on the Project Types picklist screen. The Enter Types of Projects screen appears.

> Add a description or title for the project type, such as Dialogue magazine, or Finishing DataEase Applications. 1. In the boxed area below, add up to ten short descriptions of regular tasks for this project type. 2. In the white box, add an abbreviated name for the task. This will appear on the Activities/Task Planning dialog, and the name must fit the box. (Note: when entering text in the box, a scrollbar will appear; text may not fit when this is visible. You should leave the box to see if the text will fit.) You can also delete Project Types from here, but only if there are no existing projects that use the type.

Printing the Schedule

179

Printed Documentation

At any time you can print the schedule. It will always reflect the current information:

The Schedule is for the current project only. It timetables each task according to the order youve assigned it (unassigned tasks will appear in the order they were entered at the end), and shows the start and end times, rounded to the value set via the Application Parameters screen. The description lists the task type, if a pre-set one was used, or the description given, plus the activity. If the task has a note later, an asterisk appears at the end. If a task will continue over more than one time slot, the word "CONTINUED" appears. At the end of the printout, task notes appear, if there are any. The schedule will start from the current time if you are in the middle of a slot.

Application Parameters
One application parameter determines how the time allocation on the schedule is rounded, for example, every five minutes or every 20 minutes. To access the Application Parameters: 1. From the File menu, choose Open, then Application Settings, then App Parameters. The Application Parameters screen appears.

180

Help File

Change the Round Times to Mins value. 1. Save the record and close the screen.

Bill of Materials Application

Purpose of the Bill of Materials Application


A "Bill of Materials" is a classic database problem which describes what parts are used in the making of another part. The example often given the literature is that of a bicycle. One bicycle consists, say, of a frame, two wheels, saddle and handlebars. A wheel in turn consists of many spokes, one rim, one tyre, one inner tube, and so on. A bicycle manufacturer would have a more involved description of these parts: Rawley SuperSportser 2000 for the bike, for example, and Super Alloy DVD 24" for the wheels. They may manufacture several types of wheels, for mountain, touring and city bikes. They may even simply buy the parts from another supplier (often the case with gears and brakes). They may also use the same wheels for several different bikes. Thus the Bill of Materials serves to answer such questions as "how many spokes do I need to make a mountain bike?", and "what do we make using our lightweight spokes".

Alternatives
In describing how a product is made, it is possible that one given part could be replaced with another. This is often illustrated in cookery recipes, where you might swap different fish or vegetables, or exchange the use of cream for yoghurt. If the Bill of Materials were used to describe the contents of a laboratory, there may be many pieces of lab equipment that could be substituted for others perhaps ceramic beakers for glass ones. The Bill of Materials ("BOM") demonstration application provided here allows for showing how one part is made up of many other parts, and how one requirement for a part can be substituted for another.

Entering a Part and its Sub-Parts


The entire BOM application is run from a single data-entry form, EnterPartandStruc. This screen is split into two vertical sections. The left-hand side is for entering the Description of a part such as Rawley SuperSportser 2000 and Super Alloy DVD 24":

181

Printed Documentation

Each part is automatically assigned an alpha-numeric ID.

182

Help File

Beneath the required description field is a field labeled Cost This Level. Using our wheel example, if this part were a spoke, and a spoke was not made up of lesser parts, then we would enter in Cost This Level the cost of a single spoke: say this is 1p. For the wheel, the likely cost is the sum of all the parts, plus the cost of assembling all the elements of the wheel. In this case, wed enter in Cost This Level the cost of the assembly: say 3.00 a wheel. The Cost of Parts field which you cannot change would show the total of all the parts for a wheel. If a wheel contained 25 spokes, this price would include 25 x 1p for the cost of the spokes. For the spoke itself, it is not made up of other parts, and therefore would have zero in this field. The Total Cost is thus the sum of the parts, plus the Cost This Level.

Units
We also need to describe the manufacture of a product in terms of its quantity. The BOM might describe a single bicycle, or so many tons of a product, or even, in the case of a recipe, how many people it will feed. The section "Units used for this part" assigns these values. We first need to enter the type of units being used. We only need to enter each type once. To enter a unit type: 1. Click on the blue lookup button to the right of the Qty field. If no unit has been previously selected, the Unit Types list appears:

If a unit has been previously selected, you will be first prompted:

Click on Yes to clear the currently selected unit type and display the Unit Types list above. Click on the blue return data button to the left of the unit type s description to select that type of unit. If you need to add a new unit type: Click on the Add Type button to display the Enter Unit Types screen, ready to add a new unit type.

183

Printed Documentation

The Unit Type ID is automatically generated. Enter up to a 30-character Description for the unit type. The Bill of Materials report usually includes the unit type, so descriptions include "Part x 500 grams". However, "Part x 500 units" might look a bit strange, so the screen allows optionally to flag a unit type as to be not included in the report wording. Use the search buttons to find previously entered unit types. Save your changes by clicking on the save button. Close the document and refresh the Unit Type List by clicking on close. To delete an unused unit type, click on the Delete button. If the unit type is in use, you will be prompted:

If it is not in use, you will see the standard DataEase Delete Record dialog.

The Structure of a Part


The right-hand part of the Enter Bill of Materials describes how many sub-parts go to making up the part on the left. We can see in our example here that we have two wheels, and one each of frame, handlebar and saddle, plus the costs for producing this quantity of the sub-part. To select a part, click on the blue lookup arrow. The List Parts screen appears.

184

Help File

The list displays all the parts and their IDs currently in the system, including those that may have nothing to do with the part you are describing. You can click on the sort button to toggle the list between alphabetical ascending (A-Z) and descending (Z-A) order to quicker locate your part. Click on the blue select button to chose the part and return to the main Bill of Materials screen. To add a part, click on the Add Part button. The Enter Parts screen appears:

This is a copy of the left-hand side of the Enter Bill of Materials screen. See the description above for details. You can also enter any part and sub-part via the main Enter Bill of Materials screen. From the Enter Bill of Materials main screen, enter the Qty for this sub-part as used in the main part. So in the case of a wheel for a bicycle, enter 2 as the Qty. The units for the Qty is set when you entered the part details; see the Units section above for details.

185

Printed Documentation

The cost of this number of this part is automatically worked out, based on what the cost of the sub-part is at the time the value was entered. To delete one of these Bill of Materials line, click on the red delete line button. The lines colour will become negative, and the line number (the grey value to the left of the part name) will end in D for deleted. To restore the line, click on the blue tick button. The lines colour returns to normal, and the line number no longer ends in D. Note that the record is not deleted from the database until the main record is saved.

Traversing the Bill of Materials


You can use this screen to drill-down through the parts and sub-parts to see how each is constructed, and to adjust the costs at each level. To move down a level, click on the black arrow button to the left of a bill of materials item. This part now becomes the main part on the left-hand side, and its sub-parts, if any, appear in the Bill of Materials on the right. In addition, a message to the top of the Bill of Materials confirms the starting part and level we are down from that start. To drill-up to the previous level, click on the large black arrow button above the Bill of Materials. This will move bac k through each level. When the screen is back at the starting level (that is, with the part that was the main part when a black arrow button was first pressed), the confirm message is blank to indicate that we are not in drill-down mode.

Optional Parts
It is possible for a given part to allow for alternative sub-parts. For example, in a recipe, you might substitute single cream for Greek yoghurt, or you might swap one type of screw for another. You might have one part that you make yourself that you can change for a part that you buy in. By default, the Bill of Materials describes the list of preferred sub-parts, and all pricing details reflect the list of preferred options. What is meant by preferred is determined by you; the system does not opt for t he cheapest, but simply the one that occupies a slot in the main Bill of Materials. To enter an alternative, first save a bill of materials, and then click on the Or button to the right of the sub-part name. This opens a screen headed "Alternatives to using [this part] as part of [main part]":

This screen is similar to the Bill of Materials entry. Click on the blue lookup button to enter the part name and enter a Qty. The cost is automatically derived. When you return to the main Bill of Materials, you will see an asterisk after the part name to indicate that there are substitutes for this part.

To swap one preferred part for another:


If you need to, say, make single cream into the preferred part and yoghurt into the option: 1. Delete single cream from the list of optional parts. 2. Close the "Alternatives" screen to return to the main Bill of Materials. 3. Click on the blue lookup arrow to the left of Yoghurt. You will be prompted:

186

Help File

1. Click on yes to clear the current part name. The Parts list appears. 2. Find single cream in the list and click on the blue select button. 3. Save the main record. 4. Click on the teal Or button next to the Bill of Materials item for single cream to open the Alternatives screen. 5. Complete the new details for yoghurt as an optional part.

Selecting Parts via Tabular View


To choose a part as a starting point for entering its sub-parts, you can click on the Table View button at the top left. This displays all parts in a tabular format:

To select a part, make sure that the cursor is in the box to the left of the parts name, and hit any letter or number. The screen will return to the Bill of Materials view.

Print Bill of Materials


This will produce a breakdown of all the sub-parts and their sub-parts that make up the main part currently on screen. 1. Select a part on which to report, and then click the Print BOM button. The Print Bill of Materials dialog appears:

187

Printed Documentation

1. Enter the number of the given part you would like to produce. If you have entered the Bill of Materials to create one bicycle, entering 100 as this value will give you a breakdown of the required quantity to produce 100 bikes. If a recipe feeds six and you enter 0.5, you will get a shopping list for feeding three people. 2. Click on Print to produce the Bill of Materials, or Close (Do Nothing) to abandon and return to the main screen. The program may pause momentarily as it works out the Bill of Materials. When ready, the default Print dialog appears. Choose a destination, and click okay to print the Bill of Materials.

You will note that sub-parts are indented. We can see that to make the 5,000 spokes required in the 200 wheels needed for 100 bicycles, we apparently need 1.5 million spoke nuts! The bill of materials is restricted to 25 levels of nesting, which should be sufficient to describe even the most complex construction. As a guide, the classification of living organisms, which is a variation on a bill of materials, only contains seven levels Kingdom, Phylum, Class, Order, Family, Genus and Species.

Product Enhancement Application

Purpose of the Product Enhancement Application


This application is offered to software developers as a sketch for allowing the users of your software to report problems and make enhancement requests.

188

Help File

I describe it as a sketch because you the developer will have to work out how you can plug the module into existing applications and, most importantly, how you can ensure that the user provides adequate description of both what part of your application they would like to enhance, and what problems or elements they are referring to. The user enters a request about a document, and assigns it an initial urgency. They can also view messages from the developer to them about progress, and explore, though not change, requests made about other parts of the system. The developer can review all requests, change the status and the urgency, assign an action to the request, provide a description of the action, and optionally use this as a message to send back to the user. A routine to maintain the list of documents to which the user has access is provided, which also allows you the developer to classify documents in terms of their function, and to give English names to your DataEase documents. A second maintenance routine keeps a copy of the System User table up-to-date.

The Users View of the Product Enhancement Module


The main user document for the Product Enhancement module is EnterRequest. It is up to you the developer to tackle how you attach this document to your existing applications. You may, for example, wish to add it as a top-line menu option to all documents. When the user calls this screen, they see the following:

To enter a new request: 1. Select the name of the document by clicking on the blue lookup button. A list of application documents appears:

189

Printed Documentation

This is a list of all the documents that the developer has given permission to appear in this list. In other words, the list will probably exclude developer-only documents, maybe items that are part of a control procedure, and so on.

Filtering the Document List


The user can filter this list to just show documents of a certain type. To filter the list: 1. Click on the Select By Type button. This will open a Document Types list. 2. Select a document type by clicking on the blue select button. The list of application documents will now be filtered to just these documents. To change to another document type, simply repeat the filtering process. To show all documents, click on the Select All Documents button.

Sorting The Document List


You can sort the records according to their type and name. Click on the Sort By Type or Sort By Name button. To sort in reverse order, click again on the button. The sort order is confirmed in a message above the buttons.

Completing the Request


Once the user has selected a document, they can enter up to a free-text description. They can also assign an initial urgency to the request by clicking on the blue lookup button. The Urgency Type list appears:

190

Help File

To add a new urgency type, click on the Add Type button. The Enter Urgency Type dialog appears:

The urgency type is initially set by the user, but can be later altered by the developer. The current status defaults to No Action Yet Assigned, and will be updated as the request is attended to. Click on Save to save the record. The date and user name of the person who entered the record will appear; this value will later include the date and user name for when the record was last updated.

To View All Requests


A user can only enter or update their own requests, but they can view all requests in the system, including those that are now marked as complete. To view all requests: 1. Click on the View All Requests button. This message appears:

191

Printed Documentation

to remind the user that they are about to switch to a non-editable view of the requests. To switch the view, click on yes. A read-only version of the Enter Request screen appears:

To switch back to the editable version, click on the Add or update My Requests button.

Messages for Request


From time to time, the developer of the system will take a look at currently outstanding requests. They will enter an action against them, which may include a message back to the requester so they know that their request is receiving attention. When a user has one of their requests on screen for which there is an unread message, a blue note saying "You have unread messages about this request" appears at the right of the screen. If the user now clicks on the View Msgs for Request button, they will see this message screen:

The title describes the document, the user, developer and the date the message was posted. These details are reconfirmed in the white bar, with the action for this message from the user (simply confirming that it is a problem in this case). Beneath this is the actual message from the developer. The user can flag the record as read by checking the box at the bottom right.

192

Help File

They can also toggle between viewing all messages for this request and just the unread ones by clicking on the Unread and All Msgs buttons. From the request screen, they can view all messages to them about all their requests by clicking on the View All My Msgs button. This displays the same screen as for messages about a given Request, but this time only restricted to messages for this user.

The Developers View of the Product Enhancement Module


It is the developers job to respond to requests, and to keep the requester informed of progress. The application allows for sending messages within DataEase to the requester. The developer can work via the Product Enhancement Requests menu:

Most of the developers work is done via the View/Respond To User Requests option, which brings up the following screen:

This shows a list of requests. By default, this is just incomplete requests. The list shows the actual name, the person who requested it, its current level of urgency, the status and first 50 or so characters of the description. The developer can sort and filter this list. It can be sorted in both ascending and descending order (by clicking on a sort button twice), by the document name, the requester, the urgency and the status. In addition, the list can be filtered to display all requests or just incomplete ones.

193

Printed Documentation

If the developer needs a hard copy of the list (which will reflect the sorting and filtering theyve applied), they can click on the Print This List button for this report:

This is similar to the previous display, except that we now have the full wording for the urgency and status, and also for the description. When the developer has picked a request to work on, they click on the blue select button next to the document name to display the Add Actions for Request screen:

Adding Actions Against a Request


The developer can change the original request (perhaps to make it clearer), as well as its urgency and status. Generally, they would use this screen to record that they have made some action for this request.

194

Help File

1. Choose a new record in the lower half of screen, scrolling to the end of other actions if necessary. 2. Click on the Action Type lookup button to assign this action a type such as "under Investigation"; "Change of Status" (the types are determined by the developer). 3. If you wish to send this as a message back to the requester, click on the "Msg To Requester" check box. 4. Save the changes. To close the document and finish working on such requests, click on the Close button. To close this screen and redisplay the previous Select a Request screen, click on Select.

Maintaining the List of Documents


The DataEase table Application Objects contains the name of all documents menus, forms, reports and procedures in your application. The Maintain Document List option on the developers menu makes sure that any new documents added to DataEase are copied over to another table called AppDocument. In addition, if a document has been deleted from the DataEase system, this routine will remove that document from the list. Once the updating routine is run, the developer can flag documents as being part of the user interface, and give each document a more human name for use by the user in this system. To maintain the list of documents: 1. Click on the Maintain Document List option on the developers menu. The Post To App Documents confirmation screen appears:

Click on Run Procedure to maintain the list, of Close (Do Nothing) to abandon. If you chose to run the procedure, after a short while, the Documents screen appears, displaying the last document that has been created or modified. This assumes that, once the system is up and running, the developer will only be concerned about recently modified or added documents, and so will be working from the end of the records backwards:

195

Printed Documentation

This will display the system name for this document. By default, it will show the same name in the "Name to User" field, but the developer should change this to something more English, assuming that this is a document about which they wish to allow the user to make requests. The developer should assign the document a type by clicking on the Document Type lookup button and choosing from the picklist:

The developer can add and change the document types by clicking on the Add Type button to display the Enter Document Type screen:

196

Help File

To include a document in the user list, the developer must check the Show To User in Lists box. If this not checked, the document name will not appear in User Document list. (Which documents to include is left up to the requirements of the system.)

Maintain User Names


The name by which the user logged into the database is used to determine which requests are theirs. This requires the maintenance of a second SysUser table. Running this routine from the developer menu will first copy over any new user records, and then delete any from the SysUser copy table that are no longer registered in the main DataEase system. To run the user name maintenance: 1. Click on Maintain User Names from the Product Enhancement Request developer menu. The Post to SysUsers confirmation screen appears:

Click on Run Procedure to maintain the list, of Close (Do Nothing) to abandon. Unlike the document maintenance routine, there is no need to make further changes to the records posted.

Time Billing Application

Purpose of the Time Billing Application


This mini application allows you to record how long an employee has worked on a given job for a customer. Its reports act as the starting point for invoicing that customer for the work. The model for this application is DSSs Caseman, which is aimed at legal work, where, say, a solicitor could do work on several cases in a day. Thus they could be constantly switching between jobs, with a need to record exactly how long was spent on each. Once the main data is entered, assigning time to a job is very easy to manage, and geared to fit in with a busy and shifting workload. However, the application can be applied to any types of work, including downtime when an employee is not doing billable work. This application can be used by anyone to record how they spend their time.

The Time Billing Application


The application is run from the Time Billing main menu:

197

Printed Documentation

Entering Customer Details:


The following screen is used to enter customer details:

To locate a customer, click on the Table View button and then move the cursor down to the customer details and press any letter or number to switch back to the form view. The system assigns a unique numeric ID to the customer once the customer name field has a value. Enter name and address and telephony details (with the bottom line allowing for telephony other than the four pre-set lines above, including for a second telephone, e-mail and so on.) Each customer can be assigned a default rate. This can be overridden at later stages in the system. To enter a default rate:

198

Help File

1. Click on the blue lookup button to display the Rate list:

Each rate consists of two elements: the nature of the work being undertaken, and the period over which a charge is made (typically per hour, half-day, call, etc.) To add a rate, click on the Add Rate button to display the Enter Rate screen:

A rate is given a description, assigned a default price for the period, and a Rate Period. To select the rate period, click on the blue lookup button to display the Rate Periods list.

199

Printed Documentation

To add or update a rate period, click on the Add Period button:

Each period is given a description. It is assigned a duration in either minutes or hours. Note that a full rate period cost is incurred for each partial or completed period of work per day. So even if an employee only works 30 minute on a job item charged at a day rate, the full day rate will be charged. This may sound inflexible, but there is no reason why later someone could not change the rate being charged, perhaps in this case to a half-hour rate.

Entering Employee Details


To enter employee details, select Enter Employees from the main menu. The Enter Employees screen appears:

200

Help File

This is functionally the same as the Customer Details screen. Employees work records are identified by their DataEase user name the name they used to log into the system. This value must be entered on their employee record in the field labelled "User Name".

Entering Job Details


Once both employee and customer details are in, we can assign one or jobs to each customer, and one or more employees to do the work. To enter job details, select Enter Jobs from the main menu. The Enter Job Details screen appears:

201

Printed Documentation

Select a customer from the Customer List by clicking on the blue lookup button. When a customer has been selected, the Job ID value is automatically generated. The first part of the number is the customer ID, the second part a sequential number for each job for this customer. Enter a description for the job. The default rate value will contain the default rate for the customer, but this can be replaced with a default specific to this job. To change the value: 1. Click on the default rate blue lookup button. The message:

appears. Click on yes to clear the existing value, and select a new rate from the rates list that appears. Assign one or more employees to this job by clicking on the blue lookup button. When the employee comes to enter work they are undertaking, they will only see jobs to which they have been assigned.

Recording Work Undertaken on a Job


The main screen for most users is accessed via the Enter Work Undertaken on Jobs option on the main menu:

202

Help File

This display a grid view for work undertaken on todays date by the current user. To record time against a job: 1. In a blank grid box, click on the blue button next to Job to select an existing job on which this employee is assigned to work, and select a job from the Jobs for Employee list. 2. Click on the blue button next to Act to select an action for work on this job. A work action is the type of work undertaken such as consultancy, planning, etc. In addition, the actions can be classified by a work action type, which could group actions into areas such as "administrative" and "operational". To add or change both work actions and work action types, use the add type buttons on the appropriate lists. 1. The Rate value will default to the ID for the rate assigned to the job, but you can change the rate by clicking on the blue button. To start recording time against a job, select On on the time button. To stop recording time against a job, select Off on the time button. Note the following: 1. The system does not stop you from having two jobs on the clock at once. Employees should be careful to remember to stop the clock for one at the same time as starting the clock for another. 2. As long as a records time button is on, the clock is running. You can close the form, exit DataEase, even turn off the computer, and return to this form to turn the timer off. 3. Remember to turn off all clocks at the end of the day. 4. If working through midnight, you will need to save and stop a clock for one day and start a new record for the next day; the system does not do round midnight calculations.

Working on Different Days to the Current Date


The system works principally on todays date. However, it is possible to view other days, and to add anticipated work in the future. To move to a previous or subsequent date, click on the blue left/right arrow buttons. To jump to any given date (see Adding User Dates for more details): 1. Click on the Jump To button. The Jump To Date dialog appears:

203

Printed Documentation

Enter the date to jump to, and click on the Jump button to change the display to the date entered. Or click Close (do Nothing) do return to the date previously displayed.

Deleting Time on the Job


To delete all the details about work on a given day for a given job, click the red delete button. To subsequently undo this change, click on the blue tick restore button.

Reporting on Time To Be Billed


The system provides a single screen from which to report on time billing in terms of work done for the customer, work done by the employee, and the types of work action undertaken. To run the Time Billing Reports, click on Time Billing Reports on the main menu. The Time Billing Reports selection screen appears:

1. Choose to report by Customer, by Employee or by Work Action. 2. If you selected Customer, the screen changes to:

204

Help File

1. Click on the blue lookup arrow as instructed to select a specific customer, or leave this blank to select all customers. A similar option appears if you wish to report by employee. For work actions, the report includes all types. 2. Enter a start and end date. 3. Click on Run Report to run, or Close (Do Nothing) to abandon. The reports group slightly differently in each case. When reporting by customer, grouping is: 1. Each customer; 2. Each Job for that Customer. When reporting by employee, grouping is: 1. Each employee; 2. Each customer job. When reporting by work action, grouping is: 1. Each work action type; 2. Each work action. Each report then lists the date of work, the start time; hours and minutes recorded as worked; how many whole periods this represents; and the cost of the work.

Create Work Dates For Employees


The system maintains, for each employee, a record for each date in a period. From time to time, you will need to add new dates. To do this: 1. From the Time Billing main menu, choose Create Work Dates for Employees from the Admin and Reference top-line menu. The Create Dates for Employees dialog appears:

205

Printed Documentation

Enter a start and end date, and click on Create Dates to run the procedure, or Close (Do Nothing) to abandon. The name and date currently being entered will flash across the bottom of the screen to confirm that progress is being made. The system does not delete now-redundant dates, and assumes that all Employee records represent current employees.

206

Index
A Abandon a Field Value ....................................... 57 Abandon a New Record ...................................... 57 Abandon Changes ............................................. 57 action ........................................................ 124 align objects ................................................ 124 application backup ...................................................... 36 restore ...................................................... 46 application catalog ........................................... 18 Application Locking Strategy ............................... 13 application preferences ..................................... 19 Application Status ............................................ 19 application status information ............................. 19 apply a style ................................................ 124 arrange icons.................................................. 36 B backup an application ....................................... 36 Basic Locking .................................................. 13 Bill of Materials Template................................. 183 button object ............................................... 132 C catalog ......................................................... 18 cdf .............................................................. 38 Change the Format of Inserted Data ....................... 99 Changing Styles ............................................. 129 charateristics document ................................................... 41 check box field ............................................. 133 choice field ................................................. 152 Choice Fields ................................................ 133 Clear QBF Criteria ............................................ 63 client server terms ........................................... 99 close document ............................................... 38 color.......................................................... 129 Columns and Rows............................................ 61 Consumer and Provider .................................... 114 Copy a Field Value to another Record ..................... 58 Copy all Data from one Record to another................ 58 Copy/Move objects between Documents.................. 58 Copying data from Multiple Fields ......................... 58 Copying Data from Multiple Records ....................... 58 create a document object ................................ 131 create a form and table ..................................... 50 create a menu ................................................ 56 Create a New Record using ................................. 58 create a report ............................................... 71 create a style ............................................... 132 Create an OLE Object........................................ 96 currency ..................................................... 151 custom functions ............................................. 38 Custom Menu Editor ......................................... 54 Custom Menus ................................................ 54 custom relationship name .................................. 33 Custom Toolbars ............................................. 17 custom-defined functions ................................... 38 Customizing Table View ..................................... 49 D data backup ................................................... 36 data restore ................................................... 46 data type .....................................................149 database links ...............................................107 Database Links Dialog ......................................108 DataEase how to contact .............................................. 2 data-entry form view ......................................................... 37 date ...........................................................151 Deadline Buster Template .................................175 define a new form ........................................... 50 Define a Summary Field ....................................141 Define Custom Colors .......................................134 Define on OLE Object .......................................137 Defining a Variable..........................................143 Delete a Record in a Multiform............................. 59 delete a style ................................................144 delete document ............................................. 41 delete permission ...........................................103 Deleting Objects ............................................131 derivation formula ..........................................160 Display a Blank Record ...................................... 59 Display a Hidden Object's Borders ........................144 Displaying SQL Commands .................................104 document close......................................................... 38 delete ....................................................... 41 document print options ..................................... 44 document properties ........................................ 41 document security ........................................... 43 Drawing Symmetrical graphics ............................144 E ellipse object ................................................134 encryption..................................................... 19 Entering New Records ....................................... 60 Erasing Field Values.......................................... 60 exiting DataEase ............................................. 38 Exporting Data ...............................................104 F field check box ..................................................133 list box .....................................................136 radio box ..................................................141

207

Printed Documentation

spin button ............................................... 142 field characteristics sql ......................................................... 105 field definition .............................................. 146 field help .................................................... 149 field object.................................................. 134 field type .................................................... 149 font........................................................... 130 form new .......................................................... 50 view ......................................................... 38 form reorganization .......................................... 46 forms SQL ........................................................ 102 Full Locking ................................................... 13 H Help on Help ................................................... 1 How to Add a Pull-down Menu Option ..................... 56 How to Copy a Document's Pull-down Menus to Another Document ................................................... 56 How to Create a Custom Pull-down Menu for an Application's Opening Screen ............................ 56 How to Create a Pull-down Menu .......................... 57 How to Delete a Pull-down Menu or Option .............. 57 How to Rearrange a Pull-down Menu ...................... 57 How to Restore the Default User View Pull-down Menus57 I ida_text...................................................... 155 image field object.......................................... 135 image formats ............................................ 135 image search path............................................ 19 Importing Data into a Table............................... 106 Install a Single Document ................................. 106 Installation Command Files ............................... 101 J joins ............................................................ 35 K Keeping Report Formats ..................................... 93 L layout ........................................................ 156 line object................................................... 136 Linking to other applications ............................. 108 list box ....................................................... 152 list box field................................................. 136 list of documents ............................................. 18 Loading Export Definitions ................................ 104 Locating a partly-known Record............................ 65 Locating records based on Sound .......................... 65 Locating Specific Records ................................... 66 Locking Strategies ............................................ 13 M Make Objects same size ................................... 153 Membership Template ..................................... 163

memo .........................................................153 Menus and Custom Menus ................................... 54 Modifying Records ............................................ 60 Modifying Selection Criteria ................................ 76 Modifying Text objects .....................................153 move an object ..............................................154 moving ........................................................154 Moving between Related Forms ............................ 62 Multi-User Options ..........................................110 N network locking .............................................. 13 new form ...................................................... 50 number .......................................................151 numeric string ...............................................150 O object button ......................................................132 ellipse ......................................................134 field ........................................................134 image field ................................................135 line .........................................................136 ole ........................................................... 96 picture .....................................................139 rectangle ..................................................141 subform ....................................................122 text .........................................................142 variable ....................................................142 objects........................................................154 action ......................................................124 color ........................................................129 creating ....................................................131 font .........................................................130 layout ......................................................156 sizing .......................................................156 OLE DB ........................................................112 OLE DB Notes ................................................121 ole object ..................................................... 96 Opening a Document......................................... 45 opening an application .....................................109 Opportunistic Locking ....................................... 13 optional relationship name ................................. 33 options......................................................... 19 order default tab ................................................. 47 P Page and Running Totals .................................... 72 page total ....................................................158 Pasting Objects in new Documents .......................154 Pasting Values between Documents ....................... 61 Perform a Lookup ............................................ 61 permissions ..................................................112 picture object ...............................................139

208

Index

preferences application ................................................. 19 print options .................................................. 44 Print Records in a Form ..................................... 66 Printing a Form Layout ...................................... 51 Printing a QBM Report ....................................... 72 Printing Graphic Objects .................................. 154 Printing Selected Records .............................. 66, 73 Product Enhancement Template ......................... 192 properties document ................................................... 41 Q QBF ............................................................. 62 QBM Explained ................................................ 68 QBM Grouping and Statistics ................................ 72 Query by Form ................................................ 62 query by model ............................................... 68 R radio box field .............................................. 141 record layout ..................................................... 156 record entry sql ......................................................... 110 Recovering Deleted Records ................................ 62 rectangle object ............................................ 141 referential integrity.......................................... 33 Reformatting a Report Output .............................. 93 Related Forms ................................................ 51 relationships .................................................. 33 Removing a Subform ....................................... 154 Renaming an Object ....................................... 154 reorganize a form ............................................ 46 restore application ........................................... 46 Return Data from a Related Form .......................... 62 running total ............................................ 72, 158 S save as changes ............................................... 47 Saving export definitions .................................. 104 security ........................................................ 43 SECURITY LEVELS SQL ........................................................ 105 select permission ........................................... 111 Selecting and Sorting ........................................ 75 Selecting Objects ........................................... 155 Selecting Records ....................................... 66, 73 Selection Filter on/off ....................................... 76 Self Tester Template ...................................... 167 sequenced id ................................................ 152 Server Enforced............................................. 111 Setting Links .................................................. 51 Single-User .................................................... 13 size an object ............................................... 156

Sorting Records ............................................... 74 Sorting to improve performance ........................... 75 spin button field.............................................142 Stand-Alone ................................................... 13 status .......................................................... 19 style apply .......................................................124 create ......................................................132 delete ......................................................144 update .....................................................160 style sheet search path...................................... 19 subform object ..............................................122 summary variable ...........................................156 T Tab Control ..................................................158 tab order ...................................................... 53 default ...................................................... 47 table view ......................................................... 37 table definition security .................................... 19 tables SQL .........................................................102 Template Applications......................................162 text ...........................................................150 text field .....................................................150 text object ...................................................142 The Restore Dialog ........................................... 46 time ...........................................................152 Time Billing Template ......................................202 Toolbars ....................................................... 16 U unique relationship name ................................... 33 update a style ...............................................160 update permission ..........................................111 user information form ....................................... 40 user privileges and permissions ...........................112 users ........................................................... 40 Using a Data Filter ........................................... 63 Using DQL for Selection ..................................... 76 Using predefined Imports ..................................100 Using the Consumer .........................................114 Using the Provider ..........................................118 V validation formula ..........................................144 variable object ..............................................142 View/Modify Selection Criteria............................. 67 W What is a Menu? .............................................. 54 Working with Links ........................................... 98 Workstation Locking Strategy .............................. 13 Workstation Preferences .................................... 29

209

Printed Documentation

Y yes/no ....................................................... 152

Z Zoom View .................................................... 44

210

Anda mungkin juga menyukai