Patch that solves problems when tries preview the report on 64 bit systems. A EAccessViolation exception is raised when you try preview the report.
Maybe this don't solves all problems related with 64 bits systems, but now I can at least preview the report.
Others cast from pointer->Integer->Pointer (example: using the Tag property) must be replaced by a cast pointer->PtrInt->pointer, because the type PtrInt is size variable, that depends of the platform used (32 or 64 bits).
I resolved with a different approach (don't use tag at all since is not safe)
I though about doing this, but Tag property in Lazarus is of type PtrInt (that can be 32 bits or 64 bits sized, depending of your CPU target), so I fixed it to continue using the tag property.
Thanks!