You are on page 1of 40

DataEase - QUICK REPORTS You can accomplish virtually any report requirement in a Quick Report.

The "Query by Example" approach and full screen formatting of output let you visually preview and control every aspect of a report before you send it to the printer. You can also perform sorts, groupings, and complex statistical calculations on the data in the report without any programming. A Quick Report consists of the following four basic parts: 1. 2. 3. 4. Record Selection Criteria specify which records to process to generate the report. List Fields specify which fields to include in the output and how to sequence them. Report Format specifies how to physically lay out the report. Print Style tells the DataEase system where to send the report output (either to the screen, a disk file, or a printer).

To create a Quick Report, however, you need only define any one of these four. If, for example, you only define the Report Format, the system assumes defaults for the other three report definition steps (see the table below). Definition Step Define Record Selection Define List Fields Define Format Define Print Style Default if step is not defined All records are selected All fields are selected Columnar format is used Report destination is Screen

DISPLAYING THE QUICK REPORTS MENU There are two ways to access the Quick Reports Menu. The first may not be available on every system. Select Query By Example - Quick Reports from the DataEase Main Menu to display the Quick Reports menu. At this point, you can start a new report, or load, run, or delete an existing report. You can also access Quick Reports directly from Record Entry. Just press F9 QBE at any time during Record Entry to display the QBE - Quick Reports menu. The form you are using in Record Entry becomes the Primary form for the Quick Report. To return to Record Entry, press ESC EXIT when the QBE - Quick Reports menu is on the screen. THE QBE - QUICK REPORTS MENU
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 1

