MAIN CALL STARTLOG("logerr.txt") MENU "" ON ACTION report CALL reporte() COMMAND KEY(INTERRUPT) "Exit" EXIT MENU END MENU END MAIN --- FUNCTION reporte() DEFINE dataline STRING DEFINE filename STRING DEFINE pc_fname STRING DEFINE i,res SMALLINT LET filename="rep_",fgl_getpid() USING "<<<<<<<&",".txt" START REPORT report_pl_1 TO FILE filename FOR i=1 TO 10 LET dataline="This is line ",i USING "&&&" OUTPUT TO REPORT report_pl_1(dataline) END FOR FINISH REPORT report_pl_1 # if you are testing on Windows locally, you can avoid the fgl_putfile LET pc_fname=base.Application.getProgramDir(),filename # if you are testing in client-server mode, you need to # set the destination path and execute fgl_putfile --LET pc_fname="c:\\Temp\\",filename --CALL fgl_putfile(filename,pc_fname) CALL ui.interface.frontcall("standard","shellexec",[pc_fname],[res]) END FUNCTION REPORT report_pl_1(theline) DEFINE theline STRING OUTPUT LEFT MARGIN 0 TOP MARGIN 0 --BOTTOM MARGIN 0 # in 2.32 you don't need this line BOTTOM MARGIN 0 PAGE LENGTH 1 FORMAT ON EVERY ROW PRINT COLUMN 1, theline END REPORT