select * from (tcTable) where ... into cursor myCursor lcTemp = sys(2015) Copy to (tcPath+lcTemp) type fox2x oCrystal=CreateObject("Crystal.CRPE.Application") #Define WS_MAXIMIZE 29949952 DECLARE integer GetForegroundWindow in WIN32API DECLARE short IsWindow in WIN32API integer .... oRpt = oCrystal.OpenReport(lcReportName+".RPT") With oRpt With .Database.Tables(lcTable) .Location = tcPath+lcTemp+".dbf" Endwith ...Cetin