select * ; from table ; into table (addbs(gc_loc))+'local.dbf' && stored local pc path the temp or personal temp dir DO CASE CASE BETWEEN(_TALLY,1,23) && total length of first page i.e. one page PNTotalP = 1 OTHERWISE PNTotalP = (_TALLY-23)/27 && total length - first page / number on other pages PNTotalP = STR(PNTotalP,5,5) IF AT('.',PNTotalP) <> 0 && deal with decimal ln_odec = AT('.',PNTotalP)+1 lcRet = SUBSTR(PNTotalP,ln_odec) lcRett = SUBSTR(PNTotalP,ln_odec+1) IF VAL(lcRet) > 4 PNTotalP = VAL(PNTotalP) PNTotalP = PNTotalP+1 PNTotalP = STR(PNTotalP,5,0) ENDIF IF VAL(lcRet) < 5 PNTotalP = VAL(PNTotalP) PNTotalP = PNTotalP+2 PNTotalP = STR(PNTotalP,5,0) ENDIF ENDIF ENDCASE REPORT FORM (gc_pic)+"new" NOCONSOLE TO PRINT && have to vars on the report _pageno and PNTotalP prtname=SET("printer",2) chgprtname(prtname,"Visual FoxPro","(WEIA), Goodies") &&great dll you can get that will change the name in the windows printboxand I know this code can be improved, please feel free and let me