Sorting with Two Fields

  • I created a sorting expression with four options. Here's the expression:

    =IIF(Parameters!SortBy.Value = "A", Fields!CONTACT_ALPHA.Value,

    IIF(Parameters!SortBy.Value = "N", Fields!CONTACT_NAME_ID.Value,

    IIF(Parameters!SortBy.Value = "P", Fields!PLAN_CLASS.Value,

    IIF(Parameters!SortBy.Value = "C", Fields!CLAIM_NUMBER.Value,

    ""))))

    However, for the last two options, these options should be sorted by two fields. For example, option P should be sorted by Plan Class and then by Name. Cant get the right syntax for this. Any assistance. I thought I could do teh following, but I was wrong. Thanks all:

    IIF(Parameters!SortBy.Value = "P", Fields!PLAN_CLASS.Value + Fields!Name.Value

  • Can you add a second expression and use the first value again, or a null value, for the first rules, and the second value in the ones that need it?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply