Release 10.1A: OpenEdge Reporting:
Query/Results for UNIX

> ## Horizontal menu options for the Reports module

> This section presents the horizontal menu options you can use for the Reports module of Results.

> ##### Define

> Selects files and fields for the report. This option produces different results depending on if there is any report definition information displayed in the Report Info or Report Layout windows:

> - Case 1

> If you select this option when there are no files selected on the screen, this option presents a scrolling list of files you can choose. When you choose a file, the screen displays a list of related files you can join to the current file. (You can make a maximum of four joins.) If you do not want to join to another file, press END (F4 or CTRL-E).

> Once you select the active files, the files you select appear in the Report Info window, and the screen displays a list of all the fields in the selected files. You can select any of these fields by highlighting them and pressing RETURN. The fields automatically number in the order you select them. If you select a field by mistake, you can unmark it by selecting it again. If you want to resequence the selected fields, or insert a new field into the middle of the numbered list, highlight the field you want (or want to move) and type the order number next to it. The remaining numbers adjust automatically.

> When you finish selecting fields, press GO (F1 or CTRL-X) to insert the fields into the Layout window. The files you selected appear in a list in the Info window, and the fields you selected appear with their labels and formats in the Layout window. If you select a stacked array field, an *e `n` marker beneath the field format shows that it is a stacked array field, where `n` is a number representing the extent of the array.

> - Case 2

> If there is information defined in the Info or Layout windows (for example, there are active files and fields in the report) a window appears with a list of options. These options enable you to define the following for a report:

> - Fields

> This option enables you to select or change the fields that appear in the report. When you select this option, a list of field names from all selected files appears. If you have any expressions or calculated fields defined, these also appear in the list. For reports, you can pick any number of fields, as long as they fit within a width of 255 spaces. (In the Data Export module, you can select an unlimited number of fields.) Select and deselect fields from this list the same way you select and deselect them in Case 1.

> Once you select all the fields you want for the report and press GO (F1 or CTRL-X), the fields appear in the Layout window. In the Reports module, the window shows labels and formats. Also, the total number of characters (widthwise) that the current field list requires appears in the lower right edge of the Report Layout window. If you select more fields than can fit in the layout window, a “more >>” message appears at the side of the window and the following message appears at the bottom of the screen:

> You can scroll left and right within the layout window using the greater than and less than (< and >) keys. As you scroll right, the a “<< more” message appears on the left side of the window to indicate that there are more fields to the left.

> - Active files

> Changes the file(s) in the report. When you select this option, you see a scrolling list of files that you have permission to view.

> Once you select the primary file, a list of related files (such as order of customer) appears. The list can be expanded by the database administrator through the Administration module.

> Note: If you have files defined for your report and then use this option to change the selected files, you lose the current field selections. However, you can select additional files or reorder your existing files without losing your report definition.

> ##### Totals and subtotals

> Enables you to insert totals, counts, minimums, maximums, and averages for any fields in the report.

> When you select this option, a list of fields currently defined for the report appears. You select a field and a window opens that enables you to define total and subtotal information.

> This option enables you to determine what aggregate values to accumulate in a summary line for each field (Total, Count, Min, Max, Avg). For each value you choose, a summary line appears at the bottom of the report under the column. The summary line displays the specified aggregate value for the column.

> When you select an aggregate value, a character symbol appears beneath the field area in the report layout window to mark its inclusion. For example, when you pick Total for a field, a “t” character appears in the report layout beneath the field area. Other character symbols used: “a” for average, “n” for minimum, “x” for maximum, and “c” for count.

> If you select this option after you define a sort order (using the Order option), you can provide totals for break groups (sections).

> ##### Running total

> Inserts a column in the report that displays the running total of any numeric field or expression. A running total increments for each line of data. So, the value displayed in that column on any line of the report equals the sum of the field value for that line and all previous lines in the column.

> When you select this option, you see a list of all of the fields in the current active files that have numeric values. In the Reports module, you also see any defined numeric expressions.

> In the Reports module, when you select a field for a running total, a window opens that enables you to redefine the default label and format for the running total. By default, the label is Running Total and the default format is the same as the format for the totaled field. In the Data Export module, you can redefine the format only. For information on formats, see Appendix C "Field Display Formats."

> When you insert a running total, it appears in the Layout window. When you see this field in the layout window, it is not prefixed with names of a database and file. They do not appear with the field name because it is a calculated field defined for the report. Calculated fields are not from a database file. In the Reports module, an *r marker appears beneath the column definition to show that this is a running total field.

