SSRS Space Function

The SSRS Space function is a Text function that will add a return to the specified number of spaces and return a new string. For instance, add a space between the first and last names. The syntax of the Space function to return user-given empty spaces as a string is shown below.

=Space(3)

To demonstrate the SSRS Space function, we use the Employee table below, which has 15 records. The image shows the records in the Table report.

Source Table

SSRS Space function Example

For this, let me add a new column to the right side of the LastName column. Next, right-click the textbox under the Space Name and choose the Expression. To understand the report, I suggest you refer to the articles on charts, tables, grouping, and format tables in SSRS.

Choose the expression option

It opens the following expression window to add empty spaces. The SSRS Space function below adds two empty spaces between the First Name and Last Name fields. Here, & the operator will concat/join them.

=Fields!FirstName.Value & Space(2) & Fields!LastName.Value
SSRS Space Function expression to add space in the middle of first and last name

Similarly, let me create one more column to the right of the Occupation and name it as Description. Here, we use the Space function to construct a meaningful line by combining all the text fields separated by a single space.

=Fields!FirstName.Value & Space(1) &
Fields!LastName.Value & Space(1) & "holding" & Space(1) &
Fields!Education.Value & Space(1) & "Working as" & Space(1) &
Fields!Occupation.Value

Please click the preview tab to see the report. For more functions >> Click Here!

SSRS Space Function report preview