I’m having the same issue as the above thread. Suddenly, I am unable to print customer statements. It is throwing an error based on one old invoice from 2020, randomly.
Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask:
System.Exception: The error related to invoice 676708 ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)
at Erp.Internal.Lib.StringExtensions.Str2Dec(String str) in C:\_Releases\ERP\RL10.2.600.0\Source\Server\Internal\Lib\Extensions\StringExtensions.cs:line 16
at Erp.Internal.AR.CustomerStatement.AgeInvoice(AgingRptFmt ipAgingRptFmt, InvcHead ipInvcHead, String ipAgeBy, Nullable`1 ipBeginDate) in C:\_Releases\ERP\RL10.2.600.0\Source\Server\Internal\AR\CustomerStatement\CustomerStatement.cs:line 1631
at Erp.Internal.AR.CustomerStatement.DoCustomerCalculations(AgingRptFmt ipAgingRptFmt, String ipAgeBy, Nullable`1 ipBeginDate, Int32 ipCustNum) in C:\_Releases\ERP\RL10.2.600.0\Source\Server\Internal\AR\CustomerStatement\CustomerStatement.cs:line 1939
--- End of inner exception stack trace ---
at Erp.Internal.AR.CustomerStatement.DoCustomerCalculations(AgingRptFmt ipAgingRptFmt, String ipAgeBy, Nullable`1 ipBeginDate, Int32 ipCustNum) in C:\_Releases\ERP\RL10.2.600.0\Source\Server\Internal\AR\CustomerStatement\CustomerStatement.cs:line 1943
at Erp.Internal.AR.CustomerStatement.InternalRunProcess() in C:\_Releases\ERP\RL10.2.600.0\Source\Server\Internal\AR\CustomerStatement\CustomerStatement.cs:line 812
at Ice.Core.TaskBase`1.StartProcess(Int64 instanceTaskNum, String outputFileName) in C:\_Releases\ICE\UD10.2.600.10FW\Source\Server\Internal\Lib\TaskLib\TaskBase\TaskBase.cs:line 83
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:\_Releases\ICE\UD10.2.600.10FW\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 117
at Ice.Hosting.TaskCaller.ExecuteTask() in C:\_Releases\ICE\UD10.2.600.10FW\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 59
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:\_Releases\ICE\UD10.2.600.10FW\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:\_Releases\ICE\UD10.2.600.10FW\Source\Server\Services\Lib\RunTask\RunTask.cs:line 452
I tried running the report in a different environment with an old copy of the database and it threw the same error. I haven’t refreshed that data in probably a year.
Both apps are running on the same application server.
I really don’t want to go down a rabbit hole with Epicor and orphaned records (already tried looking for orphaned records, but nothing jumped out).
Any ideas?
Edit: I was able to generate customer statements if I chose the “Age By Invoice Date” option, but it fails if I choose the Due Date option…