Xtraction Error: System.OverflowException: Value was either too large or too small for a Decimal.
search cancel

Xtraction Error: System.OverflowException: Value was either too large or too small for a Decimal.

book

Article ID: 4694

calendar_today

Updated On:

Products

SUPPORT AUTOMATION- SERVER CA Service Desk Manager - Unified Self Service CA Service Desk Manager CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

When creating a Calculated Series in Xtraction for Time Component, Group Component, etc, the system could show the following message:

 

"System.OverflowException: Value was either too large or too small for a Decimal"

 

In addition, at Xtraction logs, you could see messages similar to below:

 

Machine User Id : NT AUTHORITY\NETWORK SERVICE

System.OverflowException: Value was either too large or too small for a Decimal.

   at System.Decimal..ctor(Double value)

   at System.Double.System.IConvertible.ToDecimal(IFormatProvider provider)

   at System.Convert.ToDecimal(Object value)

   at 0.j.1(IndexedDataTable , TimeComponent )

   at 0.j.0(IndexedDataTable , TimeComponent )

   at 0.j.0(TimeComponent )

   at 0.j.GetDataXml(TimeComponent component)

   at SqlDataEngine.Services.Components.TimeComponentService.GetDataXml(TimeComponent component)

   at Xtraction.Web.Services.SqlDataEngineWebService.GetTimeComponentData(TimeComponent component)

 

Environment

Service Desk Manager - ANY VERSIONXtraction - ANY VERSION

Cause

This kind of error occurs when you try to divide by zero, which can occur when using a Calculated Series.

 

 

Resolution

You can wrap the expression for the Calculated Series in an IF statement to avoid this occurring, for example instead of:

 

([S2]/[S1])*100) 

 

Use the following to return 0 where the first series (referenced as S1) is 0: 

 

if([S1]=0,100,([S2]/[S1])*100) 

 

Another example:

 

<Please see attached file for image>

src="/servlet/servlet.FileDownload?file=0150c000004AKR0AAO" alt="expressao01.png" width="504" height="394">

 

[S2] * 100 / ([S1] + [S2]) 

 

 

In this case you should be considering when ([S1] + [S2]) could result as zero value.

 

 

Additional Information

Please also review Xtraction community link:

Error :System.OverflowException: Value was either too large or too small for a Decimal.

Other related document:

TEC1451495

Attachments

1558699932879000004694_sktwi1f5rjvs16ov4.png get_app