SSRS CallStaticClassMethod with Multiple Parameters.

We have created SSRS, Precision Design AX report .
Scenario 1: (This Works Perfectly fine)
SSRS Data method is calling static class method from AX session passing one parameter.
e.g. dtTestName = (DataTable)axapta.CallStaticClassMethod(“EmplDetailsTest”, “GetDetails”,EmplId);
here EmplDetailsTest is a Class , GetDetails is Method and EmplId is string Parameter.
This is working perfectly fine in both, SSRS preview mode from Visual Studio and AX view after Deployment from Visual Studio.

Scenario 2: (This is the issue)
SSRS Data method is calling static class method from AX session passing two or more parameters.
e.g. dtTestName = (DataTable)axapta.CallStaticClassMethod(“EmplDetailsTest”, “GetDetails”,EmplId, TempText1);
here EmplDetailsTest is a Class , GetDetails is Method and EmplId & TempText1 are string Parameters.

Note: Here we are passing two parameters.

When we run this report in a preview mode from Visual Studio, it runs perfectly and generates output.
But, the same when deployed to AX environment, report first runs asking for inputs for parameters and after clicking on View Report it display the following error:
Error: An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset ‘TestName’. (rsErrorExecutingCommand)
Exception has been thrown by the target of an invocation.
Dynamics Adapter CallStaticClassMethod failed.
Stack trace: The method has been called with an invalid number of parameters. (C)\Classes\EmplDetailsTest\GetDetails

Hi,

Can you tell me what code you have written on Axapta side.

In your class EmplDetailsTest and GetDetails, what is the return type for this method. can you give me the code.

Thanks,

Ambanna

Hai Ganesh…,

I m facing the same issue…

If u know how to resolve this issue…

Plz post the solution for this…

Thanks

I’m having exactly the same error, SSRS works fine at VS end but after deploying to the AX it throws that error i.e "Dynamics Adapter CallStaticClassMethod failed. Stack trace: The method has been called with an invalid number of parameters."