> ##### Percent of total

> Inserts a column in the report that displays a percent of total value for a numeric field or expression. This percent of total value represents the percent of the total values in the column that this line in the column represents.

> This option works the same way as Running Totals, except that the default label is Percent of Total and the *p marker shows that this is a percent of total field. This field has a standard display format of ->>>9.9%. For information on formats, see Appendix C "Field Display Formats."

> ##### Counters

> Inserts a column in the report to display a running counter. Counters are useful for line numbering and running record count.

> When you select this option a window appears that enables you to define the starting number for the counter, and the number to add for each record. This option inserts the column into the Layout window the same way as Running Totals, except that in the Reports module the default label is Counter and the *c marker shows that this is a counter field.

> ##### Math expressions (+ -*/)

> Defines a math expression and adds it as a column in the report.

> Once you select this option, a window shows the operations you can perform:

> - Add

> - Subtract

> - Multiply

> - Divide

> - Raise to a Power

> This is a menu-driven process that enables you to select the elements to build a simple or complex math expression. To build a short expression, select an operation and the appropriate field(s) or number(s). To build a long expression, just keep adding options and values to the expression by entering Yes to continue.

> Results automatically enters parentheses in long expressions. It assumes a left to right evaluation. For example, if you use the menus to enter the following expression:

>     4 + 5 * 6 + 7

> Results uses parenthesis to make it:

>     ( ( 4 + 5 ) * 6 ) + 7

> Or, if you enter:

>     2 * 4 + 3 / 6

> it becomes:

>     ((2 * 4) + 3) / 6

> See Appendix F, "Order of Evaluation," for more information about evaluating expressions.

> This option inserts the column into the Layout window the same way as Running Totals, except that in the Reports module the default label is Math Value and the marker *n shows that this is a numeric expression field.

> ##### String expressions

> Defines a string calculation and adds the expression as a column in the report. Once you select this option, a window appears with the operations you can perform:

> - Constant or Field.

> - Substring.

> - Combine Two Strings.

> - Combine Three Strings.

> - Combine Four Strings.

> - Lesser of Two Strings.

> - Greater of Two Strings.

> - Length of String.

> - User ID.

> - Current Time.

> You select the elements to build the string expression from a list. For string expressions that involve more than one element, the process enables you to select the first element in the expression, then the operator, then the second element. For example, you might want Results to combine fields and make them one string on your report to save space. So, you can select the Combine Two Strings option from the list and the two fields that you want to combine. This option inserts the column into the Layout window the same way as Running Totals, except that in the Reports module the default label is String Value and the *s marker shows that this is a string expression field.

> ##### Numeric expressions

> Defines a numeric expression and inserts it as a column in the report. When you select this option, a window displays a list of operations you can perform:

> - Constant or Field.

> - Smaller of Two Numbers.

> - Greater of Two Numbers.

> - Remainder.

> - Absolute Value.

> - Round.

> - Truncate.

> - Square Root.

> - Display as Time.

> You select the elements to build the numeric expression from a list. For numeric expressions that involve more than one element, the process enables you to select each element separately.

> This option inserts the column into the Layout window the same way as Running Totals, except that in the Reports module the default label is Numeric Value and the *n marker shows that this is a numeric expression field.

> ##### Date expressions

> Defines a date calculation and inserts it as a column in the report.

> When you select this option, a window presents a list of all the date expressions you can define:

> - Current Date.

> - Add Days to Date Value.

> - Subtract Days from Date Value.

> - Difference between Two Dates.

> - Earlier of Two Dates.

> - Later of Two Dates.

> - Day of Month.

> - Month of Year.

> - Name of Month.

> - Year Value.

> - Day of Week.

> - Name of Weekday.

> You select the elements to build the date expression from a list. For date expressions involving more than one element (for example, the difference between two dates), the process enables you to select each element separately.

> This option inserts the column into the Layout window the same way as Running Totals, except that in the default label is Date Value and the *d marker shows that this is a date expression field.

> ##### Settings

> Controls general report settings such as headers and spacing. When you choose this option, the screen presents a menu with the following options:

> - Formats and labels

> Enables you to change field labels and formats for any field or defined column in the current report. The field labels are the titles that appear above the column in the report. The formats define how the field data appears on the screen; for example, whether a dollar sign ($) prefixes a dollar amount, or how many decimal places appear. For information on formats, see Appendix C "Field Display Formats."

> This option also enables you to hide repeating values. An ampersand (&) marks each field where you defined Hide Repeating Values.

