Hello Epi gurus,
Trying to upload SSRS report thru Epicor , Report style but I get the following error when doing so. Please help. Also I had to add a reference to System.Core
Dim values As New System.Collections.Generic.Dictionary(Of Decimal, Decimal)
Function AddValue(newValue As Decimal) As Decimal
If Not values.ContainsKey(newValue) Then
values.Add(newValue,newValue)
Else
values.item(newValue) = newValue
End If
End FunctionFunction GetMedian() As Double
Dim count As Integer = values.Count
If count = 0 Then
Return 0
Else
dim keys as New System.Collections.Generic.List(Of Decimal) = System.Linq.Enumerable.ToList(values.Keys)If count Mod 2 = 1 Then
Return keys(CInt((count / 2) - 0.5))
Else
Dim index1 As Integer = count \ 2
Dim index2 As Integer = index1 - 1Dim value1, value2 As Decimal
value1 = keys(index1)
value2 = keys(index2)Return (value1 + value2) / 2
End If
End If
End Function
Application Error
Exception caught in: Epicor.ServiceModel
Error Detail
Message: There is an error on line 15 of custom code: [BC30311] Value of type ‘System.Collections.Generic.List(Of TKey)’ cannot be converted to ‘System.Collections.Generic.List(Of Decimal)’.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException
Client Stack Trace
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet dataSets)
at Ice.Proxy.BO.ReportImpl.ImportSsrsReports(DataSet reports)
at Erp.UI.App.ReportEntry.SsrsTransfer.UploadReports(String clientDirectory, String reportLocations)
at Erp.UI.App.ReportEntry.ReportForm.UploadSsrsReport()
at Erp.UI.App.ReportEntry.ReportForm.OnClickMiscTool(String ToolKey)
at Ice.Lib.Framework.EpiBaseForm.handleToolClick(String tKey, ToolClickEventArgs ea)