That assembly does not allow partially trusted callers in SSRS 2008

I m facing this Error while Run the Report in Browser…

An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset ‘Dataset1’. (rsErrorExecutingCommand)
Exception has been thrown by the target of an invocation.
That assembly does not allow partially trusted callers.

I used the code in the following link

sunilmanur.blogspot.in/…/how-to-call-business-logic-using-net.html

Thanks in Advance

It seems that you’re trying to load a strongly-named assembly which isn’t decorated with AllowPartiallyTrustedCallersAttribute attribute. It’s probably one of AX assemblies that you can’t change, so you have to avoid it.

If you just need to call some AX business logic, don’t create a separate assembly and a new Business Connector session. Use a data method instead (see How to: Call Static X++ Methods from a Report Data Method for an example).

Thanks Martin for replied…

This time…,I have used CallStaticClassMethod from the AxaptaWrapper class to call static X++ class methods(Test::getName()) from within a data method…

This time also i m getting error :

An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset ‘TestDs’. (rsErrorExecutingCommand)
Exception has been thrown by the target of an invocation.
Dynamics Adapter CallStaticClassMethod failed.
Error executing code: Test object does not have method ‘getName’. (C)\Classes\Test\getName

The AX Class Method is…,
public static str getName()
{
return “TestName”;
}