I am using Ax2012 and I am getting error when trying to run Morphx report using batch process. I am getting error in Line 16 as shown below:
//////////////////////////////////////
4filename =
strfmt("%1%2",“ABc”,".pdf");
report =
new ReportRun(new Args(ReportStr(ReportName))); //Line 16
report.query().interactive(
false);
report.report().interactive(
false);
report.args().caller(
null);
//report.args().parm(SalesQuotation.QuotationId);
report.printJobSettings().setTarget(PrintMedium::File);
//Print into a file
report.printJobSettings().format(PrintFormat::PDF);
//file format = pdf
report.printJobSettings().warnIfFileExists(
false);
report.printJobSettings().fileName(
strfmt("%1%2",path,filename));
report.run();
NOw my error is : Line 1 :“Object ‘ReportRun’ could not be created”
and Line 2: "Microsoft.Dynamics.Ax.Xpp.InternalException: Exception of type ‘Microsoft.Dynamics.Ax.Xpp.InternalException’ was thrown.
at Microsoft.Dynamics.Ax.MSIL.cqlClassIL.create(Int32 classId, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes, Object ILObject)
at Microsoft.Dynamics.Ax.Xpp.XppObjectBase.createKernelClass(Object[] parameters, Type[] paramTypes, Object[] varargs)
at Dynamics.Ax.Application.ReportRun.new(Object argsOrReportOrContainer)
at Dynamics.Ax.Application.ReportRun…ctor(Object argsOrReportOrContainer)
at Dynamics.Ax.Application.dev_IRDETOBP_SuspActivation.Run() in dev_IRDETOBP_SuspActivation.run.xpp:line 16
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 50
at BatchRun::runJobStatic(Object[] )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at BatchIL.taskThreadEntry(Object threadArg)"
////////////////////////////////////////////////////////////
please reply asap.