SSRS report - custom page header

mark goldin 706 Reputation points
2021-07-22T11:21:39.237+00:00

I am creating a cover page (first page) by having a subreport on the top of the report body. The subreport has a page break after. Visibility of the subreport is set to hide when a page number is not 1. Right after the subreport I have a rectangle (for page header) which RepeatWith is set to an object below the rectangle. In RB everything works fine, but in PDF first page also works fine - no rectangle, but the second page doesn't have it either. Any idea how to solve my problem?

Thanks

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Joyzhao-MSFT 15,646 Reputation points
    2021-07-23T04:15:04.98+00:00

    Hi @mark goldin
    I did some tests on my local server. I set the rectangle to repeat on every page. But when I export the pdf, the rectangle only appears on the first page and seems to ignore the repeatwith setting. When I exported to word format, the same problem occurred. This is a fact that cannot be changed.

    However, there is a way to add a custom header. The premise is that you have a Table or Matrix in the report.

    1. At first, fix the title of the Table and repeat it on each page. Please refer to this step: Display Row and Column Headers on Multiple Pages (Report Builder and SSRS).
    2. Then you add a row above the title. Combine the row with cells, and then you insert a rectangle or any content you want in the cell, and the content will be displayed together with the title on each page repeatedly.
    3. Export report to Pdf format.

    For a clearer display, I fill the background color with gray. I made everything works fine by using the above method.

    117287-01.jpg

    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.