fix visit report and stock report export for old data