1
votes

I'm having an issue trying to concatenate literal text with a numeric field in an expression field in a table. Tried expressions such as :

"Line: " + CStr(=Fields!CLD_line_number.Value)

with CLD_line_number being a numeric value in the dataset. All that ever outputs is the string literal "Line: + (=Fields!CLD_line_number.Value)"

Is there a way to deal with this?

1

1 Answers

6
votes

Your syntax is off. The entire expression needs to start with =, otherwise you don't have an expression. That is why you are seeing output identical to what you typed as your "expression". When you don't start with =, it does not know that you intended for that to be an expression, it thinks you just want exactly what you typed to be displayed, similar to something like Excel. You will also need to remove the = just prior to Fields!CLD_line_number.Value

This should get you what you're looking for:

="Line: " + CStr(Fields!CLD_line_number.Value)