>>*--I added the color stuff - leave that out >>CLEAR >>LOCAL lcdefault, llokay, cleancolors >>lcdefault=UPPER(SYS(2003)) >>cleancolors=.F. && false is do NOT change the colors on the report >>IF TYPE("pRepoForM")#"C" >> LOCAL lcnewdefault >> lcnewdefault=GETDIR() >> IF !EMPTY(lcnewdefault) >> SET DEFAULT TO (lcnewdefault) >> pRepoForm="ALL" >> ELSE >> pRepoForm=GETFILE("frx") >> ENDIF >>ENDIF >> >>DO CASE >> CASE UPPER(pRepoForm)#"ALL" >> pRepoForm=LOWER(pRepoForm) >> IF NOT ".frx"$pRepoForm >> pRepoForm=pRepoForm+".frx" >> ENDIF >> IF NOT FILE(pRepoForm) >> pRepoForm=GETFILE("frx") >> IF NOT ".frx"$pRepoForm >> pRepoForm=pRepoForm+".frx" >> ENDIF >> IF NOT FILE(pRepoForm) >> =MESSAGEBOX("Report Form "+pRepoForm +" not found?!") >> RETURN >> ENDIF >> ENDIF >> DO iClean WITH cleancolors >> OTHERWISE >> *WHAT ABOUT PAGE Orientation? >> IF ADIR(aa,"*.frx")<=0 >> =MESSAGEBOX("No *.frx Report Forms found?!") >> RETURN >> ENDIF >> FOR ia =1 TO ALEN(aa,1) >> pRepoForm=aa[ia,1] >> DO iClean WITH cleancolors >> ENDFOR >> IF ADIR(aa,"*.lbx")<=0 >> =MESSAGEBOX("No *.lbx Label Forms found?!") >> RETURN >> ENDIF >> FOR ia =1 TO ALEN(aa,1) >> pRepoForm=aa[ia,1] >> DO iClean WITH cleancolors >> ENDFOR >> >>ENDCASE >>llokay=IIF(UPPER(lcdefault)=UPPER(SYS(2003)),.T.,.F.) >>IF !llokay >> SET DEFAULT TO (lcdefault) >>ENDIF >>RETURN >>*---------------------------------- >>PROCEDURE iClean >>PARAMETERS cleancolors >> >>CLOSE TABLE ALL >>USE (pRepoForm) >>WAIT WIND "Fixing Report form "+DBF() NOWAIT >>=AFIELD(afld) >>* the very first record only >>IF ASCAN(afld,"TAG")#0 AND ASCAN(afld,"TAG2")#0 AND ASCAN(afld,"EXPR")#0 >> GO TOP >> *keep orientation and number of copies >> lcExpr1="" >> lcExpr = "COPIES=1" >> lcorient="ORIENTATION=0" >> IF "orientation"$LOWER(EXPR) >> lnOrientation = ATC("ORIENTATION", EXPR) >> lcorient="ORIENTATION" + ; >> SUBSTR(EXPR, ; >> lnOrientation + 11, 02) >> ENDIF >> IF "copies"$LOWER(EXPR) >> lcExpr=SUBSTR(EXPR,AT("copies=",LOWER(EXPR)),8) >> ENDIF >> lcExpr1=lcorient+CHR(13)+lcExpr+CHR(13) >> REPLACE TAG WITH "", tag2 WITH "", EXPR WITH lcExpr1 >> ? "*******************" >> ? EXPR >>ELSE >> =MESSAGEBOX("File "+pRepoForm+". Not VFP6 format?!") >>ENDIF >>GO TOP >>SCAN >> IF cleancolors && force lines and text boxes to black on white >> *--Tracy runs this to cleanup vfp6 reports >> DO CASE >> CASE objtype=6 && lines (-1=default color setting of desktop) >> IF fillred=-1 >> REPLACE fillred WITH 255 >> ENDIF >> IF fillgreen=-1 >> REPLACE fillgreen WITH 255 >> ENDIF >> IF fillblue=-1 >> REPLACE fillblue WITH 255 >> ENDIF >>*!* IF fillred=-1 && background >>*!* REPLACE fillred WITH 0 >>*!* ENDIF >>*!* IF fillgreen=-1 >>*!* REPLACE fillgreen WITH 0 >>*!* ENDIF >>*!* IF fillblue=-1 >>*!* REPLACE fillblue WITH 0 >>*!* ENDIF >> IF penred=-1 && forground >> REPLACE penred WITH 0 >> ENDIF >> IF pengreen=-1 >> REPLACE pengreen WITH 0 >> ENDIF >> IF penblue=-1 >> REPLACE penblue WITH 0 >> ENDIF >> CASE objtype=8 && fields >> IF penred=-1 >> REPLACE penred WITH 0 >> ENDIF >> IF pengreen=-1 >> REPLACE pengreen WITH 0 >> ENDIF >> IF penblue=-1 >> REPLACE penblue WITH 0 >> ENDIF >> IF fillred=-1 >> REPLACE fillred WITH 255 >> ENDIF >> IF fillgreen=-1 >> REPLACE fillgreen WITH 255 >> ENDIF >> IF fillblue=-1 >> REPLACE fillblue WITH 255 >> ENDIF >> CASE objtype=7 && shapes >> CASE objtype=5 && text only >> IF penred=-1 >> REPLACE penred WITH 0 >> ENDIF >> IF pengreen=-1 >> REPLACE pengreen WITH 0 >> ENDIF >> IF penblue=-1 >> REPLACE penblue WITH 0 >> ENDIF >> IF fillred=-1 >> REPLACE fillred WITH 255 >> ENDIF >> IF fillgreen=-1 >> REPLACE fillgreen WITH 255 >> ENDIF >> IF fillblue=-1 >> REPLACE fillblue WITH 255 >> ENDIF >> ENDCASE >> ENDIF >>ENDSCAN >>USE >>gfile=LEFT(pRepoForm,RAT(".",pRepoForm)-1)+".*" >>?gfile >>RETURN >> >> >> >>>>