The options on the QBE - Quick Reports menu are arranged in the order they are used to create or modify Quick Reports. The ten menu options are described in detail on the following pages. RUN REPORT Option 1 on the QBE - Quick Reports menu, Run Report, runs the report currently in memory. This report may have been created during the current session or loaded into memory using Option 8, Load Report. If there is no report in memory, DataEase prompts you to select one from a window menu of existing reports in the database. START NEW REPORT Option 2 on the QBE - Quick Reports menu, Start New Report, clears the report in memory so you can start defining a new report. If there is a report already in memory when you select Start New Report, DataEase displays the message: Are you sure? Answer yes to abandon the report in memory and start a new report. As you finish the definition of each step of report creation, the Define option changes to Modify on the QBE - Quick Reports menu. Modify options let you change a report definition using the same keys and procedures you used to create it. Editing, Cursor, and Function Keys The following editing and function keys are used when defining record selection and list fields for a Quick Report: ALT-F1 HELP - Displays help messages. F2 SAVE - Saves the specified selection criteria or list fields definition for this report. ESC EXIT - Exits from Define Record Selection or Define List Fields (without saving any selection criteria or list fields that you've entered) and returns to the Quick Reports menu. F5 FORM CLEAR - Removes selection criteria or list field numbers from all the fields on the form. F6 FIELD CLEAR - Removes selection criteria or list field numbers from the current field (only). F10 MULTI - Accesses a related form. RETURN - Registers the data entered in a field and moves the cursor to the next field.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

TAB - Registers the data entered in a field and moves the cursor to the next field. The SHIFT key and the TAB key pressed together move the cursor to the previous field. HOME - Moves the cursor to the left uppermost field on the form. END - Moves the cursor to the right lowermost field on the form. INS - Inserts characters in front of the current cursor position instead of overwriting existing text. DEL - Deletes the character the cursor is on. Right Arrow and Left Arrow - Move the cursor left and right within a field but do not move the cursor to the next field. Up Arrow and Down Arrow - Move the cursor to the field above or below the field in which the cursor rests. PgUp - Moves the cursor to the top of the current page. PgDn - Moves the cursor to the left uppermost field on the next page of the form. DEFINE RECORD SELECTION Option 3 on the QBE - Quick Reports Menu, Define Record Selection, lets you limit the records that are processed by the report. You can skip this step by moving the cursor to Define List Fields. If you don't define record selection criteria, DataEase assumes you want to include all records from the Primary form. When you select Define Record Selection, DataEase displays a blank record from the Primary form. To indicate which records should be included in the report, enter values in one or more fields on the blank form. When you run the report, it will only use records that match all the record selection criteria you specify. When you specify record selection criteria, type the match value into each field as if you are entering data in Record Entry, except as noted below: Formatting characters: You must enter the formatting characters normally supplied by DataEase during Record Entry. Formatting characters include slashes in Date fields, colons in Time fields, and decimal points in Fixed Point and Floating Point Number fields. Do not type parentheses and dashes in a telephone number, dashes in a social security number, or any formatting characters specified in the definition of a formatted numeric string. Wildcard characters: You can use wildcard characters in record selection criteria just as you would use them for a record search in Record Entry. Text fields: If you use text to specify record selection criteria, you must enclose the value in quotation marks unless the value is completely unambiguous. Specifying Ranges As Selection Criteria
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 3

You can indicate a range of values as record selection criteria for a field by using logical operators. Also, you can link ranges using the and and or operators. Valid record selection operators are listed in the following table. SYMBOL = > < >= <= between...to... not and or MEANING Equal to Greater than Less than Greater than or equal to Less than or equal to Between and including two values Reverses the meaning of any of the above Both conditions must be true Either condition must be true

If you do not use an operator when you specify criteria in a field, DataEase assumes an equal comparison. The only time you need to specify the equal sign is when the criteria contains a DataEase function. To specify a conditional range, use an operator followed by a range of values. For a record to be included in the report, the values in the field must fall within the range. The following examples show how to use conditional ranges in selection criteria: RANGE CONDITION >99 >=99 between 45 to 99 not between 45 to 99 <45 or >99 >45 and <99 ( >45 and <99 ) or >120 FIELD VALUES THAT SATISFY THE CONDITION numbers greater than 99 numbers equal to 99 or greater numbers equal to or greater than 45 and less than or equal to 99 numbers less than 45 or greater than 99 numbers less than 45 or greater than 99 numbers greater than 45 and less than 99 numbers from 46 to 98, or higher than 120

The match value you enter can be the name of a field on the Primary form or a related form, and it can contain calculations and/or functions as shown in the examples listed below: EXAMPLE = DATE < = (PAY RATE * HOURS PER WEEK) = firstw (LAST, 1) = any DEPARTMENTS MANAGER = count of EMPLOYEES Specifying Selection Criteria for Related Forms TYPE OF MATCH VALUE Field Name Calculation Function Field From a Related Summary From a Related Form

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

In a Quick Report, you can list fields in a related form based on the selection criteria for both the related form, or Secondary form, and the Primary form. Only the records from the Secondary form that are related to records in the Primary form and satisfy both sets of selection criteria are selected for the Quick Report. Records from the Primary form are selected based only on criteria specified in the Primary form. After you define the record selection criteria for the Primary form, press F10 MULTI. A window menu appears showing the names of all forms related to the Primary form. Select a form by highlighting the name of the form and pressing RETURN. A blank record entry form is displayed on the screen. You define the record selection criteria for the related form just as you do for the Primary form; however, these criteria are only applied to records in the related form. When you are done specifying selection criteria for the related form, you can press F10 MULTI again to access a form related to the form on the screen or press ESC EXIT to return to the Primary form. When you are finished defining selection criteria for the Quick Report, press F2 SAVE to save the record selection criteria and return to the Quick Reports menu. Specifying Record Selection Criteria for Multiforms When you specify selection criteria for a Multiform, DataEase treats the values entered in the Main form like values entered in a Primary form and the values entered in the Subform like values entered in a related form. DataEase only selects Multiform records that satisfy the selection criteria specified in both the Main form and the Subform. DEFINE LIST FIELDS Option 4 on the QBE - Quick Reports Menu, Define List Fields, lets you specify which fields you want included in the report as well as any grouping, sorting, or statistical calculations you want to perform on the data. When you select Define List Fields, DataEase displays a blank record from the Primary form on the screen. For each field you want to include in the report, move the cursor into the field and press the Spacebar. DataEase automatically numbers the fields in the order that you mark them with the Spacebar. The number DataEase inserts in a field when you press the Spacebar indicates where the field will appear in the report output. If you prefer, you can type list numbers directly into fields instead of using the Spacebar, but you must keep track of the field numbering process yourself. When you are finished specifying all the fields you want to include in the report, press F2 SAVE to save the definition. Grouping and Sorting Records
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 5

In addition to specifying which fields to include in a report and how to sequence them, you can tell DataEase to sort and/or group the selected records according to the values in one or more list fields. To tell DataEase to sort and/or group records, simply type one or more of the following grouping and sorting keywords to the right of the list number. order tells DataEase to sort and list the records in ascending order (A-Z, 0-9, etc.) according to the values in this field. reverse tells DataEase to sort and list the records in descending order (Z- A, 9-0, etc.) according to the values in this field. group tells DataEase to collect all the records with the same value in this field and display them together in the output. DataEase displays the value of the group field once with the first record, not with every record in the group. Grouped fields are automatically sorted in ascending order. Grouped fields are also sorted before order fields and should be specified first when defining list fields. There is no limit on the number of grouping and/or sorting keywords you can specify for a field, regardless of the size of the field. As you type past the normal size of the field, it "grows" to accept your requirements. Calculating Statistics When generating a Quick Report, DataEase can also calculate statistics on the values in one or more list fields. If you specify a statistic for a group field, DataEase calculates the statistic for each group of records (group total) as well as across all records used in the report (grand total). To tell DataEase to calculate a statistic, simply type one of the following statistic keywords to the right of the list field number and any ordering or grouping keywords you may have also specified. KEYWORD count sum mean max min variance std.dev. std.err. STATISTIC GENERATED Total number of records meeting record selection criteria. Total of all values for a Number field. Average of all values for a Number field. Highest value for any field. Lowest value for any field. Statistical variance of all values for a Number field. Standard deviation of all values for a Number field. Standard error of the standard deviation of all values for a Number field.

There is no limit on the number of statistics you can specify for a field. As you type past the normal size of the field, it "grows" to accept your requirements. Defining List Fields in Related Forms
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 6

In addition to list fields from the Primary form, you can include fields from related forms in the output for a Quick Report. After you define the list fields from the Primary form, press F10 MULTI. DataEase displays a window menu showing the names of all the forms that have a predefined relationship to the Primary form. When you select a form from this menu, a blank record from that form is displayed. Use the Spacebar to mark the fields you want to include in the report. You may also specify grouping, sorting, and statistics for these fields. When you have finished defining the list fields in the related form, press ESC EXIT to return to the Primary form. For each record in the Primary form selected for the report, DataEase lists all the matching records in the Secondary form. Listing Fields in Multiforms You can also specify list fields in a Multiform when generating a Quick Report. Move the cursor into each field that you want included in the report and press the Spacebar. You can also specify grouping, sorting, and statistics for each field you mark on the Multiform. If you skip the Define List Fields step when the Primary form for a Quick Report is a Multiform, DataEase only lists the fields on the Main form. DEFINE FORMAT Option 5 on the QBE - Quick Reports menu, Define Format, lets you specify how to arrange the list fields data from the selected records into a specific format. As soon as you select this option, DataEase lists the nine report formats and tells you how many columns wide the report will be and asks whether you want to accept the default Columnar format. If the report is 80 columns wide or less, you can accept this format by pressing RETURN. If your columnar report extends beyond 80 columns, DataEase tells you that you'll have to edit the report format. DataEase then shows you what the report will look like with the report text and fields in place. At this point you can rearrange the fields and text, add headings, or make any other cosmetic alterations. If you skip this step, DataEase displays the report in Columnar format with field names as column headings. When you select Define Format from the Quick Reports menu, the system displays a menu of the eight available report formats: The Columnar format displays one record on each line with fields laid out one beside another (similar to Table View). The Field Per Line format displays one field on each line.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

The Record Entry format uses a Record Entry form as the report format (identical to Form View). The Template format uses an existing user-defined form as the report format. The GrafTalk Chart format automatically sends the report data to DataEase GrafTalk to produce a chart or graph. You must have GrafTalk to successfully use this format. The Custom format lets you design a report to your own specifications. The Export format creates data files for use in other programs. The Mailing Labels format is used to automatically format output to be printed on "multi-across" mailing labels. The CrossView format automatically sends the report data to DataEase CrossView for data analysis. You must have CrossView to successfully use this format. If you select any format except custom, the system prompts you for any additional information it requires and then displays the report format. System-defined formats can be used without modification, or can serve as a starting point for a custom report format. Once the basic format is generated, you can either save it by pressing F2 SAVE or edit it until you're completely satisfied with its appearance (except the Lotus export format, which cannot be edited). Editing Formats To define a custom format or edit a system-defined format to customize its appearance, follow the same basic procedures you use in defining and modifying a form. Function keys are assigned editing functions as summarized in the following table. FUNCTION KEY F2 SAVE F3 CUT F5 COPY F6 PASTE F7 DELLN F8 INSLN SH-F9 PRINT F10 FIELD Format Text You can edit, delete, or fully replace any format text in the format. The report titles, column header information, boundary lines, and other format text can be changed without affecting the report data output.
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 8

USE Saves the format in the computer's temporary memory. Removes fields or text for pasting or deletion. Copies fields and/or text. Pastes cut or copied text onto the format. Deletes the line on which the cursor rests. Creates a blank line immediately above the line where the cursor rests. Prints the report specification. Adds a field into the report format where the cursor is currently positioned.

For example, if you're using the default Columnar format, you might want to change the column headings selected by DataEase. Simply cursor down to the text and type over them. Alternatively, you can press F7 DELLN to delete the default field names. Then press F8 INSLN to insert a new blank line on which you can type your own column headings. Cursor Movement on the Format Screen DataEase formats can be up to 4000 characters wide and up to 16 screens long. To scroll the display to the right or left beyond the current field of view, just move the cursor off the edge of the screen. The display immediately scrolls one half-screen (40 characters) in the chosen direction. Alternatively, hold down the CTRL key while pressing either Arrow key for "express" cursor movement. CTRL-Right Arrow moves the cursor 80 positions to the right; CTRL-Left Arrow returns immediately to Column 1. ASCII Extended Character Set When you press ALT-F10, DataEase gives you access to the ASCII Extended Character set. To insert single characters, move the cursor to where you want to place the character and press ALT-F10. DataEase displays the ASCII extended character set in a window menu. Select the character you want and press RETURN. To draw single or double borders around all or part of the report format, move the cursor to where the upper left hand corner of the border to be and press ALT-F10. Select the desired border type and press RETURN. Move the cursor to the lower right hand corner of the border and press ALT-F10 again to draw the border. Adding and Modifying Fields You can add or modify fields in a format just as you do on any form. Just place the cursor where you want to add the field (or inside the field you want to modify), and press F10 FIELD. If you are adding a field, DataEase displays the Report Field Definition screen and a menu that lists the names of all of the fields selected in the Define List Fields option. If you are modifying a field, when you position the cursor in the field and press F10 FIELD, the current field definition is displayed on the Report Field Definition screen. See the description of the Custom report format for more information on adding or modifying fields in a report format. FORMAT TYPES The following sections discuss each of the system defined formats followed by a detailed discussion of the Custom format. Columnar Format The Columnar format places each field in a separate vertical column and uses the Field Names as the column headings in the report. If the Field Name is longer than the Field Length, the name is split onto two or more lines. If you don't like the way the Field Names are split, you can edit the format.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

In a Columnar format, DataEase automatically assigns each column a width equal to the Field Length, and then totals the width of all the columns plus spaces to determine the line length required for the report. You need this much space on a line to be able print the report correctly. After making the calculation, DataEase displays the message: Minimum line length for a columnar report is nnn where nnn is the length of the line in characters. If the minimum length is less than 80 characters, DataEase generates the format, evenly spacing the fields across the report width. If the minimum length exceeds 80 characters, DataEase asks you to specify the width you want for the report and evenly spaces the fields across the specified length. DataEase always inserts 1-2 spaces at the beginning of the line, from 1-4 spaces between each vertical column, and from 1-4 spaces at the end of the line to evenly space the columns. The example below contains the default Columnar format for a report that lists the STATE, LAST NAME, and ACCOUNT BALANCE field values for each record in the CUSTOMERS form. STATE LAST NAME ACCOUNT BALANCE ================================================================ === .items XX XXXXXXXXX XXXXXXX .end ================================================================ === Output STATE LAST NAME ACCOUNT BALANCE ================================================================ === NJ Adams $595.00 CT Brown $250.00 CT Davis $300.00 NJ Hill $325.00 NY Ivers $675.00 NY Jenkins $140.00 ================================================================ === NOTE: When the default format is created, each column heading (or Field Name) is the same width as the column (or Field Length). Columnar Format With Grouping and Statistics If you have specified grouping on any fields in the query, DataEase prompts:
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 10

Do you want Group Headers and Group Trailers? If you answer yes DataEase creates group headers and trailers for each grouped field. Group headers are group names. The field used to group the data in the query is automatically included in the group header. Group trailers hold group statistical totals; they list group totals for any specified statistics. You can also generate grand totals by positioning a total field after the .end command. This position tells DataEase to generate a grand total rather than a total for a specific group. Using the previous example, we can group records by STATE and generate statistical totals for each state: STATE LAST NAME ACCOUNT BALANCE ================================================================ === .group header XX .items XXXXXXXXXXX XXXXXXX .group trailer State Total: XXXXXXXX .end ================================================================ === Grand Total: XXXXXXXX In this example, the .group header text is the STATE field value. The .group trailer text (State Total), which is not a field value, is typed in the format where you want the text to appear in the report output. Report boundary lines (===) are manually entered in the format where you want them to appear in the report output. Output STATE LAST NAME ACCOUNT BALANCE ================================================================ === CT Brown $250.00 Davis $300.00 State Total: $550.00 NJ Adams $595.00 Hill $325.00 State Total: $920.00 NY Ivers $675.00 Jenkins $140.00 State Total: $815.00

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

11

================================================================ === Grand Total: $2,585.00 In addition to group totals, this report format includes a Grand Total statistic which appears after the .end formatting command. See the description of the Custom report format for more information on using the .group header and .group trailer commands in a report format. Field Per Line Format The Field Per Line format produces a report with one field on each line of the report. This format is used when printing a large number of fields that cannot fit across the width of a page. When you select Field Per Line, DataEase positions each output field on a separate line. The name of the field appears at the left margin and the field value begins in column position 40. The fields in each record appear directly below one another. A single blank line is inserted between records. Format .items PART NUMBER DESCRIPTION STORAGE LOCATION VENDOR CODE VENDOR NAME COST PER UNIT QUANTITY ON HAND REORDER LEVEL LEAD TIME REORDER AMOUNT .end Report Output PART NUMBER DESCRIPTION STORAGE LOCATION VENDOR CODE VENDOR NAME COST PER UNIT QUANTITY ON HAND REORDER LEVEL LEAD TIME REORDER AMOUNT PART NUMBER DESCRIPTION STORAGE LOCATION VENDOR CODE A05 FLANNEL SHIRT 70 A 303 SASQUATCH INC. 12.50 80 144 45 144 A06 CORDUROY PANTS 71 B 299
12

XXX XXXXXXXXXXXXXXXXXXXXXXXXX XXX XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXX XXX XXX XXXXX

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

VENDOR NAME COST PER UNIT QUANTITY ON HAND REORDER LEVEL LEAD TIME REORDER AMOUNT PART NUMBER DESCRIPTION STORAGE LOCATION VENDOR CODE VENDOR NAME COST PER UNIT QUANTITY ON HAND REORDER LEVEL LEAD TIME REORDER AMOUNT Record Entry Format

PANTAMINE LTD. 24.75 215 110 45 50 A07 WOOL SOCKS 23 B 130 BURLY BEN'S WOOL FACTORY 6.25 250 24 15 300

The Record Entry format produces a report that duplicates the layout of the specified Record Entry form. When you select the Record Entry format, DataEase creates a format with the same layout as the Record Entry form. DataEase automatically uses all fields from the form; you only have to specify list fields if you want to group, sort, or generate statistics. For example, suppose you want to include each customer's FULL NAME, ADDRESS, CITY, STATE, and ZIP CODE in your report output. The query looks as follows: Format .items nosplit FULL NAME ADDRESS CITY STATE ZIP .end Report Output FULL NAME ADDRESS CITY STATE ZIP FULL NAME ADDRESS CITY STATE

XXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXX XX XXXXX

John Adams 8 Smallwood Drive Longbranch NJ 07740 Lynn Anderson 30 Bainbridge Ave Commack NY
13

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

ZIP FULL NAME ADDRESS CITY STATE ZIP Template Format

11725 Pat Brown 25 Evergreen Circle Norwalk CT 06851

The template format is used to create a generic format that can be shared among a variety of users to create standardized reports. Even users whose databases are named and structured differently can use report templates for common or roll-up reporting. It's important to keep track of the DOS filename for each template since you must use this name when you specify the template. When you select template, you are prompted: Name of the Template file: Enter the template's DOS filename (including drive letter) and press RETURN. You are then asked: Match Template Fields to report fields by: and gives you the options: 1: by field order 2: by field name If you select by field order, the report output is matched to the template fields in the order they're listed in the report. If you select by field name, the report output is matched to the template fields by Field Name. For example, assume we create a template with a field called *NAME. We want to include each customer's FULL NAME, ADDRESS, CITY, STATE, and ZIP CODE in the report output.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

14

If you match by field order, the FULL NAME field data is assigned to the first field in the template. If you match by field name, the FULL NAME information is matched to the first template field with a Field Name that contains the text string name. In either case, the template format looks as follows: Format .items NAME XXXXXXXXXXXXXX ADDRESS XXXXXXXXXXXXXXXXX CITY XXXXXXXXXXX STATE XX ZIP XXXXX ............................................... .end Report Output NAME John Adams ADDRESS 8 Smallwood Drive CITY Longbranch STATE NJ ZIP 07740 ............................................... NAME Lynn Anderson ADDRESS 30 Bainbridge Ave. CITY Commack STATE NY ZIP 11725 ............................................... NAME Pat Brown ADDRESS 25 Evergreen Circle CITY Norwalk STATE CT ZIP 06851 ............................................... The dotted line (...) that appears between one record and the next is format text. It is typed in the format immediately above the .end command.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

15

GrafTalk Chart Format The GrafTalk Chart format lets you transparently display DataEase GrafTalk presentation graphics and charts from within a DataEase application. To use the GrafTalk Chart format, DataEase and GrafTalk must both be in directories located in your DOS PATH. For example, assume we want to produce a chart that shows the account balance information for each state. The query looks as follows: When you select the GrafTalk Chart format, DataEase displays the Formatting screen. The format looks as follows: Format STATE ACCOUNT BALANCE .items XX XXXXX .end .call GrafTalk /D %r %e This format is explained as follows: GrafTalk puts the Field Names at the top of the format as column headings for the chart. - The .call command at the bottom of the format tells DataEase to invoke GrafTalk after all the records selected by the query have been processed. - The /D parameter tells GrafTalk to draw a chart using the data transferred from DataEase. - The %r parameter specifies the GrafTalk chart filename (the report filename with a .DBG extension). - The %e parameter specifies the DataEase data filename (.DAT extension). When the GrafTalk Chart format is displayed on the screen, you can edit the column headings within these restrictions: 1. GrafTalk uses the first eight characters of the Field Name as the column name, which can include single embedded spaces only. The first character of each column name must be a letter. Column names must be separated by two or more spaces. The column name format line must remain above the .items formatting command. The first time you run the report, DataEase automatically invokes GrafTalk so you can define the GrafTalk chart. In GrafTalk, you specify the details about the chart and whether it should display on the screen or be drawn on a plotter. Refer to the GrafTalk manuals for information on how to create charts.

2. 3.

NOTE: You can also create the chart in GrafTalk before running the Quick Report. Be sure to give the chart the same name as the Quick Report with a .DBG filename extension. Refer to the GrafTalk manuals for information on creating a GrafTalk chart.
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 16

DataEase automatically assigns a disk destination on the Print Style screen when you save a GrafTalk Chart format. When the report is run, the output is written to a file which is passed to GrafTalk. DataEase automatically creates a unique DOS file name for this file. If you wish, you can overwrite this filename on the Print Style screen. DataEase then executes the .call command, invoking GrafTalk and providing both the GrafTalk chart (the %r parameter) and DataEase data filename (the %e parameter). After the chart is created, GrafTalk automatically returns control to DataEase. To modify the GrafTalk chart definition, enter GrafTalk and use the Restore Chart Utility to load the chart and make any changes you wish. After you save the revised chart in GrafTalk, it is automatically called by DataEase whenever you run the report. How to Create a GrafTalk Chart Format The steps to automatically create a GrafTalk chart format are summarized below. 1. 2. 3. Define your report as desired. Select GrafTalk Chart as the format. Save the report using Option 7, Save Report, on the QBE - Quick Reports menu. You must save the report before going any farther, because DataEase uses the name of the report when it names the GrafTalk chart. Select Option 2, Start New Report. This clears memory to help DataEase run the report. Select Option1, Run Report, and select the report you have just saved. If the Print Style Screen displays, just press F2 SAVE. Do not change anything on this screen. GrafTalk uses the values that have been automatically entered there by DataEase. DataEase automatically starts GrafTalk and the GrafTalk Main Menu displays. Design your chart as desired, following the instructions in the GrafTalk manuals on how to create a chart. Make sure you specify whether you want your chart to display on the screen (the default) or go to a printer, plotter, etc. You do not have to enter data, since your data will come from DataEase automatically. However, you must use the GrafTalk Select Data option to select the data to be included in the chart. Use the GrafTalk Chart Utilities to save the chart. Do not change the default name provided by DataEase. DataEase uses this name to find the chart when the report is run. Be sure to answer no to the save data? question, since DataEase provides new data each time you use the chart. From now on, when you run the report, the chart will automatically display (or print). You will not have to use the GrafTalk menus again.

4. 5. 6. 7.

8.

9.

10.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

17

11. 12.

Any changes that you make to the data in your form will be automatically reflected in the chart the next time you run the report. If you want to make changes to the chart, you must edit the chart in GrafTalk. Use the GrafTalk Restore Chart option to restore the chart, and then make any desired changes. The changes will be reflected the next time you run the report.

Mailing Labels Format The Mailing Labels format lets you quickly generate mailing label output that can be used with preformatted label sheets. It can also be used for any "multi-wide" output report. The Mailing Labels format produces output similar to the Field Per Line format. DataEase positions each output field on a separate line. The Field Names are omitted from the format. Each field value begins at the left margin. The fields in each record appear directly below one another. A single blank line is inserted between records. When you select Mailing Labels, DataEase prompts: How many labels across? Enter the number of records to be printed across (in a horizontal direction). DataEase then asks? How many columns per label? Enter the number of characters in the widest field. prompts, press F2 SAVE to save the format. When you've answered both of these

For example, suppose you want to print each customer's Full Name, Address, City, State, And Zip Code on mailing labels that come 3 across on preformatted sheets. We'll assume that the widest field is 25 characters. As an answer to the labels across? question, type 3. As an answer to the columns per label? question, type 25 (each column is one character). The report format is shown below. Format .items across 3 wide 25 xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx xx xxxxx .end To print the city, state, and zip code on one line, on the format: 1) 2) 3) move the cursor into the CITY field, press F10, and specify suppress spaces, type a comma after the CITY field, cut and paste the STATE and ZIP fields onto the same line.
18

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

