It appears that the error was caused by having a system table in the report (not linked obviously to any of the tables). When it was removed the error went away!