fixed bug with reports using SQL instead of a 'PHP Code' record.