3
Answers

String.format expression in C#

sammi taylor

sammi taylor

10y
1.6k
1
Ist expression works for Person Address in string format in my report field, but if there is no Person address, then pull from Location address:
String.Format("{0}, {1}  {2}",
 Fields!PersonCity.Value,
 Fields!PersonStateCode.Value,
 Fields!PersonZipCode.Value)
 
//Modified to add Location address:
String.Format("{0}, {1}  {2}",
 Fields!PersonCity.Value,
 Fields!PersonStateCode.Value,
 Fields!PersonZipCode.Value), IIF(IsNothing(Fields!LocationCity.Value,
 Fields!LocationStateCode.Value,
 Fields!LocationZipCode.Value))
 
I get BC302015 end of statement expected error.
Answers (3)