Hi All,
I am getting the following error in batch job log.
I have duplicated Tutorial_RunbaseBatch class and write a business logic to run SSRS report through X++ code and the same set as batch process when I doing this I am getting error in batch job log.
System.InvalidCastException: Unable to cast object of type 'Dynamics.Ax.Application.SrsReportRunController' to type 'Dynamics.Ax.Application.PSAProjAndContractInvoiceController'.
at Dynamics.Ax.Application.ProjInvoiceReport.Run() in ProjInvoiceReport.run.xpp:line 11
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13
at BatchRun::runJobStatic(Object[] )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at BatchIL.taskThreadEntry(Object threadArg)
Can you please suggest the solution.