* Get printer control codes for the selected printer, get printer fonts for * this form, set the printer to name <> DO PRINTSET #IF !'VISUAL' $ UPPER(VERSION()) *Send any special codes required to the printer ??? opt *Send condensed print codes to the printer ??? av_condprt #ELSE * Set printer font to the appropriate font for this form IF !EMPTY(sFontStd) SET PRINTER FONT &sFontStd ENDIF #ENDIF @ xrowreset, 0 SAY "Received from: " + mre_name @ xrowreset,47 SAY ag_name @ xrowreset, 0 SAY "" #IF !'VISUAL' $ UPPER(VERSION()) * Send standard font control codes to printer ?? av_stdprt EJECT * Send reset control codes to printer ??? resetopt #ELSE * Set printer font to the default font for this printer IF !EMPTY(sFontStd) SET PRINTER FONT &dFontStd ENDIF #ENDIF * Set device back to screen, etc DO PRNTRSETI guess what I am concerned about is how to globally manage this since our reports are in hundreds of prgs (literally). Most of the same code is run in the FPD26 version as well as VFP7 using the '# !VISUAL' conditions above. I guess I will play around with one report first as a test. Some of our reports are done entirely using '? and ??, etc' also. That is why we were slowly working towards converting all to frx's but that will take months to accomplish. Thanks for the ideas and examples!
> >** 1 >if printcmd = 'N' > set device to file c:\prtemp.htm >else > set device to print >endif > >** 2 >** old >*!* *** SET CPI FOR LASER PRINTER >*!* mp10 = 'chr(27)+"(s0p10H"' >*!* mp12 = 'chr(27)+"(s0p12H"' >*!* mp16 = 'chr(27)+"(s0p16.66H"' > >** new >*** SET CPI FOR LASER PRINTER >mp10 = ['<font size="3">'] >mp12 = ['<font size="2">'] >mp16 = ['<font size="1">'] > >** 3 > set device to screen > m.duh=FILETOSTR('c:\prtemp.htm') > m.duh='<html><body>'+CHR(13)+m.duh+CHR(13)+'</body></html>' > =STRTOFILE(m.duh,'c:\reportview.htm') > >>