locked
Error on Reporting RRS feed

  • Question

  • User-1194682766 posted

    Hi all,

    Has anyone found this error: - when I try to pull any of the reports (by resource or project) - it throws the error below.

    Is it a data corruption issue or a code issue?

     

    Thanks!

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.FormatException: Input string was not in a correct format.

    Source Error:

    Line 305:
    Line 306:            For Each str As String In substrings
    Line 307:                Dim Id As Integer = CInt(str)
    Line 308:                Dim tempList As List(Of String) = Project.GetProjectMembers(Id)
    Line 309:                For Each userName As String In tempList

    Wednesday, December 7, 2005 8:30 PM

All replies

  • User-1540313483 posted
    check the value of str
    Thursday, December 8, 2005 1:00 PM
  • User-1221645631 posted

    but the value isn't what's erroring, it looks like it's the data type. the value is stored in the db as int, but called and transformed to str? um...why? Last time I checked the screen output of displaying an int vs a string wasn't that big of a deal.

    There are some other threads that discussed this problem for the beta version of this starter kit. So far they haven't pointed me in the direction of a fix, but they sure are a lot more helpful than the first response in this thread was.

    Sunday, December 11, 2005 3:05 AM
  • User181581147 posted

    Heres a fix to that problem,

    replace

    For Each str As String In substrings

    Dim id As Integer = CInt(str)

    list.Add(Project.GetProjectById(id))

    Next str

    with

    Dim i As Integer

    For i = 0 To substrings.Length - 2

    Dim id As Integer = CInt(substrings.GetValue(i))

    list.Add(Project.GetProjectById(id))

    Next

     

    Monday, January 16, 2006 5:49 AM