Examples (REPORT command)

SORT CASES BY DEPT.
REPORT FORMAT=LIST
  /VARIABLES=PRODUCT (LABEL) ' ' 'Retail' 'Products'
           SALES 'Annual' 'Sales' '1981'
  /BREAK=DEPT 'Department' (LABEL)
  /SUMMARY=VALIDN (PRODUCT) MEAN (SALES) 'No.Sold,Mean Sales'.
  • This report is a listing of products and sales by department. A summary of the total number of products sold and the average sales by department is also produced.
  • Cases are first sorted by DEPT so that cases are grouped by department for the case listing and for the calculation of statistics.
  • FORMAT requests a report that lists individual cases within each break group.
  • VARIABLES specifies PRODUCT and SALES as the report variables. Keyword LABEL requests that the case listings for PRODUCT display value labels instead of values. Three-line column headings are provided for each report column. The first line of the column heading is blank for the variable PRODUCT.
  • BREAK identifies DEPT as the break variable and provides a one-line column title for the break column. LABEL displays the value label instead of the value itself.
  • SUMMARY calculates the valid number of cases for PRODUCT and the mean of SALES for each value of DEPT. A title is provided for the summary line to override the default title, VALIDN.