They're almost the same, but not quite.
~Tanaka-san wa Osaka ni iku to iu no desu. to iu koto desu. = something people say; it may or may not be Tanaka who said it
~Tanaka-san wa Osaka ni iku to iu no desu. = suggests that Tanaka said this; but it could be somebody else, all depending on context
So you see, Japanese isn't as easy as abc.