Leonel, te copio el rept23.prg
Marcelo
#include "FiveWin.ch"
#include "report.ch"
STATIC oReport
Function Rep23(cTextfile) // To make this a reusable module, we pass
// the name of the text file to this function,
// so it can be re-used for many different files
// with the same margin and font settings.
LOCAL nRecno, oFont
DEFINE FONT oFont NAME "COURIER" SIZE 0,-12
// Font sizes for PRINTING are given in "points" not pixels.
// (Pixels are used for font width and height for SCREENS only.)
// By using a "0" for width and a "-" in front of the "height" #
// we tell FiveWin that we're using points instead of pixels.
// Thus -12 means "12 point," which is used for "10 pitch"
// non-proportionally spaced Courier type that prints at
// 6 lines/inch.
// -10 means a 10 point font printing at 7 lines/inch.
// Use -9 for a "12 pitch" equal-spaced Courier font printing
// at 8 lines per inch.
// Note that in creating the report object, we are leaving out
// any mention of title or header specs. because those are
// already included in our .TXT file.
REPORT oReport ;
FONT oFont ;
CAPTION "Text File Printout" ;
TO PRINTER
COLUMN DATA " " SIZE 76 // * Trick "Data" - we're fooling Mother
// Nature here. The memo will go into the " ". *
END REPORT
// All title lines, page numbers and headings already exist in
// our text file, so the next two code statements make sure that
// FiveWin won't add its own title lines.
oReport:nTitleUpLine := RPT_NOLINE
oReport:nTitleDnLine := RPT_NOLINE
oReport:Margin(.15,RPT_LEFT,RPT_INCHES)
oReport:Margin(.25,RPT_TOP,RPT_INCHES)
oReport:Margin(.25,RPT_BOTTOM,RPT_INCHES)
// I know the top/bottom margins shown here should mathematically cause
// more than the desired 60 lines per page to print. However, in actual
// practice with my Panasonic KXP 4450 laser printer emulating the
// HP LaserJet Plus, this is what I had to use to get 60 lines. Why?
// Inscrutible printer driver! Maybe your printer driver functions in
// a more mathematically logical fashion. If so, adjust accordingly.
// The left margin is set so small here because a margin is already
// built into the text file itself (in this particular case).
ACTIVATE REPORT oReport ;
ON INIT SayMemo(cTextfile)