Sorted out problem with ifeq ($REPTYPE,data) block - added else.