OK so I went into VS and created a little function in vb.net that takes 2 values and divides the first by the second, and yes I tested it:
Public Shared Function calcloadPounds(ByVal loadPounds As Double, ByVal divisions As Double) As Object
If ISNOTHING(divisions) Or divisions = 0 Then
calcloadPounds = "n/a"
ElseIf loadPounds = 0 Then
calcloadPounds = 0
Else
calcloadPounds = loadPounds / divisions
End If
End Function
So I added the code in the report properties custom code box. and in textbox 16 I added this expression:
= code.calcloadPounds(Fields!textbox18.Value,"PickupDate", Fields!textbox44.Value,"TicketNumber")
and of course it generates these errors:
quote:
[rsFieldReference] The Field expression for the data set ‘NonFormEntry’ refers to the field ‘textbox44’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.
[rsFieldReference] The Value expression for the textbox ‘textbox16’ refers to the field ‘textbox18’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.
[rsFieldReference] The Value expression for the textbox ‘textbox16’ refers to the field ‘textbox44’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.
Build complete -- 3 errors, 0 warnings
so what is the sense in using custom code if you still can not reference an object on a different level. Or have I misunderstood how to use it?
But then I tried this, this is the expression in textbox16, which is right next to textbox18 in the same group:
quote:
The Value expression for the textbox ‘textbox16’ refers to the field ‘textbox18’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.
All I want to be able to do is a simple 1st grade division problem and there doesn't seem to be a way to get it. Yellow equals Green divided by Red

Thanks for the help
CoachBarker