This is a migrated thread and some comments may be shown as answers.

change header image at run time

3 Answers 232 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Peter Williams
Top achievements
Rank 1
Peter Williams asked on 14 May 2008, 02:00 PM
Hi,
    I have a report in which I need to have a first page header image different than the second page header when exported into pdf.  Also, in html my reports are all on one long page so I don't get to see the second page at all even though I have multiple pages, one for each case # report.  Once it is exported into pdf, paging automatically space out each case # report into multiple pages which is when I need the first page of each report to have the company logo image, and subsequent page headers to be only the case # of the report.  Is there any method or event that tells me the report is rendering on the first page or the second page and beyond?  The page count and page number are for the whole report which I have multiple case # reports in it; is there some way that I can get the page count and page number for each case report? Can you show me some pointers or hints on how to get this done.  
    In summary, I need help on the following:
  1. How to display different header images on second page of the report
  2. Is there any method or event that tells me the report is rendering on the first page or the second page and beyond? 
  3. Is there some way that I can get the page count and page number for each case report? 
Thanks.

3 Answers, 1 is accepted

Sort by
0
Milen | Product Manager @DX
Telerik team
answered on 15 May 2008, 01:14 PM
Hello Peter Williams,

Thank you for contacting Telerik Reporting support again.

There is a way to customize the look of your report so that the page header on first page is different than on the other pages.
Here is a quote from the forum post Page Header Problem, that will help you to easy achieve your requirements:

That is a standard case. What you should do is add the headers to both the ReportHeader and PageHeader and align them properly, and then set the PageHeader's PrintOnFirstPage to false. In this way, you will have the headers on every page. On the first one they will come from the ReportHeader and on all the other pages they will come from the PageHeader.

If you want, you can try to create a new report with the New Report Wizard. When you reach the Layout page, choose a "Stepped Layout" and the wizard will create the report that I described above...


PageNumber and PageCount are only accessible in the PageHeader/Footer sections, and this is by design determined by the way the report is processed and after that rendered. Please review Report Life Cycle help article for more information.

So if you need even more customization of the page section based on the current page, you can achieve it using expressions or user defined function checking the PageNumber or PageCount.

I hope this information is helpful. Let us know if further help is needed.

All the best,
Milen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Peet
Top achievements
Rank 1
answered on 02 May 2012, 09:40 PM
Hello There,

On the quote above, I had a question. I would appreciate, if i can get some help.

When I add both Reportheader and PageHeader to a report's first page and set the PageHeader's PrintOnFirstPage to false, on the first page, the header came from the ReportHeader. But, it did not take the spacing for the PageHeader above it. Is there anyway to hide that white space as the pageheader is not being displayed on the first page.

Thanks

Peet
0
Steve
Telerik team
answered on 03 May 2012, 09:37 AM
Hello Peet,

Page sections are not related to the report itself, but are relative to the margins of the report's media, i.e. to the paper or screen, so their size is constant and the behavior you observe is correct.

Kind regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Peter Williams
Top achievements
Rank 1
Answers by
Milen | Product Manager @DX
Telerik team
Peet
Top achievements
Rank 1
Steve
Telerik team
Share this question
or