The report output is shown below. Report Output John Adams 8 Smallwood Drive Longbranch, NJ 07740 Lynn Anderson 30 Bainbridge Ave. Commack, NY 11725 Pat Brown 25 Evergreen Circle Norwalk, CT 06851

NOTE: When printing on continuous form labels, be sure to specify the page length as 0 on the Print Style Specification screen. It may also be necessary to modify the format, adding extra blank lines between records. Export Format The Export format creates a disk file to export data to another program. It is often used to merge a DataEase data file with a word processed document, or to export numerical data from DataEase. DataEase provides nine Export formats: Mail-merge, MultiMate, WordPerfect, GrafTalk, Lotus 1-2-3, Variable Length, Fixed Length, DIF, and CrossView. The formats do not include headers, footers, or other non-data output. When creating an export, be sure to direct the report output to a disk destination on the Print Style screen and be sure no printer name is specified. Mail-merge The Mail-merge export format generates a disk file that can be merged with WordStar documents. This format displays one record on each line. A carriage return is used to separate records and a comma is used to separate fields. Text fields are enclosed in quotation marks. Number and Numeric String Fields are listed without quotation marks (if quotes are required, you can edit the format, inserting the quotes at either end of the field, before the field separators). After selecting Mail-merge, you have the option of including Field Names as the first line of the output (the Field Names are also enclosed in quotes). MultiMate The MultiMate export format generates a disk file that can be merged with MultiMate documents. Remember to add the .DOC filename extension used by MultiMate. The MultiMate format positions each Field Name on a separate line. The field value is inserted under the Field Name in the format. DataEase inserts special codes in the format to delimit fields (|-) and records (_|_). In this format, the MultiMate formatting commands (|-) are inserted by DataEase on either side of the Field Names and after each field value. The (_|_) formatting command is the MultiMate end of record symbol. The .call command calls a special DataEase conversion program named MMERGE that converts the output into the required MultiMate format.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

