Skip to content

Instantly share code, notes, and snippets.

@lukeawyatt
Last active January 8, 2021 20:25
Show Gist options
  • Save lukeawyatt/729740ab6a007da9ae96de6e2801bc26 to your computer and use it in GitHub Desktop.
Save lukeawyatt/729740ab6a007da9ae96de6e2801bc26 to your computer and use it in GitHub Desktop.
Application: SSRS
/* Interactive Sorting Descending by Numeric */
=Fields!NumericFieldToSortBy.Value * -1
/* Interactive Sorting Descending by Date */
=DATEDIFF("d",Fields!DateFieldToSortBy.Value,Today())
/* Interactive Sorting Descending by String */
=CLNG(CSTR(ASC(UCASE(LEFT(CSTR(Fields!LastName.Value) + "@",1))))
+ CSTR(ASC(UCASE(MID(LEFT(CSTR(Fields!LastName.Value) + "@@",2),2,1))))
+ CSTR(ASC(UCASE(MID(LEFT(CSTR(Fields!LastName.Value) + "@@@",3),3,1))))
+ CSTR(ASC(UCASE(MID(LEFT(CSTR(Fields!LastName.Value) + "@@@@",4),4,1))))
+ CSTR(ASC(UCASE(MID(LEFT(CSTR(Fields!LastName.Value) + "@@@@@",5),5,1))))
) * -1
=IIf(RowNumber(Nothing) MOD 2, "White", "WhiteSmoke")
=IIf((Fields!FieldName.Value=""), "Blank Value", (IIf((IsNothing(Fields!FieldName.Value)), "Null Value", "Good Value")))
=IIf((Fields!FieldName.Value = Previous(Fields!FieldName.Value)), "Match", "No Match")
=IIf(BOTTOM = 0, 0, TOP / IIf(BOTTOM = 0, 1, BOTTOM))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment