How to Make a Cover Page in SSRS

Home > Blogs > SQL Server > How to Make a Cover Page in SSRS

How to Make a Cover Page in SSRS

Like This Blog 5 Peter Avila
Added by February 17, 2014

A cover page is simply a page that comes before the report data and that usually contains a report title and other identifying information. It can add clarity to your report and give it a clean, professional look.

The cover page usually doesn’t show any data or page numbers, and the first page of data usually displays as page 1.

001-How-to-Make-a-Cover-Page-for-YourSQL-Server-SSRS-Report

Cover pages can be made pretty easily in SSRS. Here’s how it works: Everything you want in your cover page will go into a rectangle that includes a page break after it to separate the cover page from the rest of the report (this ability to do page breaks is the reason we use a rectangle). The rectangle can either go directly into the report header, or it can go into a subreport that in turn goes into the report header.

The advantage of using a subreport is that the cover page doesn’t clutter your report and you don’t have to always negotiate your way around the cover page every time you want to edit your report. The demonstration in this article will show you how to create a cover page using a subreport.

I’m using SQL Server Data Tools 2010 (Visual Studio 2010 + MS BI Libraries) in this demonstration, but you can use Report Builder or other tools that create SSRS rdl files. Actual steps may vary from the ones shown here, though they should be similar.

Create a new report with a rectangle

First, we’ll create a report that will be the actual cover page when it is used as a subreport in the main report. In the same project containing the main report, create a new, blank report called CoverPage that has a single rectangle in it and nothing else.

002-drag-drop-Cover-Page-for-YourSQL-Server-SSRS-Report

Open the rectangle’s properties window (right-click on the rectangle and select Rectangle Properties…) and select Add a page break after. This will cause the rectangle to end in a page break, separating the cover page from the rest of the report.

003-drag-drop-Cover-Page-for-YourSQL-Server-SSRS-Report

Now you can position the rectangle, change its dimensions, and otherwise format it to look like the cover page you need. Put everything you want on your cover page into the rectangle—textboxes for text, images, lines, even data regions if you need to.

004-format-Cover-Page-for-YourSQL-Server-SSRS-Report

That’s it for the CoverPage report. We can save it and close it.

We’re ready to put it into the main report.

Create the subreport

Open the main report and drag & drop the CoverPage report into the report header (to make a report header, just drag the data region down a bit; the space above it is the report header). The subreport will appear as a gray box with the name of the report it contains—in our case, CoverPage. At first, it will probably overlap your data region and look a little messy. Also notice that the height of the main report increases to accommodate the subreport we just dropped in it. We’ll fix all this in the next step.

005-drag-drop-format-Cover-Page-for-YourSQL-Server-SSRS-Report

To avoid pagination issues, adjust the subreport so that it is up against the top of the report header, as wide as the CoverPage report it contains, and short enough so that it doesn’t overlap the data region. We’ll also need to drag the dotted line at the top of the page footer up a bit to remove some of that white space between the data region and the page footer.

006-ajdust--format-Cover-Page-for-YourSQL-Server-SSRS-Report

Preview the report to see the cover page (Print Layout view is best). Verify that page 1 is the cover page and that your report data starts on page 2.

007-priny-layout-view-Cover-Page-for-YourSQL-Server-SSRS-Report

This looks good, but notice that there is a page number on the cover page; we want to suppress that. Also, the second page of the report shows page number 2; we want that to print as page 1 and the successive pages to print as 2, 3, and so on.

008-How-to-Make-a-Cover-Page-for-YourSQL-Server-SSRS-Report

Let’s fix these problems. First, let’s suppress the page number on the cover page. Right-click in the page footer and select Footer Properties

009-footer-properties-How-to-Make-a-Cover-Page-for-YourSQL-Server-SSRS-Report

In the Page Footer Properties window, uncheck the Print on first page checkbox and click the OK button.

010-footer-properties-How-to-Make-a-Cover-Page-for-YourSQL-Server-SSRS-Report

Next, we’ll adjust the actual numbers so that the first data page displays as page 1. Right-click the textbox containing the page number and select Expression…. Subtract from the page number the number of pages in the cover page. This is usually 1, and it is 1 in our example.

011-footer-properties-How-to-Make-a-Cover-Page-for-YourSQL-Server-SSRS-Report

Preview the report again and notice that now there is no page number shown on the cover page, the page number shown on page 2 is 1, and successive pages show correct page numbers.

And that’s it! Enjoy!

 
Peter Avila
SQL Server Instructor – Interface Technical Training
Phoenix, AZ

Videos You May Like

Agile Methodology in Project Management

0 153 0

In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management

JavaScript for C# Developers – September 24, 2014

0 487 3

Is JavaScript worth taking the time to learn if I’m a server-side .NET developer? How much of C# carries over to JavaScript? In this recorded video from Dan Wahlin’s webinar on September 24,2014, Dan answers these questions and more while also discussing similarities between the languages, key differences, and the future of JavaScript (ES6). If … Continue reading JavaScript for C# Developers – September 24, 2014

Detailed Forensic Investigation of Malware Infections – April 21, 2015

4 602 5

How does an investigator hunt down and identify unknown malware? In this recording of our IT Security training webinar on April 21, 2015, Security expert Mike Danseglio (CISSP / CEH) performed several malware investigations on infected computers and identify symptoms, find root cause, and follow the leads to determine what’s happening. He demonstrated his preferred … Continue reading Detailed Forensic Investigation of Malware Infections – April 21, 2015

Write a Comment

See what people are saying...

  1. Avatar em

    I may be wrong, but is this current for SQL2014? Because it is impossible to enter a subreport on the Header.

    Can it be done for SQL 2014?

    Thanks

  2. Avatar jack

    Ah – found it!
    Toolbox
    Subreport
    🙂

  3. Avatar jack

    All was going well until I got to the bit about drag and drop the cover page into the main report header – it doesn’t want to play, possibly because I’m using Visual Studio 2013.

    Is there another way of doing it?

  4. Avatar Bobby Jose

    When you place the subreport on the header of the first page, doesnt the report appear for every alternate page. Because when we place a logo in the header, its supposed to repeat for all pages, right ?

    I have a 40 page report which has logo headers and few captions. Now I need to add a cover page for this report, which doesnt need to have any of the logos. So i can create a sub report and place in the header above the logo, which changes the layout.

    Am i missing something ?

  5. Avatar Anonym

    Thank u for your share, it’s really help me

Share your thoughts...

Please fill out the comment form below to post a reply.