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
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.
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 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.
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.
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.
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.
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.
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
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.
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.
Closing a Document After you finish viewing or modifying a document, you can save the changes and close the document.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
3. 4. 5. 6.
7. 8.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Applications
Open/Close Catalog
Turns the Application Catalog window on or off.
Server name or directory (with the name used to refer to the database on the server in quotes).
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.
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.
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.
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
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.
Units
Select between units of measurement check either Inches or Centimeters.
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.
21
Printed Documentation
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
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.
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
24
Help File
25
Printed Documentation
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.
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.
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
27
Printed Documentation
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.
28
Help File
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.
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
Application Paths
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.
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).
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.
32
Help File
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.
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.
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.
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.
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.
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.
View>>Table
Displays multiple records at once in a table. Each row is one record and each column is a field on the form.
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.
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.
View>>Form
Displays only one record on screen at a time.
File>>Close
Closes the active 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.
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
Double BC
String
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.
Application>>Users
Displays the Users Information form. This form is used to authorize a new user so he/she can access the application.
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.
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.
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.
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.
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.
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.
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.
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...
Document>>Print Options
Opens the Document Print Options dialog, which lets you set a document's default print destination, page size, and 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).
6. 7.
Opening a Document
File>>Open Displays the Open a Document dialog described below. This dialog lets you open a document in the current application.
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.
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.
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.
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.
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.
2. 3.
2. 3.
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.
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.
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.
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.
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.
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.
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.
File>>New>>Form
Defines a Record Entry form. A form lets you view and enter data in database tables.
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.
10. Choose File>>Save As. Name the new form and click OK. Creating a Document Creating a Document Layout
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.
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.
4.
52
Help File
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
2. 3.
2. 3.
53
Printed Documentation
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.
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.
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.
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).
56
Help File
4.
Choose File>>Save As. Name the new menu and click OK.
5. 6. 7. 8.
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.
5. 6.
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.
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.
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.
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.
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
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.
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.
NOTE: DataEase automatically enforces the specified referential integrity option in Form View. In Table View, DataEase automatically applies the Restrict option.
59
Printed Documentation
NOTE: You only need to use this option if the Document Properties setting Clear form after save is turned off.
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.
Modifying Records
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).
NOTE: When you choose Edit>>Save, DataEase saves the data changes in the Main form record and all Subform records simultaneously.
60
Help File
NOTE: DataEase automatically enforces referential integrity in Form View. In Table View, DataEase automatically applies the Restrict option.
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.
4.
5.
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.
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.
NOTE: When you choose View>>All Records, DataEase maintains any specified QBF criteria in memory.
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.
4. 5. 6. 7. 8. 9.
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
>=
>=3
<=
<=3
not=
not=3
between...to...
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.
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.
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.
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.
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.
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.
Selecting Records
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
67
Printed Documentation
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.
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.
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.
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.
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
3. 4. 5.
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.
4. 5.
4. 5.
Create a Report
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.
4. 5.
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).
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.
Selecting Records
Select Records
Displays a blank record in which you enter the criteria DataEase uses to find records.
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.
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
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.
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.
NOTE: If you remove the clustered order and save the form, DataEase does not sort the records (and lets the clustered order degrade).
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.
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.
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.
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
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.
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.
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.
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).
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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
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.
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.
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.
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:
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.
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.
4.
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.
98
Help File
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.
100
Help File
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.
6. 7. 8.
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.
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.
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.
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.
NOTE: DataEase only displays Generated SQL when it is running in a Client-server environment.
Exporting Data
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.
103
Printed Documentation
By selecting the Load option from the Export dialog box, we can select and reload any previously defined export.
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.
104
Help File
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.
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.
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.
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.
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.
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.
4.
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:
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. #
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.
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.
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.
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.
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.
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.
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
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.
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).
NOTE: To define a Subform quickly, click the Subform cursor on the parent document to create a default size Subform.
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
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.
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.
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.
Action
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
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
125
Printed Documentation
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
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
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
Restore Application
O.S. Menu
Lock Application
Unlock Application
File List
Check Disk
O.S. Restore
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
Rename Application Delete Application One-Time Import Run Defined Import New Import View or Modify Import Delete Import Future Use 1,2,3
Changing Styles
Color
128
Help File
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
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.
5. or... 6.
7. 8.
130
Help File
9.
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.
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.
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
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
Objects>>Ellipse
Lets you draw an Ellipse object.
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.
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.
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.
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.
Objects>>Line
Lets you draw a Line object.
135
Printed Documentation
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.
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.
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.
137
Printed Documentation
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.
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.
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.
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
Min
Lowest (minimum)
Count
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)
Stderr
Number, Currency
Report Summary Fields In addition to using a Summary field in a form document, you can use a Summary field in report document.
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.
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
Defining a Variable
Time
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.
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.
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.
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
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:
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
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:
145
Printed Documentation
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:
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:
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:
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
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)
Count
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)
Stderr
Number, Currency
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:
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.
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.
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
4.
5.
Removing a Subform
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.
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.
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.
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.
Layout
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.
155
Printed Documentation
Last On Page
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.
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.
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.
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.
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
Objects>>Style>>Update
Lets you modify (overwrite) a predefined Object Style.
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.
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.
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:
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
The System
The Membership application is run from the MembershipMainMenu menu document:
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.
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.
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.
165
Printed Documentation
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.
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:
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.
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
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 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) :
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:
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.
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.
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:
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:
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.
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.
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.
181
Printed Documentation
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:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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:
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.
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.)
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.
197
Printed Documentation
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
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
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.
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".
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.
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.
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.
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.
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
210