19

When you select Run Report, the output file is automatically formatted for use as a MultiMate secondary merge document. See your MultiMate manual for a list the restrictions that MultiMate places on secondary merge files. WordPerfect The WordPerfect Export format generates a disk file that can be merged with WordPerfect documents. The WordPerfect format positions field values in one continuous line separated by the hexidecimal code (@[120A]) that signals the end of each field. Each record is separated by the hexidecimal code @[050A]. Field Names are omitted from the data file. When you select Run Report, the output file is generated as a WordPerfect secondary merge file. There are no restrictions on the number of records or the length of the fields. GrafTalk The GrafTalk export format creates a file for external use by DataEase GrafTalk. To create a GrafTalk chart as an integral part of a DataEase report, use the GrafTalk Chart format. When you select the GrafTalk Export format, DataEase asks if you want to include the Field Names in the format. Select yes or no. After you create the export file, start the GrafTalk program and use the data to create a chart. Specify the input as a DataEase file, and give the DOS name of the file created by DataEase. Once you've created a GrafTalk chart, you can change the column names within these restrictions: 1. GrafTalk uses the first eight characters of the Field Name as the column name, which can include single embedded spaces only. The first character of the column name must be a letter. Column names must be separated by two or more spaces. The column name format line must remain above the .items formatting command.

2. 3.

Lotus 1-2-3 When you select the Lotus 1-2-3 Export format, DataEase creates a report format file that can be read by Lotus 1-2-3 or Lotus Symphony. To create the Lotus 1-2-3 format, specify a disk filename with the appropriate file extension on the DataEase Print Style Screen: .WKS .WK1 .WRK for Lotus 1-2-3 Version 1 for Lotus 1-2-3 Versions 2 and 3 for Lotus Symphony

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

20

When the Lotus program reads the file, the data is arranged in a columnar format in the spreadsheet. DataEase creates a row in the spreadsheet file for each record in the source data file. There are three special considerations to keep in mind when preparing a Lotus 1-2-3 export: 1. 2. 3. DataEase does not display the field layout and you cannot edit the Lotus 1-2-3 export format. The Lotus 1-2-3 output is not in ASCII format. Sending it to the screen can lock the system. You cannot use the in groups, in groups with group totals, or any statistical operators in a Lotus export.

