Fixing bug when generating custom reports, return a numeric value only if a single column was requested (otherwise return array)
Fixes #3884 #4014