VARIABLES IN REPORT TITLES [ INFORM/V User's Guide ] MPE/iX 5.0 Documentation
INFORM/V User's Guide
Chapter 9 VARIABLES IN REPORT TITLES
When you are defining a report on the Data Names Menu, the final part of
the definition process is to supply a report title. The title you
specify may be up to 79 characters long (including spaces) and starts at
the left margin. You may also want to include information in the title
that changes, such as the current date, the time, the page number, and
the selection criteria. To allow you to do so without having to modify
the title each time you produce the report, you can use one or more of
the INFORM/V variables shown in Table 9-1. Each time INFORM/V encounters
one of these variables while it is producing the report, it substitutes
the current value for that variable.
For example, if you specify $TODAY in the title line, and if the report
is produced on July 16, 1986, the title will include 7/16/86. If you
specify $TIME in the title, then the current time will be displayed each
time the report is produced. Use of $TODAY and $TIME will help you track
different versions of a report that is run repeatedly with constantly
changing data.
You can combine two or more variables in one title. For example, Figure
9-1 shows the use of several variables in a title line.
Table 9-1. Variables That Can be Used in Report Titles
----------------------------------------------------------------------------------------------
| Variable* | Values Used in Title | Example |
----------------------------------------------------------------------------------------------
| $TODAY | today's date (MM/DD/YY) | 11/24/86 |
| $MONTH | month (characters) | AUGUST |
| $M | month (number) | 8 |
| $YEAR | year (four numbers) | 1986 |
| $Y | year (two numbers) | 86 |
| $DAY | day of the month | 17 |
| $TIME | present time (HH:MM AM/PM) | 10:45 AM |
| $DATELINE | today's date (MPE/V format) | Fri. May 23, 1986, 12:06 PM |
| $PAGE | report page number | 53 |
| $SELECT | all selection criteria | PROD-NO > 1600 |
----------------------------------------------------------------------------------------------
*Variable names need not be capitalized.
If the report is displayed on the terminal, the title appears at the top
of the screen each time a new page is displayed. If the report is sent
to the line printer, the title appears on each new page of the report.
_______________________________________________________________________________
| |
| INFORM/V HP32246v.uu.ff - (C) Hewlett-Packard Co. 1986 |
| |
| DATA NAMES IN ACCOUNTING INFORMATION |
| |
| 1: NAME 7: DESCRIPTION 13: PRICE |
| 2: ADDRESS 8: PURCHASE NUMBER 14: TOTAL |
| 3: ACCOUNT 9: PURCHASE DATE 15: SHIPDATE|
| 4: DATE 10: BACKORDERFLG 16: DELVDATE|
| 5: CREDIT 11: QUANTITY |
| 6: PRODUCT NUMBER 12: UNIT COST |
| |
| TYPE NUMBER(S) FOR DATA NAME(S): |
| |
| TO INCLUDE IN REPORT> 1,6,11 |
| TO SORT BY> |
| FOR REPORT SUMMARY> 11TOTAL |
| FOR SELECTION CRITERIA> |
| |
| REPORT TITLE> SALES REPORT ON $TODAY AT $TIME, PAGE: $PAGE |
_______________________________________________________________________________
Figure 9-1. Specifying Variables in a Report Title
The report produced by the specifications in Figure 9-1 is shown in
Figure 9-2.
_______________________________________________________________
| |
| SALES REPORT ON 12/20/85 AT 10:25:33 PM, PAGE:1 |
| |
| NAME PRODUCT NUMBER QUANTITY |
| --------------------------------------------------------|
| Lewis Charles 55C 20 |
| Peterson Paul P 70A 20 |
| Albertson John B 90C 100 |
| Lewis Charles 90C 700 |
| Limburger Frank 60D 15 |
| Albertson John B 60D 130 |
| Baker Bill B 80B 55 |
| Albertson John B 50B 30 |
| Albertson John B 50B 5 |
| Smith John Q 11A 40 |
| Smith John Q 11B 400 |
| Smith John Q 11C 400 |
| 1915* |
| *****END OF REPORT***** |
| |
| |
| |
| |
_______________________________________________________________
Figure 9-2. Report Titles with Values Replacing Variables
MPE/iX 5.0 Documentation