Q:

Telerik Report Error Handling

So what I'm doing is creating a report from multiple data sources (stored procedures) in vb.net. I am accomplishing this by putting them into a Dataset and passing it to the report.
So when i get to the report i end up with an iif statement to handle multiple fields that aren't consistently named across the stored procedures (I cannot change the names) but need to go into the same text box. Here's an example:
=IIF(Fields.TableName <> '', Fields.TableName, IIF(Fields.usuTableName <> '', Fields.usuTableName, NULL))
As you can see, they are both the same, but named differently thus there scare of the overriding the other. Only one will be populated. However, The problem is if one of those field values don't exists... I.E. Fields.usuTableName
Say for instance we are filtering by date and thus nothing is returned from the stored procedure that has the naming convention of Fields.usuTableName for that date range and thus creates no dataset but the others return values. When the report goes to render we get an error because Fields.usuTableName doesn't exists but Fields.TableName does.

How can i make sure a field name is valid before running the IF statement for it?

A:

Here's the function i used to evaluate it before using it:
    Public Shared Function GetValue(ByVal reportItem As Processing.ReportItem, ByVal field As String) As String
    Try
        Dim testdString As String
        Try
            testdString = reportItem.DataObject(field).ToString
        Catch ex As Exception
            'must not be date
        End Try

        Return reportItem.DataObject(field).ToString

    Catch ex As Exception
        Return ""
    End Try
End Function

I called it for every field name in the report

