home *** CD-ROM | disk | FTP | other *** search
- ***
- *** Report: Sample Report
- ***
-
- parameters a_model
-
- if pcount() < 1
- Prn_Init() && Load the printer controls, using defaults
- * unless PRINTER.MEM is around.
- else
- Prn_Init(a_model) && Try for a particular model
- endif
-
- PgHd_Init()
- declare header_[7]
- header_[1]= Large("BILL COLLECTING SYSTEM")
- header_[2]= Italic("Acme Corp, Inc. Ltd.")
- header_[3]= [] && Blank line
- header_[4]= Bold("People on the List")
- header_[5]= []
- header_[6]= Norm("Name Address Owes Us $")
- header_[7]= Norm("---------- ---------- ----------")
-
- total_owed= 0
-
- select 1
- use DATA
- goto top
- do while .not. eof()
- PageHead()
- Norm_On()
- NextLine(1, DATA->Name)
- SameLine(2, DATA->Address)
- if DATA->Owes_Us > 0
- Bold_On()
- SameLine(2, DATA->Owes_Us, "999,999.99")
- Bold_Off()
- else
- SameLine(4, Italic("Paid up!"))
- endif
- total_owed= total_owed +DATA->Owes_Us
- select DATA
- skip
- enddo
- close databases
-
- if prn_first
- @ 10, 20 say "Nobody is on the list!"
- else
- NextLine(2, "Total Owed to Us:")
- SameLine(1, total_owed, "@B 999,999,999.99")
- PrnEject()
- PrintOff()
- endif
-
- return
-
- * eof Report.Prg