Dynamics Ax report mail subscription error

I created a Dynamics Ax report. In this report some axapta static functions are called.

When I run the report in browser it shows data normal.

I created for this report email subscription(Setted the execution account).In the email is attached the report in pdf format, but for textboxes where it has to show data with results from axapta functions it shows “#Error”. Running the report from link attached in mail shows data normal(Without"#Error").

What can be the solution for this problem?

The error from Event viewer: “The complete data cache has been flushed to request from session 13”.