Wednesday 12 May 2010

SSRS Expressions

To Alternate colours for a group:
=iif(RunningValue(Fields!MYFIELD.Value,countdistinct,nothing) mod 2,"silver","white")

To Concatenate a String with a date value:
="Today is the day "+FormatDateTime(fields!MYDATE.Value)

To create a 'Page N of M' Expression:
="Page " & Globals.PageNumber & " of " & Globals.TotalPages

Concatenating a string with a currency value and removing the decimal places
="The current price of bread is : "+cstr(FormatCurrency(Fields!MYFIELD.Value,0))

Switch Expression Example works like a case statement in sql

=SWITCH(Fields!status_code.Value = "OPEN", "chartreuse",
fields!status_code.Value = "OPENA", "chartresuse",
fields!status_code.Value = "OPENC", "chartreuse",
fields!status_code.Value = "CLOSE","Gainsboro",
fields!status_code.Value = "ARCHI","Gainsboro",
TRUE,"yellow")

Keep SSRS (SSRS2016) report manager awake

When running a report for the first time in report manager it takes a while to run, after this initial run reports run fine.  There are a ...