cSelectedPrinter=GetPrinter() set printer to name (cSelectedPrinter)Here is function that you can use to clean FRX
function clean_frx lparameters cFrxFile local cFrxFile,cRpNew,i local larray(1) if empty(cFrxFile) return .f. endif use (cFrxFile) in 0 alias FrxTable exclusive select FrxTable go top =alines(larray,FrxTable.expr) cRpNew='' for i=1 to alen(larray) if atc('ORIENTATION',larray(i)) > 0 cRpNew=cRpNew+larray(i) + chr(13) + chr(10) endif if atc('PAPERSIZE',larray(i)) > 0 cRpNew=cRpNew+larray(i) endif next replace FrxTable.expr with cRpNew replace FrxTable.tag with '' replace FrxTable.tag2 with '' select FrxTable use wait window cFrxFile + chr(13) + '..... Cleared OK' nowait return .t.You clean it up by calling function on any given frx;
cFrxFile=getfile('frx') =clean_frx(cFrxFile)Normally I run this function in a loop on entire folder with frx files. Code that does this can be found in XDIR download here in downloads.