Page 1 of 1

Sorting on a formula field

Posted: Wed Jan 05, 2011 10:23 am
by MikeC
I have the following expression that I use to display owner or entity.

{IIF(Parcel.[Entity Name] != string.Empty, Parcel.[Entity Name], Parcel.[First Name] + " " + Parcel.[Last Name])}


I'd like to be able to sort (A-Z) on this field, but since it's an expression in a text field I don't see a way to do it. What's the method to sort based on a text field with an expression in it?

Sorting on a formula field

Posted: Thu Jan 06, 2011 2:19 am
by Ivan
Hello,

You can use almost the same expression in the Sort property of band: use the field name instead of alias, for example:

Code: Select all

IIF(Parcel.EntityName != string.Empty, Parcel.EntityName, Parcel.FirstName + " " + Parcel.LastName)
Thank you.