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