Add Rectangle to SSRS Report

In this article, we will show you how to add Rectangle to SSRS Report. It is one of the most useful Report Items while you are designing a report because you can use this Rectangle to combine Images, Text Boxes, and Charts in one place.

So, here we will show you the step by step approach to add Rectangle to the SSRS Report with an example.

To explain the same, We are going to use the below-shown DataSet. Please refer to the Embedded Data Source and Dataset articles to understand the steps involved in creating the Embedded Data Source and Dataset that we used for this SSRS report.

and the Custom SQL query that we used in the above Dataset is shown below. Please type the above code inside the SSMS to see the data written by the below query.

-- Displaying Rectangle on SSRS Report
USE [AdventureWorksDW2014]
GO
SELECT [FirstName] + ' ' + [LastName] AS [FullName]
      ,[EmailAddress]
      ,[Gender]
      ,[Title]
      ,SUM(FACT.SalesAmount) AS SalesAmount
      ,SUM(FACT.TotalProductCost) AS ProductCost
      ,[EmployeePhoto]
  FROM [DimEmployee] AS EMP
  INNER JOIN [FactResellerSales] AS FACT ON
  EMP.EmployeeKey = FACT.EmployeeKey
  GROUP BY [FirstName]
      ,[LastName]
      ,[EmailAddress]
      ,[Gender]
      ,[Title]
      ,[EmployeePhoto]

Add Rectangle to SSRS Report

To demonstrate the steps involved in adding Rectangle to the SSRS Report, We are going to use the previously generated report that we have shown below. Please refer to the Create a New Report, and Add headers and Footer article for adding Page headers and footers.

Basic Report 2

For demonstration purposes, we will add a Rectangle inside the SSRS report area. To do so, right-click on the report area, select the Insert, and then the Rectangle option.

Insert Rectangle in. to a report 3

Once you select the Rectangle option from the context menu, a new Rectangle will add to the report area.

Add Rectangle to a Report 4

You can use your mouse to increase or decrease the width and height of a Rectangle.

For the demo purpose, we will add a Textbox inside the Rectangle area. To do so, right-click on the Rectangle, select the Insert, and then the Text Box option.

Add Rectangle to a Report 6

Let me add some text to the text box, and then we are adding the Image to the Rectangle. I suggest you refer to the Display Image article to understand the steps involved in adding an image to a report.

Add Rectangle to a Report 7

Within the SSRS Report preview, you can see the Text that we entered in the textBox and the Image

Add Rectangle to a Report 8

Rectangle Properties: Right-click on the rectangle will open the context menu. Please select the Rectangle Properties.. option from it to alter the existing properties of a rectangle.

Rectangle Properties 9

Once you select the Rectangle Properties.. option, a new window called Rectangle Properties will open. Under the general tab, you can change the name of the rectangle, or you can add the page breaks too.

change Rectangle name 10

Visibility: Use this tab to decide whether you want to show the rectangle to the user, or not.

Show or Hide Add Rectangle in a Report 11

Under the Fill tab, we can change the background color of a rectangle. Let me change the Background color to Turquoise

Add Rectangle Background Color in a report 12

We have an option to use the External Image as the background of a rectangle.

We already explained the steps involved in adding an image to the Report, or ra ectangle in the Display Image article, so please refer to it.

Insert Image inside a Rectangle of a report 13

You can use the Border tab to change the Border style, Color, Type, width, and pattern. For the demo purpose, we changed the Presents from None to Outline, Style to Solid, Width to 2pt, and Color to Brown

Format Rectangle borders in a Report 14

Click the OK button to close the properties window. Please adjust the Report Items (align) so that they will display in one line

Add Rectangle to a Report 15

As you can see, our Rectangle is filled with the Turquoise color and surrounded by the Borders color that we specified.

Add Rectangle to SSRS Report 16