Variable Length ASCII The Variable Length ASCII Export format generates an ASCII file that can be easily imported and used by most popular programs. This format displays one record on each line. If the program employs specific record and field separator characters, use these in the format. If not, use a carriage return to separate records, and use any character that does not appear in the data to separate fields. DataEase also asks if you want to include the Field Names as the first line of the output. When choosing field and record separators, be careful not to use a character that appears in your data. If you use any character other than a carriage return as the record separator, enter that character at the end of the format line followed by a backslash. Fixed Length ASCII The Fixed Length ASCII Export format creates an ASCII file that can be read by many programs, but it should be used only if no other export format can be used by the target program. Because each output record is the same length, the Fixed Length ASCII Export format produces a file containing a continuous stream of ASCII data. There are no field or record separators. DataEase automatically inserts a backslash character at the end of the format line to supress the carriage return. This character does not appear in the output. DIF (Data Interchange Format) The DIF Export report format generates a file in Data Interchange Format. The DIF format was established for VisiCalc and can be used by many other programs to import and export data. DataEase asks whether you want to: Include field names in the format :

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

21

If you answer yes, DataEase includes the Field Names in quotes as the first record just before data output. If you answer no, the Field Names are not included in the export format. Custom Format The Custom format lets you design any kind of format you want. It is particularly useful for generating form letters or designing output to conform to preprinted business forms. However, because you must design a custom format from scratch, it should only be used if none of the predefined formats can produce output close to the final format you want. If a predefined format produces output close to your requirements, use the predefined format and then edit it to serve your custom report requirements. When you select Custom, DataEase displays a default format that includes the two required commands .items and .end, and the optional .header and .footer commands. You design the report format from this starting point, using any combination of formatting commands, form text, and fields. Specifying Fields in a Custom Format When you design a custom format from scratch, you have two options for specifying fields. One method is to select all the fields as list items in the query and then simply position them in the format. The other method is to specify only those fields that require sorting, grouping, or statistical output as list items. The remaining fields may be directly specified in the format. However, you are not assisted by menus to select Field Names from if you use this second method. See the section entitled "Adding or Modifying Fields" in this chapter for more information. Formatting Commands DataEase provides eight Formatting Commands that control the appearance of a report output, whether it is displayed on screen or printed as hard copy. Formatting Commands are inserted in the report format, but they are not displayed in the report output. Each Formatting Command is preceded by a period and must be placed in Column 1 at the left margin of the format. The eight Formatting Commands are divided into four groups that are summarized as follows: - The required Formatting Commands are .items and .end. These commands specify where the report output field values and statistical summary data are displayed. - The group-level Formatting Commands are .group header and .group trailer. The group commands are only used in reports where grouping has been specified in the query. Group formatting commands indicate the beginning of the header and trailer areas for each group of data. There must be one .group trailer command for each .group header command in the report format. Also, the number of .group header and .group trailer commands must be the same as the number of groups specified in the query or Quick Report. - The page-level Formatting Commands are .page, .header, and .footer. The page commands can be used as options in any report format. The .header and .footer commands specify text and/or field values that you want to print at the top and/or bottom of the pages of the report. The
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 22

.page command advances the report to a new page even if the output has not reached the end of the current page. - The external call Formatting Command can be used as an option at the end of the report format. When all the records have been processed and the output created, the program specified by the .call command is automatically invoked. When the called program is completed, control returns to DataEase. You must select Start New Report before running a report that contains a .call command. Formatting Commands can be used in any combination as long as the format contains an .items command, an .end command, and one .group trailer command for each .group header command. Required Formatting Commands The Required Formatting Commands are .items and .end. A format must contain one .items command and one .end command and it cannot contain more than one of each of these commands. The .items Command In the format, the area above the .items and any .header command lines is known as the Report Header Area. Any information placed in the Report Header Area before the first Formatting Command prints once at the beginning of the report. The area between the .items command and the next command is known as the Items Area. Any information placed between the .items command and the next Formatting Command is printed once for each record processed by the query. The Items Area usually contains all the fields and form text you want repeated for each record. The .end Command The .end command specifies the end of record processing. The area following the .end command line is known as the Report End Area. Any information following the .end command is printed once at the end of the report, after all the records have been processed. If you place a field after the .end command, statistics for that field can be generated from all the records processed in the report, rather than for an individual group. If a .page command is placed after all output lines in the Report End Area, the printer skips to the top of the next page when the report has finished printing. If a .call command is used, it must be placed in the Report End Area and it must be the last line in the format. To illustrate the Required Formatting Commands, the following example shows a predefined Columnar format, and output for a report that lists the STATE, LAST NAME, and ACCOUNT BALANCE field values for each customer. Format STATE LAST NAME ACCOUNT BALANCE ================================================================ === .items xx xxxxxxxxx $xxxxxx
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 23

.end ================================================================ === Report Output STATE LAST NAME ACCOUNT BALANCE ================================================================ === NJ Adams $595.00 CT Brown $250.00 NY Cooper $725.00 ================================================================ === Remember that anything between the .items command line and the next command line displays once for each record processed by the query. .items Formatting Command Options There are two options you can add to an .items command to control how the information in the Items Area of the format appears in the output. The .items nosplit Command The .items nosplit command tells DataEase not to split information from a record between two pages. If there are not enough lines left on the page to print the required output for the current record, DataEase automatically advances to a new page. The .items across N wide M Command Normally, information in the Items Area is printed once for each record in vertical output lines. The .items across N wide M command lets you print this information horizontally as well as vertically (as mailing labels often require). When you use this option, DataEase prints N records across the page, starting a new record every M characters. You can assign any value you want to N and M, as long as the product N * M does not exceed the total specified width for the report. When using the across N wide M option, either value may be specified first. If you specify one and not the other, DataEase divides the output device width by the specified value and calculates the other value. For example, if you are using an 80-column printer, .items across 3 would print the second record beginning in column 27 and the third in column 53 (80 / 3 = 26 plus). The nosplit and/or across N wide M options must appear after the .items command on the same line in the format. These two options cannot be used in conjunction with any other Formatting Command. How to Use the .items across Command

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

24

If you are printing mailing labels and the label sheet has two labels per row and each label (including the space between the labels) is 30 characters wide, you could insert the across N wide M option in a predefined Record Entry format as follows: Format .items across 2 wide 30 xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx, xx xxxxx .end The final report output might look like this, with the second label starting in column 31: Report Output John Adams 8 Smallwood Drive Longbranch, NJ 07740 Pat Brown 25 Evergreen Circle Norwalk, CT 06851

Group Level Formatting Commands The Group Level Formatting Commands are .group header and .group trailer. Group Level Formatting Commands are used with a Quick Report that uses the group command following one or more of the report list fields. The Group Level Formatting Commands control how and where the information in the grouped fields appears in the output. The Group Level Commands are always used in pairs. There must be one .group header and one .group trailer in the report format for each list field specified with the group command. For each .group header command in a report format there must be a corresponding .group trailer command. If you have more than one .group header and .group trailer in a format, they correspond to each other as follows: the first .group header corresponds to the last .group trailer, the second .group header corresponds to the second from last .group trailer, etc. They are paired from the top and bottom inward. The area between a .group header command and the next Formatting Command is known as a Group Header Area. Any information placed in a Group Header Area prints once at the start of each group. The area between a .group trailer command and the next Formatting Command is known as a Group Trailer Area. Any information placed in a Group Trailer Area prints once at the end of each group. Fields with group level statistics must be placed in a Group Trailer Area. A field that has statistics specified can appear in more than one position in the format. For example, you may want the ACCOUNT BALANCE field value to appear in the .items area, the group total of the ACCOUNT BALANCE field to appear in the .group trailer area, and the overall ACCOUNT BALANCE total to appear at the end of the report. The following example lists the report format, and part of the output for a report that lists the STATE, LAST NAME, and ACCOUNT BALANCE for each customer in the CUSTOMERS form. Group level totals are included in the output. Format STATE LAST NAME ACCOUNT BALANCE
25

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

