Step By Step SSRS in 11 Hours: Hour 5

Step By Step SSRS in 11 Hours: Hour 5

Introduction

This article shows how to create a custom template inside the report.

Contents

Custom Template in SSRS Report

Step 1

  • Right-click on "Reports", select "Add" and click on "New Item".

image.png

Step 2

  • Select "Report Project" from the left panel and select "Report".
  • Provide an appropriate name to the RDL.
  • Press the "Add" button.

image.png

Step 3

  • The RDL file is created and we have the design surface to design the report.

image.png

Step 4

  • Right-click on the design surface then select "Insert" and click on "Page Header".

image.png

Step 5

  • Right-click on the design surface then select "Insert" and click on "Page Footer".

image.png

Step 6

  • The page header and page footer is created in the RDL file.

image.png

Step 7

  • Right-click on the header portion and select "Header Properties" to design the header.

image.png

Step 8

  • In the same way right-click on the footer portion and select "Footer Properties" to design the footer.

image.png

Step 9

  • In general properties we have the option to print on the first page and / or the last page. Also we can set the height of the header or footer.

*Print on the first page.

Step 10

  • In the fill properties we can set the background color or set the background image.

image.png

Step 11

  • We can also select the border style, width and color using the border properties.

image.png

Step 12

  • We can use built-in-fields for the header and footer, like the page name, page number and so on.

image.png

Step 13

  • Here in our example we set Grey as the background color in the header and footer.
  • We set the execution time and page number from the built-in fields for the footer.

image.png

Step 14

  • Our custom template is ready, now we need to save it.
  • Click on "File" >> "Save MyCustomTemplate.rdl As".

image.png

Step 15

  • Provide an appropriate name and save it on the following path.

image.png

Step 16

  • Now let's design a report using the created template.
  • Right-click on "Reports", select "Add" and click on "New Item".

image.png

Step 17

  • Select "Report Project" from the left panel.
  • Select "MyCustomTemplate" rather than "Report" to implement the template.
  • Provide an appropriate name to the report.

image.png

Step 18

  • Now you can see, our custom template is automatically added to the report design surface.

image.png

Next >> Hour 6: Drill down report