Saturday, February 25, 2012

Report Headers vs Page Headers

Hi, this is probably a simple question but I just can't figure it out. I'm using SQL Server Reporting Services 2005 sp1.

I'm trying to design a report that displays a particular embedded image on the first page, and then a different one on every subsequent page. I.e full, fancy company logo on the first page, and a trimmed down version on every other. In Crystal, I would have simply used the Report Header and Page Header sections to achieve this - easy.

However, in SQL Reporting Services, there is only a Page Header section - therefore whatever I place in the Page Header shows on every page. Now, I know how to stop it displaying on the first page, but I don't know how to display the other image instead.

I read in a support forum that it is possible to do this by "placing report items above or below your data regions" but I can't get it to work.

Grateful for any assistance.

Matt

Hello Matt,

Here's what I did to accomplish this task.

In your 'Page Header' section, place your trimmed down image (you want to display on all pages but the first), and set the PrintOnFirstPage property to False. Then, in the 'Body' section, move everything down enough to place your fancy company image at the top. Now, your fancy logo will show on the first page and none after, and your trimmed image will display on all other pages.

Hope this helps.

Jarret

|||

Hello Jarret,

Thanks very much, that was helpful. I think I'm nearly there - one last Q though! Now that the Page Header is set not to print on the first page it leaves a white blank space where it will appear on the other pages. Therefore, the image placed in the 'Body' section appears about 1/3 of the way down the first page. Do you know any way to make it appear at the top - at the same level as the Page Header one?

Thanks again

Matt

|||

Here’s another way you could do this:

Remove all the images you created earlier

Change PrintOnFirstPage back to true for the Page Header

In the BackgroudImage.Value property of the Page Header, type this: =IIf(Globals!PageNumber = 1, "Link to image that should show on Page 1", "Link to image that should show on the rest of the pages")

Resize your Page Header section to fit the images.

Unless your fancy and trimmed images are the same height, there will be blank space below the shorter of the two.Since you can’t dynamically change the size of a section, I think that’s as good as you’re going to get.

Hope this helps.

Jarret

|||Thanks - I'll give that a try. SSRS is great, but there are some features which Crystal has had for years which it is sadly lacking |||I'm having the same issue. I've found questions about this dating back to July of 2004, but no answers. Is it simply impossible to make a Page Header not print (and not take up space) on the first page?

No comments:

Post a Comment