=================================================================== .group header xx .items xxxxxxxxxxx $xxxxxx .group trailer State Total $xxxxxx .end =================================================================== Grand Total $xxxxxx In this example, the .group header text is the STATE field value. The .group trailer form text (State Total), which is not a field value, is typed directly in the format where you want the text to appear in the report output. The report boundary lines (===) are entered in the format where you want them to appear in the report output. In addition to group totals, this format includes a Grand Total statistic which appears after the .end formatting command. Report Output STATE LAST NAME ACCOUNT BALANCE ================================================================ === CT Brown $250.00 State Total $250.00 NY Anderson $350.00 Cooper $725.00 State Total $1,075.00 ================================================================ === Grand Total $1,325.00 Creating A Summary Report In contrast to a report that combines field values and group-level statistics, you can also create a summary report that has group statistics but no data from individual records. To do so, place the grouped field in the Group Trailer Area of the format. Delete all fields from the Items Area. You must still have a .group header and .items command, even though no data is listed in these areas. Page Level Formatting Commands The Page Level Formatting Commands tell DataEase what information to print at the top and bottom of each page and when to advance to a new page. The three Page Level Formatting Commands .page, .header, and .footer are explained below. The .page Command The .page command tells DataEase to immediately advance to a new page before continuing to print any further output. If the .page command line is placed first in a Group Header Area, each group starts printing on a new page. If it is placed first in a Group Trailer Area, each group's
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 26

detail information and group-level statistics start printing on a new page. If it is placed at the end of the Report End Area, DataEase advances to the top of a new page when the report completes printing. If it is placed first or last in the Items Area, each record is printed on a new page. Any number of .page commands can be used in a format. The .header [N] Command The .header command specifies information to be printed at the top of each page in a report. The .header command should be placed near the beginning of the format. There can be only one .header command in a format, although none is required. The area between the .header command and the next Formatting Command is known as the Page Header Area. Any information placed in the Page Header Area prints once at the top of each page. The most common use of a Page Header is to repeat column headings at the top of each page of a report that prints on more than one page. If you don't want Page Header information to appear until a certain page, you can add the optional N parameter to the .header command, where N is a page number. Format For example, in the following format: DATAEASE TRAINING COURSE SCHEDULE CITY DATE LOCATION =============================================================== ==== .header 2 CITY DATE LOCATION (cont.) ================================================================ === .footer ================================================================ === .items xxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxx ............................................... .end Information in the Report Header Area prints once at the start of the first page of a report. Information in the Page Header Area prints once at the start of each page of a report. Note that if your report includes a Report Header Area and a Page Header Area which is to print on the first page, the Page Header prints before the Report Header. In the example above, in order to avoid printing the column heading information before the report title, it is placed under the report title in the Report Header Area (to be printed only on
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 27

Page 1) and then is repeated in the Page Header Area, using the .header 2 command in the report format (to be printed on every page, starting on Page 2). The .footer [N] Command The .footer command specifies information to be printed at the bottom of each page in a report. The .footer command should be placed at the beginning of the format, right after the .header command. There can be only one .footer command in a format, although none is required. The area between the .footer command and the next Formatting Command is known as the Page Footer Area. Any information placed in the Page Footer Area prints once at the bottom of each page. The most common use of a Page Footer is to place page numbers, running totals, footnotes, etc., at the bottom of each page of a multi-page report. If you don't want Page Footer information to appear until a certain page, you can add the optional N parameter to the .footer command, where N is a page number. For example, if you specify .footer 3 in the format, the Page Footer information begins on page 3 and prints on every following page in the report. Fields with summary statistics (for example: SALARY: sum) can be placed in the Page Footer Area. Field statistics placed in the Page Footer Area represent statistical information for all records processed up to the end of the current page (unlike after the .end command, where the statistical information takes into account every record processed in the report). The .call Command The .call command is a Custom Formatting Command that lets you call and run another program at the end of a DataEase report. DataEase swaps itself to either disk or expanded memory (EMS), thereby freeing most conventional memory for the guest program. The .call command is the last command executed by the report, regardless of where it appears in the format. Although it doesn't matter where the .call command appears in the format, it is usually inserted in the format after the .end command. When the DataEase report is completed, DataEase frees as much memory as possible and immediately calls the specified program. The called program must be in the same directory as DataEase, or in a different directory located in your DOS PATH. When the called program ends, control automatically returns to the DataEase menu from which the report was run. The syntax of the .call command is shown below: .call PROGRAM [/D] [%e] [%r] PROGRAM is the name of the program to be executed (the DOS .BAT, .COM, or .EXE command for this program). The /D option generates a unique disk filename for use by the called program to store any output it may generate. The %e option returns the output filename entered on the DataEase Print Styles screen. This is the name of the DataEase data file to be used by the called program. The %r

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

28

option returns the .DOS filename of the DataEase report. This is used to return control to DataEase when the called program is completed. NOTE: A report containing a .call command cannot be run while loaded in memory. You must first unload the report using the Start New Report option on the QBE - Quick Reports menu (be sure to save the report first). Then use Run Report and select the appropriate report from the list. ADDING OR MODIFYING FIELDS IN A REPORT FORMAT You can add or modify fields in a format just as you do on any form. Just place the cursor where you want to add the field (or inside the field you want to modify), and press F10 FIELD. If you are adding a field, DataEase displays the Report Field Definition screen and a menu that lists the names of all the fields selected in the Define List Fields option. Select the field you want from the menu by highlighting it, then press RETURN. The field (represented by a shaded rectangular area) is immediately inserted at the cursor position in the format on the screen. If you are modifying a field, when you position the cursor in the field and press F10 FIELD the current field definition is displayed on the Report Field Definition screen. If the field you specify is a Number field, DataEase asks which type it is. If you want to change the number's appearance in the report, you can change the type in the format (for example, from Floating Point to Fixed Point or Integer). This change affects only the current report, not the actual field definition. If you want to add a field that you have not specified as a list field, press Return to skip the menu of Field Names. DataEase displays a window in the Report Field Definition screen. In the Report Field Formula window, you can enter the name of a field from the Primary form, a related form, a current system variable (such as current date), or a Derivation Formula up to 4000 characters in length. You cannot use the all operator, or any sorting, grouping, or statistical operators (except relational statistical operators) in the Report Field formula. You can use relational statistical operators in the formula. When you run the Quick Report, the fields entered in this window are included in the report output just like list fields selected in the Define List Fields option. Field Lengths and Field Types The second question on the Report Field Definition screen is Field Length. If you want, you can specify a length greater or less than that of the field itself. You might do this to avoid truncating an output value or taking up unnecessary space in the report output. Again, this change affects only the current report, not the actual field definition. If you specified more than one statistic for the field in the query, DataEase also asks what statistical value should be output in this position in the format. If you want the field value itself to appear, specify item; if you want the total of the field values (such as for a group total or grand total), specify sum, and so on.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

29

Depending on the specified Field Type, DataEase asks one to three additional questions when you are creating or modifying a report format. If you specify a Number field, DataEase asks: Suppress the commas? : Press RETURN to accept the default answer of no and include commas in the output. Answer yes if you don't want commas included in the output. You might use this for an export format in which commas are used to separate fields. If you specify a non-integer Number field, DataEase asks: Suppress the decimal point? : Press RETURN to accept the default answer of no and include the decimal point in the output. Answer yes if you don't want a decimal point included in the output. You might use this for an export format where the target program works with an assumed decimal point, or if the field value is normally not decimalized. Suppressing Spaces For any type of field, DataEase asks: Suppress spaces? Press RETURN to accept the default answer of no and include spaces in the output. Answer yes if you don't want the unused spaces from the field definition included in the output. This lets you print related fields adjacent to each other without a number of empty intervening spaces. If you answer yes, all unused spaces before the first character in the field and after the last character are deleted. Other fields on the same line move a corresponding number of spaces to the left in the report output. For example, if the format has a FIRST NAME and LAST NAME field: FIRST NAME xxxxxxxxx LAST NAME xxxxxxxxxxxx

