Monday, 23 February 2015

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
Step 1
  • Right-click on "Reports", select "Add" and click on "New Item".

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

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

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

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

    Page Footer
Step 6
  • The page header and page footer is created in the RDL file.

    created in rdl file
Step 7
  • Right-click on the header portion and select "Header Properties" to design the header.

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

    Footer Properties
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.

    set background image
Step 11
  • We can also select the border style, width and color using the border properties.

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

    page number
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.

    fields for the footer
Step 14
  • Our custom template is ready, now we need to save it.
  • Click on "File" >> "Save MyCustomTemplate.rdl As".

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

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

    created template
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.

    Provide appropriate name
Step 18
  • Now you can see, our custom template is automatically added to the report design surface.

    custom template

No comments:

Post a Comment