Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
690
Print Page Number in Report Header
posted

Hi All,

 

I am trying to print page number in Report Header or change the report header content dynamically using an event PrintProgress. I have following code inside that event:-

 

 

 

((Report)sender).PageHeader = e.CurrentPageNumber.ToString();

 

I am getting the right value inside the event for each page. But when i preview the page using DocumentViewer i am not getting the page number at all.

Following is the snippit of my code.

Report reportObj = new Report();

 

EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(xamPresenter);

reportObj.PrintProgress += new EventHandler<Infragistics.Windows.Reporting.Events.PrintProgressEventArgs>(reportObj_PrintProgress);

            reportObj.Sections.Add(section);

xamReportPreview.GeneratePreview(reportObj, false, false);

xamReportPreview.IsContentVisible = true;

DocumentViewer docv = xamReportPreview.DocumentViewer;

 

What am i doing wrong here.

Thanks

miztaken

Parents
No Data
Reply
  • 3520
    Verified Answer
    Offline posted

    Hi miztaken,

    In order to show page numbers you'll need to customize a little the header/ footer of your report. There's a very good example for that in our Feature Browser under "Reporting > Themes and Custom Styles > Customizing the Header and Footer".

    Hope this helps.

Children