13. Building Applications : The Create a Frame or Procedure Frame : Creating Report Frames : Sample Report-Writer Report File
 
Share this page                  
Sample Report-Writer Report File
This sample report source file takes data from the Emp database table and formats it, showing the salaries of employees and the total salary for each department. In the report, empdetail.rw is the name of the report source file, while empdetail.out is the name of the report output file.
.name empdetail.rw
.output empdetail.out
.data emp
.sort dept : a,
           name : a
.header report
     .newline 3
     .center
     .print "List of Employees"
     .newline 3
.header dept
     .tformat dept (c12)
.footer dept
     .right salary
     .print "_________________"
     .tab salary
     .print sum(salary)
     .newline 2
.detail
     .print dept (b12), name (c14)
     .print date(birthdate)
          (d"February | 3, 1901 ")
     .println salary ("$$,$$$,$$$.nn")