Sorting on a formula field

Stimulsoft Reports.NET discussion
Post Reply
MikeC
Posts: 51
Joined: Mon Jun 07, 2010 3:36 pm

Sorting on a formula field

Post 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?
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Sorting on a formula field

Post 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.
Post Reply