> You can hide repeating values for most different types of fields, including calculated fields. But, you cannot hide repeating values for a totals field since all the values must appear in the report in order for Results to total them.

> If you want a label to have more than one line (stacked), separate each line of the label with an exclamation point (!). If you want an exclamation point to show in your label, use two exclamation points together (!!).

> - Page eject

> Enables you to start a new page for each new section of a report. You can only use this option when you have an order definition for the records in your report. Just select the Page Ejects option and define a page eject on an order-by field. The page ejects on a change of value in the order-by field.

> - Totals only report

> Enables you to collapse the report so that the report displays only summary information about groups of records.

> You must have an order definition for the report before you can run this option. (If you try to run this option when there is no order defined for the report, Results displays a message that reminds you to define order criteria for the report.) When you select this option, a window appears so you can enable the Totals Only feature. When you select the ENABLE option, a list appears that contains the fields you selected for the report. You can mark the fields you want to summarize with an asterisk (*).

> By default, Results marks numeric, non-indexed fields as summary fields. (Numeric fields are integer and decimal fields.) It does not mark indexed fields because they are usually fields you do not summarize.

> If you mark character, date, or logical fields as summary fields, the system counts them. For all fields that are not marked for Totals Only, the values in the last record for that group appears.

> - Spacing

> Specifies how many spaces wide to make the left margin, how many spaces to insert between columns, what line to start on, how many lines to allow on each page, what type of line spacing to use, how many lines to leave between the header and the body of the report, and how many lines to leave between the body of the report and the footer. The window lists the option, the current setting, and the default setting.

> This option enables you to spread information out to make it more readable.

> - Left header

> Defines up to three lines of left header information. A header is text, such as a title, that appears at the top of the page on a report.

> You type text information into a window. You can insert values such as `PAGE`, `TODAY`, `TIME`, `USER`, and so forth, into the header section if you delimit them with curly brace ({ and }) characters. You can include the following functions: {`COUNT`}, {`TODAY`}, {`PAGE`}, {`TIME`}, {`NOW`}, {`USER`}, and {`VALUE`}.

> The {`VALUE`} variable enables you to include field information in headers and footers. Use the format: {`VALUE` `database.file.field`; `format`}. Or, you can press the GET key (F5 or CTRL-G) to pull up a list of fields to insert in the header. When you select one of the fields in the list, Results automatically puts it in the `VALUE` format for you. For example, you could use the following function in a header:

>      {VALUE mysports.customer.Sales-region; x(20)}

> This places the sales region for the first record on the page in the header. For example, Central appears in the header if the first customer record on the page is in the Central sales region.

> You can substitute angle brackets ( < > ) to replace the curly braces ( { } ) around any function. Also, your database administrator can edit the `results.l` file to change the default symbols for the `VALUE` option. That way, when you use the GET key and pick a field from the list, the default symbols automatically appear.

> Note: Always enter the numeric format for the `VALUE` function in American format, even when Results is set to default to the European numeric format (using the European Numeric Format (`-E`) startup option). In American format, a decimal point (`.`) marks the decimal location in fields and a comma (`,`) acts as a place holder. If you enter a European numeric format for the `VALUE` function, an error message appears. When you run the report with Results set to default to European numeric format, Results automatically converts the American format for `VALUE` to European numeric format. For more information about the `-E` startup option, see Appendix C "Field Display Formats."

> ##### Center header

> Specifies up to three lines of centered header information.

> ##### Right header

> Defines up to three lines of right header information.

> ##### Left footer

> Specifies up to three lines of left footer information. A footer is text, such as a page number, that appears at the bottom of the page on a report.

> ##### Center footer

> Inserts up to three lines of centered footer information.

> ##### Right footer

> Inserts up to three lines of right footer information.

> Note: When you define three types of headers (or footers) for a report, they print in different ways depending on the available header space. If there is enough room to fit all three values across, they print three across. Otherwise, the center header prints first, then the left and right headers appear on the next two lines.

> ##### First-page-only header

> Defines a header that appears only on the first page of the report. This type of header is centered near the top of the page. If you have another type of header defined, the First-page-only header appears after it.

> ##### Last-page-only footer

> Defines the content of a footer that appears only on the last page of the report. This type of footer is centered near the bottom of the page. If you have another type of footer defined, the content of the Last-page-only footer appears before it on the last page of the report. The Last-page-only footer does not appear in the Report Layout window, but does appear when you print or display the report.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095