Hi @Krzysztof M
According to my searches, the "Out of memory" error is an error that occurs when the system does not have enough memory to complete the requested operation.
You can resolve the issue by configuring a reasonable memory management strategy for the report server application.
Also try adding enough physical memory to the report server, or upgrade to a 64-bit version of Microsoft SQL Server Reporting Services, or run the report at a time when the memory limit is lower.
For more details, you can refer to this link: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/93f82018-daa3-4703-8d69-c2e2389d17fc/systemoutofmemoryexception-for-ssrs?forum=sqlreportingservices.
Best regards,
Aniya