Help with data table - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Help with data table

I'm using visual studio to create a .rdl need to set up a 'temp' table to handle putting two datasources into one table. The table seems to be set-up correctly as I get an accurate row count from. test is the column name, and I'm filtering the table so that when test = x return the value in the sColumnNm that is in the same row as x. Instead it returns #Error. the Values here are pretty big (can be in the trillions) so I thought it may have been datatype related, so I switched to Double, but the problem persists.

Any help would be greatly appreciated.

[code]Public Function GetFocusDetail(ByVal sColumnNm As String, ByVal test As String) As Double
If dtFocusTable Is Nothing Then
Return "N/A"
dtFocusTable.DefaultView.RowFilter = String.Format("custom_group={0}", test)
If dtFocusTable.DefaultView.Count = 0 Then
Return "N/A"
Else If dtFocusTable.DefaultView.Item(0).Item(sColumnNm) is System.DBNull.Value
Return ""
Return dtFocusTable.DefaultView.Item(0).Item(sColumnNm)
End If
End If
End Function

I can post the code that sets up the tables as well if anyone thinks that may be an area of concern.
Sign In or Register to comment.