If you answer yes to suppress spaces: John Adams If you answer no: John Adams

If the format has a line with just fields (no form text) and all fields are set to Suppress Spaces, the line does not print if all the fields for any record are blank. Instead, the line is moved to the end of the print area. This feature can be very helpful if you are printing mailing labels with a variable number of lines (such as optional lines for a person's title or a second address line). All

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

30

lines are printed together with no blank lines, and the first line printed on the next label (or preprinted form) is always printed in the right place. Saving a Format After defining or modifying each field in the format, press F2 SAVE to include the field in the format or save the modified field. When you have finished all the additions or changes you want to make, press F2 SAVE again to save the format in memory. Then, select Option 7, Save Report, on the QBE - Quick Reports menu. This saves the format on disk as part of the report. Printer Control Commands DataEase provides a number of special Printer Control commands you can use to control highlighting and spacing for any part of the report. In addition to the commands provided by DataEase, you can send any control string you want to your printer. When you specify the control string in the format, you must enclose it in brackets and precede it with an @, for example, @[1B4333]. However, DataEase does not check these strings for validity or check the results in any way. The @ (At Sign) Command The @ command lets you highlight report information in boldface, italics, or any special feature your printer supports. The @ can be placed anywhere in a format except on a line containing a Formatting Command. The @ character must be immediately followed by a special character or character group representing the printer function you want to use. The @ command and its following characters do not take up space in your output; they do not advance the print head. The @ commands are ignored when the report is sent to the screen rather than to a printer. Special Effects (Highlighting) If your printer definition includes special effects options, you can access them in the report by specifying the @ command and any one of the following commands in the format. Command u nu b nb i ni s1 ns1 s2 ns2 Print Effect underline no underline boldface no boldface italics no italics special 1 no special 1 special 2 no special 2

For example, if you enter the following string in the report format: @iThis text will be printed in italics.@ni
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 31

The @i command causes the printer to switch to italics. The @ni command returns the printer to normal type. NOTE: There are a total of nine special selections (s1-s9). Characters per Inch (CPI) If your printer definition includes multiple CPI options, you can access them during the report by specifying the @ command and any one of the following commands in the format: Command c1 c2 c3 c4 Print Effect First CPI (Character Per Inch) setting in printer definition. Second CPI setting in printer definition. Third CPI setting in printer definition. Fourth CPI setting in printer definition.

For example, if your printer definition supports 10, 12, 16 and 4 CPI and the default is 10 (the first specified), if you enter the following command in the report format: @@c3This text will be sixteen characters per inch.@c1 The @c3 command causes the printer to switch to 16 CPI. The @c1 command returns the printer to the default 10 characters per inch. Lines per Inch (LPI) If your printer definition includes multiple LPI options, you can access them during the report by specifying the @ sign and any one of the following commands in the format: Command l1 l2 l3 l4 Print Effect First LPI (Line Per Inch) setting in printer definition. Second LPI setting in printer definition. Third LPI setting in printer definition. Fourth LPI setting in printer definition.

For example, if your printer definition supports 6, 8, 12, and 16 LPI, and your default is 6 LPI, if you enter the following command in the format: @@l4This text would appear in the smallest available LPI, in this case 16 LPI (since there are more than 6 lines per inch, the text is more compressed). This is considered compressed format.@l1 The @l4 command causes the printer to switch to 16 LPI. The @l1 command returns the printer to the default 6 lines per inch.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

32

Page Size DataEase creates and transmits printer control strings based on your use of the special @ commands. However, it does not adjust page breaks to take into account the spacing changes made by @ commands. DataEase provides automatic page breaks based only on the page size, margins, and lines per inch specified on the Print Style Specification screen. Therefore, if in the middle of a page, you change to a type style using fewer lines per inch, the page may fill before DataEase provides the automatic page break. If you change to a type style with more lines per inch, empty space may be left at the bottom of a page. Similar problems may occur in providing automatic line wrap if you change type sizes in the middle of a line. You can compensate for these formatting adjustments by specifying different page sizes and margins on the Print Style Specification screen. DEFINE PRINT STYLE Define Print Style Option 6, on the QBE - Quick Reports menu, lets you indicate where you want to direct the output from the report. When you select this option, DataEase displays the Print Style Specification screen. The values you enter on this screen define the report destination and the physical appearance of the report output. Defining the Report Destination The first choice on the Print Style Specification screen lets you send a report to either the Screen, a Printer, or a Disk File. The default destination is Screen. Report Destination: Screen If you select Screen as the report destination, you don't have to answer any other questions on the Print Style screen. Just press F2 SAVE to save the destination. When a report is sent to the screen, it always pauses after each page is displayed. You must press the Spacebar to continue running the report. Screen Report Scrolling When a report is sent to the screen, the following keys are used to scroll through the report. Key HOME END PgDn PgUp CTRL RIGHT ARROW CTRL LEFT ARROW Scrolls To Start of the Report End of the Report Next Screen Previous Screen Half Screen (40 columns) to the Right Half Screen (40 columns) to the Left

Reports with Two Destinations


8 THE WERTHEIMER COMPUTER WORKS INC., 1996 33

If a report is usually displayed on the screen but may occasionally need to be printed, fill in the fields as if the report is to be printed, then go back to the destination and change it to Screen before pressing F2 SAVE. If you also tell DataEase to allow style modification at run-time, when the report is run you only have to change the report destination to print the report. Report Destination: Disk If you select Disk as the report destination, you must also tell DataEase the name of the file and the directory in which you want to store the report output. NOTE: If you specify a disk file destination and include a Printer Name, the printer control codes for that printer are included in the output file - DataEase assumes the report will eventually be printed rather than processed by another program. If you are planning to process the report rather than print it, you should leave the printer fields blank. Report Destination: Printer If you select Printer as the report destination, you must answer several questions about your printer and the way you want the output printed. First, you must specify the name of the printer that you want to use. All printers attached to the system are defined in the Define Printers option of System Administration. To display the default printer name and specifications as entered on the System Configuration form, press F3 DEFAULT VIEW. When prompted for the name of the printer, the most flexible response is to place an asterisk (*) wild card symbol in this field. When the report is run, the output is sent to the default printer specified on the System Administration form. Alternatively, you can specify the printer number (Local 1, Local 2, Network 1 or Network 2) as listed on the System Configuration form. When the report is run, DataEase uses the appropriate printer control codes for the specified printer in addition to the information in the Print Style Specification when it generates the report output. Print Style Modification The prompt on the Print Style Specification screen that follows your report destination choice reads: Allow style modification at run-time? If you answer yes, DataEase displays the Print Style screen each time you run the report, so you can modify the current specifications. If you modify the Print Style at run time, you can only save the modified specification if DataEase displays the QBE - Quick Reports menu after the report has finished running. Select Option 7, Save Report, to save the report with the modified print style specification. If the report does not return to the QBE - Quick Reports menu, the changes cannot be saved on disk.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

34

If you answered yes to this question, but decide you want to run the report without changing the Print Style, just press F2 SAVE when the Print Style Specification screen is displayed. DataEase will then run the unmodified report. If you answer no to the run-time style modification question, DataEase does not display the Print Style screen. It immediately runs the report using the last saved Print Style choices. After running a report, you can recall the last used Print Style Specification immediately by pressing F5 DEFAULT FORM. If you only want to view certain fields, you can recall each field individually by moving the cursor into the field and pressing F6 DEFAULT FIELD. However, once you exit the report or load a new report, you can only access the Print Style Specification that was saved with the report. Completing the Print Style Specification: Page Size If you select Printer or Disk (with printer codes included) as the output destination for the report, press F3 DEFAULT VIEW to displays the default answers to the remaining questions. You can change any of these default responses as explained below: The next prompt asks: Pause after each page? Answer yes if you're printing on hand-fed single sheet paper or envelopes. DataEase will pause after each page and let you change the paper. Press any key to continue printing. Answer no if you're printing on continuous feed/form paper. The next part of the Print Style screen lets you change the default values for Page Length, Page Width, and/or Starting Position. Enter the Page Length and Page Width values in inches if they are different from the defaults. The Starting Position field should be left blank unless your printer's form feed mechanism won't let you align the left edge of the paper with the left edge of the platen. If this is the case, specify the distance between the paper edge and the platen edge in inches. NOTE: These values affect printed reports and reports sent to disk; they have no effect on a screen report. Completing the Print Style Specification: Margins The left, right, top, bottom, header and footer margins are specified in the next six fields on the Print Style screen. All margin values should be specified in inches. NOTE: The Margin fields are left blank as a default indicating a value of 0. The chart at the left side of the Print Style Screen is a guide showing which field affects which margin area. Completing the Print Style Specification: Type Style

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

35

The last five fields on the Print Style screen let you specify the type style used for the report as a whole. You can override these settings for portions of the report by inserting @ (At Sign) printer control commands in the format. The type style choices are as follows: Characters per Inch, Lines per Inch, Highlights (bold, underline, italic, Special 1-9). Saving the Print Style Specification When you finish filling in the Print Style Specification form, press F2 SAVE to save your specifications. DataEase checks to be sure all required fields are filled and saves the specification form. If one or more required fields are blank, DataEase prompts: Print specification is incomplete complete the specification at run-time? Do you want to

If you answer yes and you also answered yes to the Print Style Modification at run-time question, the incomplete specification is accepted and DataEase returns to the QBE - Quick Reports menu. If the specification is incomplete and you answered no to the run-time modification question, DataEase prompts: Data in this field is required The Print Style Specification form remains on the screen with the cursor in the first incomplete field. Complete the form and press F2 SAVE again. Modifying the Print Style Specification If you answered yes to the question: Allow style modification at run time The Print Style Specification form appears on the screen whenever you run the report. You can then change any fields you want before running the report. When you finish making changes, press F2 SAVE to run the report with these changes. You can change your answer to the style modification question by selecting Modify Print Style from the QBE - Quick Reports menu and overwriting your previous response. SAVE REPORT Save Report is used to save the report so you can run it again at a later date. Once you have defined a Quick Report, you can save it by selecting Option 7, Save Report, from the QBE - Quick Reports menu. DataEase asks: Please enter the report/procedure name:

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

36

The report name can be up to 20 characters long. Once you specify the report name and press RETURN, DataEase saves the complete report definition. The report remains in memory until you start a new report, load a report, or exit Quick Reports. If you exit from Quick Reports back to a Record Entry form, the report remains in memory. If the report has been previously saved DataEase asks: Do you want to save modified report procedure under another name (y/n) : If you answer yes, DataEase asks: Please enter the new report/procedure name: The new name that you give is used for the modified report, and the original report remains intact. If you answer no, DataEase replaces the original report with the modified report. If you have modified the report and you press ESC EXIT without first saving it, DataEase asks: Do you want to abandon the current report? If you answer yes, DataEase abandons the report modifications and returns you to the DataEase Main Menu. If you answer no, DataEase returns you to the Quick Reports menu. The report remains in memory for you to save using Option 7, Save Report. LOAD REPORT To load a previously saved report into memory, select Option 8, Load Report, from the QBE Quick Reports menu. DataEase asks: Please select the report to load: DataEase displays the names of both Quick Reports and DQL Procedures in a window menu on the right-hand side of the screen. You can only load user-defined Quick Reports from this menu. If you try to load a DQL Procedure or a Quick Report that was installed by the application developer, DataEase displays the message: You are unable to access this report When you load a report, DataEase displays the message: Report "Reportname" read to tell you that the report has been loaded into memory.
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 37

DELETE REPORT Delete Report, Option 9 on the QBE - Quick Reports menu is used to permanently delete a report from the database. To delete a Report, choose Option 9, Delete Report, and then select the report you want to delete from the window menu. DataEase asks: Please select the report to be deleted: You can only delete user-defined Quick Reports from this menu. If you try to delete a DQL Procedure or a Quick Report that was installed by the application developer, DataEase displays the message: You are unable to access this report Once you select a report to delete DataEase checks whether you are sure before going ahead by asking: Are you sure you want to delete it? (enter y or n) If you answer yes, the report is permanently removed and cannot be recovered. If you answer no, you are returned to the QBE - Quick Reports menu with Delete Report highlighted. PRINT REPORT DEFINITION To print a Report Definition select Option 10, Print Report Definition, from the QBE - Quick Reports menu. This option provides a printed Report Definition comparable to the printed Form Definition created by pressing SH-F9 PRINT in Form Definition. DataEase prints the Report Definition on the default printer. The Record Selection section of the printed report lists the fields and the selection criteria specified for each. The Field Selection section shows the fields to be listed with their list numbers and any sorting or statistics specified. The Report Format section shows the report format as it would appear on an 80 column printer. This is followed by a description of each field included in the report format. The Field Descriptions give the Field Name, Field Type, and Field Length, and indicate whether leading or trailing spaces will be removed. Finally, the Report Definition lists the amount of memory used for the Report Definition. RUNNING OR MODIFYING AN EXISTING QUICK REPORT When you select Run Report, DataEase runs the report currently loaded in memory. If you want to run an existing report which is not currently loaded, you can either load that report and then run it, or clear the existing report by selecting Start New Report, select Run Report, and choose the report to run from the window menu.
8 THE WERTHEIMER COMPUTER WORKS INC., 1996 38

Before you can modify an existing report, you first have to load it. Choose Load Report and then select the report from the window menu of existing reports. Once you choose the Quick Report you want to load and press RETURN, DataEase reads the report and displays the Quick Reports menu with Define/Modify Record Selection highlighted. To modify the report, highlight the option you want to change, and make your changes. To save the report modifications, select Save Report. DataEase asks whether you want to save the modified report under another name. If you want to keep both the original and the modified report, answer yes, and give the modified report a new, unique name. If you want the modified report to overwrite the original, answer no. To run the modified report, select Run Report and press RETURN. If you answered yes to: Allow Style modification at run-time? on the Print Style Specification screen, DataEase displays this screen before running the report in case you want to send the report to another destination. LAN CONSIDERATIONS IN QUICK REPORTS Record Entry Conflicts If a user runs a report from a shared database using DataEase on a LAN and the database administrator has assigned a Lock records Report Processing locking rule, the standard record locking rules apply. If the report is listing a record and the Record Entry locking rule is Exclusive, no other user can gain access to that particular record. Similarly, if a user is already viewing a record, the report is denied access to the record. If the Record Entry locking rule is Shared or None, another user can view the record but cannot modify or delete it while the report is running. Form Definition Conflicts While a report is being run, no form definition for any form referenced by the Quick Report can be modified or deleted. If a user attempts to modify or delete the form definition, DataEase displays a Resource Conflict message. Loading a Quick Report When using DataEase on a LAN, if the database administrator has assigned a Shared Report Definition locking rule, and a user loads a report from a shared database, any number of other users can also load the same report definition simultaneously. If the database administrator has assigned an Exclusive Report Definition locking rule, and a user loads a report from a shared database, no other user can load the same report simultaneously. If another user attempts to load the report, DataEase displays a Resource Conflict message.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

39

Modifying a Quick Report When using DataEase on a LAN, if the database administrator has assigned a Shared Report Definition locking rule, two users can load the same report from a shared database. However, neither user can save any modifications to the Report Definition. If either user attempts to save report modifications, DataEase displays a Resource Conflict message. If the database administrator has assigned an Exclusive Report Definition locking rule, only one user can load a report. Saving a Quick Report When using DataEase on a LAN, a report cannot be saved in a shared database if any existing report in the shared database has the same name. Once a new report has been saved, other users can gain access to it if the Report Definition locking rule is Shared. If a user loads a report, modifies it, and attempts to save it while another user is viewing it, DataEase displays a Resource Conflict message, and the report is not saved.

8 THE WERTHEIMER COMPUTER WORKS INC., 1996

40

You might also like