I've got a function in custom code called for every line in a table that uses a case statement to return various values.
In some cases, a calculation is required. In other cases, a return of a value from another dataset is all that's.
Assuming the function is called from a field in a table linked to Dataset B, is there a way to reference a member of Datset A from within the code?
With the simplified function below (calculations are omitted for brevity), I get a build error "Reference to a non-shared member requires an object reference. I'm trying to figure out how to express the object reference (if possible).
Example:
Public Function GetValueForLine(RowName as String) as String
Select Case LCase(RowName)
Case "start date"
Return Fields!RptHdrData.start_date.Value
Case "end date"
Return Fields!RptHdrData.end_date.Value
Case "currency"
Return Fields!RptHdrData.currency_code.Value
Case Else
Return "Unknown"
End Select
End Function
In some cases, a calculation is required. In other cases, a return of a value from another dataset is all that's.
Assuming the function is called from a field in a table linked to Dataset B, is there a way to reference a member of Datset A from within the code?
With the simplified function below (calculations are omitted for brevity), I get a build error "Reference to a non-shared member requires an object reference. I'm trying to figure out how to express the object reference (if possible).
Example:
Public Function GetValueForLine(RowName as String) as String
Select Case LCase(RowName)
Case "start date"
Return Fields!RptHdrData.start_date.Value
Case "end date"
Return Fields!RptHdrData.end_date.Value
Case "currency"
Return Fields!RptHdrData.currency_code.Value
Case Else
Return "Unknown"
End Select
End Function