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
260
How to add report header when exporting WebHierarchicalDataGrid
posted

Hi,

 

I have a WebHierarchicalDataGrid in page, and I need export its content to a pdf file. When exporting to file, I need add a custom report header in pdf file.

I am using the following codes.

Report report = new Report();

ISection gridSection = report.AddSection();

IText headerText = gridSection.AddText();

headerText.AddContent("Header Content");

headerText.AddLineBreak();

headerText.AddContent("Report Date: " + DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt"));

headerText.AddLineBreak();

headerText.AddLineBreak();

exporter.Export(WebHierarchicalDataGrid1, report);

 

But the result is the report header in the first page, and the content of WebHierarchicalDataGrid in the next page. In fact, I want the content of WebHierarchicalDataGrid is at the following of header.

How should I do?

 

Thank you.