| Report Writer Empress v8.62 January 2003
--- | ---

  © 1983, 2003 Empress Software Inc.

  All rights reserved. Reproduction of this document in whole or part, by electronic or any other means, is prohibited without written consent from Empress Software Inc.

  RESTRICTED RIGHTS LEGEND

  Use, duplication, or disclosure by the Government is subject to restrictions as set forth in
  subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at 52.227-7013.

  01/03

  Part #: 001-03-A6-110

  This manual describes the usage of the Empress Report Writer. The syntax and semantics of the script language are explained in detail in this manual. Users can use examples provided in this manual as templates for creating reports. Formatting tips and conventions are also available.

  ## Table of Contents

  ### CHAPTER 1: Conventions

  | 1.1 | Command Syntax Notation
  | 1.2 | Tables and Attribute
  | 1.3 | Variables
  | 1.4 | Reserved Keywords
  | 1.5 | Null Values
  | 1.6 | Character Strings
  | 1.7 | Comments

  ### CHAPTER 2: Introduction

  | 2.1 | Empress and Empress Report Writer
  | 2.2 | Overview of Empress Report Writer

  |  | 2.2.1 | Page Headers and Footers
  |  | 2.2.2 | Data to be reported
  |  | 2.2.3 | Variables
  |  | 2.2.4 | Grouping of Data
  |  | 2.2.5 | Automatic Accumulation
  |  | 2.2.6 | Formats

  | 2.3 | Creating a Report Script
  | 2.4 | Running a Report
  | 2.5 | emprepwr
  | 2.6 | The Report Data

  ### CHAPTER 3: Sample Database

  ### CHAPTER 4: Multiple SELECT Statements

  ###

  ### CHAPTER 5: Printing Tables

  ### CHAPTER 6: Multiple Passes through Records

  ### CHAPTER 7: Command Reference

  | 7.1 | The Empress Report Language

  |  | 7.1.1 | Report Writer Commands

  | 7.2 | DEFINE Statement
  | 7.3 | Empty Statement
  | 7.4 | Expressions

  |  | 7.4.1 | Calculations
  |  | 7.4.2 | Date Functions

  | 7.5 | FOR Statement

  |  | 7.5.1 | GROUP Statement
  |  | 7.5.2 | Grouping by Date
  |  | 7.5.3 | RECORD Statement

  | 7.6 | HEADER/FOOTER
  | 7.7 | IF Statement
  | 7.8 | INCLUDE Statement
  | 7.9 | LET Statement
  | 7.10 | PARAMETER Statement
  | 7.11 | PRINT Statement

  |  | 7.11.1 | Line and Page Control
  |  | 7.11.2 | Column Control
  |  | 7.11.3 | Column Placing
  |  | 7.11.4 | Columns and Page Margins
  |  | 7.11.5 | Column Width and Justification
  |  | 7.11.6 | Multi-Line Values OVERFLOW, LEFTRIGHT, WRAPMARGIN
  |  | 7.11.7 | Justifying a Group of Items with CONCAT
  |  | 7.11.8 | Printing Data from a File
  |  | 7.11.9 | Tabs
  |  | 7.11.10 | Precision
  |  | 7.11.11 | Picture Formats

  | 7.12 | READ Statement
  | 7.13 | SELECT Statement

  |  | 7.13.1 | WHERE Clause
  |  | 7.13.2 | SORT Clause
  |  | 7.13.3 | Pattern Matching
  |  | 7.13.4 | Joins in SELECT Statements
  |  | 7.13.5 | Variables in SELECT Statements
  |  | 7.13.6 | No Output from SELECT Statement

  | 7.14 | System Variables

  |  | 7.14.1 | Specifying a Default Database
  |  | 7.14.2 | Default Date Picture MSDATEPIC
  |  | 7.14.3 | Page Length
  |  | 7.14.4 | Page Width
  |  | 7.14.5 | Page Numbering
  |  | 7.14.6 | Blank Pages

  | 7.15 | WHILE Statement

  ### CHAPTER 8: Examples

  | 8.1 | Introduction

  |  | 8.1.1 | How the Database Is Used

  | 8.2 | Example 1 - A Simple Report

  |  | 8.2.1 | Printing the Report Title
  |  | 8.2.2 | Right-Justified Titles
  |  | 8.2.3 | Leaving Blank Lines
  |  | 8.2.4 | Retrieving Data
  |  | 8.2.5 | Identifying the Database
  |  | 8.2.6 | Selecting the Data
  |  | 8.2.7 | Printing the Retrieved Values
  |  | 8.2.8 | Forgetting New Line Requests
  |  | 8.2.9 | Overstriking Characters
  |  | 8.2.10 | Final Details for the First Report
  |  | 8.2.11 | Comments

  | 8.3 | Example 2 - Grouping Records

  |  | 8.3.1 | Starting the Second Report
  |  | 8.3.2 | Selecting the Data
  |  | 8.3.3 | Defining a Derived Attribute
  |  | 8.3.4 | Looking at the Data Retrieved
  |  | 8.3.5 | Grouping Records
  |  | 8.3.6 | LET Statements
  |  | 8.3.7 | Built-in Functions and Calculations
  |  | 8.3.8 | Nearly Complete Report
  |  | 8.3.9 | Running Page Headers and Footers
  |  | 8.3.10 | Final Details for the Second Report

  | 8.4 | Example 3 - Report Parameters

  |  | 8.4.1 | Running Reports with Parameters

  | 8.5 | Example 4 - Arithmetic Calculations

  |  | 8.5.1 | Weekly Time Sheets
  |  | 8.5.2 | Starting the Time Sheets
  |  | 8.5.3 | The SELECT Statement
  |  | 8.5.4 | Setting Up the GROUP Statements
  |  | 8.5.5 | Complete Time Sheet Report

  | 8.6 | Example 5 - Text Attributes

  |  | 8.6.1 | Starting the Invoices
  |  | 8.6.2 | The SELECT Statement
  |  | 8.6.3 | Setting Up Some Variables
  |  | 8.6.4 | Header and Footer
  |  | 8.6.5 | Printing the Invoice Box and Totals
  |  | 8.6.6 | Printing the Detailed Job Breakdown
  |  | 8.6.7 | Improving the Invoices
  |  | 8.6.8 | Filling Out the Invoice Box
  |  | 8.6.9 | Dealing With Long Invoices
  |  | 8.6.10 | Using Different Headers and Footers

  | 8.7 | Features Covered