Check for >0 records before calling a CDF generation routine