Error System.OutOfMemoryException when running a 2013 reportr

Hi everyone,

I am trying to run a nav 2013 report and getting the following error:

An error occured during local report processing.
An error has occured during report processing.
Exception of type 'System.OutOfMemoryException' was thrown.

The stange thing is that for the date filter, the report sometimes generates correctly, sometimes throws this error but displays only a part of the data supposed to be rendered, and sometimes throws the eroor with no data displayed at all…

What shall I do?