use (ReportFile) exclusive locate for objtype=1 and objcode=53 if not eof() if not empty(tag) or not empty(tag2) or not empty(expr) newexpr="" if "PAPERSIZE=5"$expr newexpr=newexpr+iif(empty(newexpr),"",chr(13)+chr(10))+"PAPERSIZE=5" endif if "ORIENTATION=1"$expr newexpr=newexpr+iif(empty(newexpr),"",chr(13)+chr(10))+"ORIENTATION=1" endif replace tag with "", tag2 with "", expr with newexpr endif endifHope this helps...