ImGoingToSqlBits150

My Twitter

twitstamp.com

The DatePart() Function in SSRS

Using the DatePart() Function in SSRS can be tricky, even at the best of times. I have pulled my hair out too often trying to remember what syntax should be used, so have resorted to writing down all my findings. This is so that you don’t have to go through the same agony & frustration [...]

The JOIN() Function in SSRS

BOL’s description of the JOIN() Function: “Returns a string created by joining a number of substrings contained in an array.”. The syntax of the function is as follows:
=JOIN(List [,delimiter])

List – Required. One-dimensional array containing substrings to be joined
Delimiter – Optional. String character used to separate substrings. If omitted, a space “ “ will be [...]

The CHOOSE() Function in SSRS

BOL’s description of the CHOOSE() Function: “Selects and returns a value from a list or arguments”. The syntax of the function is as follows:
=CHOOSE(index, expression_1 [, expression_2] [, expression_3] [, expression_4] …[, expression_n])
So, the Choose() function uses an Index (of type Double) to ‘choose’ one of a list of supplied values/expressions. For example;
=CHOOSE(Index, “Red”, “Yellow”, [...]

The DateAdd() Function in SSRS

Getting acquainted
The DateAdd() function. According to BOL this “Returns a date to which a specified time interval has been added”. The structure of the function is as follows:
DateAdd(interval, number, date)
It’s a Date!
Like most first dates, getting to grips with this function and understanding its ‘needs’ is a tricky process. Initially, you may have attempted to [...]

The InScope() Function and the key to formatting subtotals in SSRS Matrix Objects

What it does
The InScope(<named-scope>) function checks to see if the current item is in the specified scope.
Example – So for the simple matrix report in Fig 1.:

The Green cells fall out-of-scope of the ColumnGroup, and In-Scope for the RowGroup
The Grey cells fall out-of-scope of the RowGroup, and In-Scope for the ColumnGroup
The Light blue [...]