Hi Infragistics Team,
we are using infragistics 2015 v1 volume . using webdocumentExporter control. we gat PDF file format Remort .
my question is how to set the Report heading Text ?. & in report Data as Table format . hear attached screen shot . same like that need report data .
Hello Nagarajan,
The closest you can get to the desired behavior is by the answer supplied in the forum thread here: http://es.infragistics.com/community/forums/t/97447.aspx.
In the sample provided by Marina, the footer text is applied on Page Load by doing this:
WebHierarchicalDataGrid1.Rows[0].Items[0].Column.Footer.Text = "This is a footer text";
If we change the Footer property to Header as such:
WebHierarchicalDataGrid1.Rows[0].Items[0].Column.Header.Text = "This is a header text";
This will modify the column's header text which is not what we are looking for unfortunately.
The WebDocumentExporter taking the content of the grid and exports it as a PDF file, therefore, the header/footer text has to be a property of the grid which is currently not supported.
Thanks For Replay,
see the below code : Early used 10.0 version . Now upgrading 2015.v1 volume. for the control Webdocumentexporter , this code not taking latest version . That Event is not available . so I can use DocumentRowExported Event. this event not available e. section property .. etc.. so I can add header text manual.
Report report = new Report();
ISection gridSection = report.AddSection();
IText headerText = gridSection.AddText();
headerText.AddContent("Risk Factor Validation Report");
headerText.AddLineBreak();
protected void ctrlPDF_BeginExport(object sender, DocumentExportEventArgs e)
{
e.Section.AddQuickText(string.Empty);
IText heading = e.Section.AddText();
Infragistics.Documents.Report.Text.Style headingStyle =
new Infragistics.Documents.Report.Text.Style(
new Infragistics.Documents.Graphics.Font("Arial", 14, FontStyle.Bold),
Infragistics.Documents.Graphics.Brushes.Black);
heading.AddContent("Risk Factor Validation Report", headingStyle);
}
Problem is
webdatagrid style is not appear PDF file Report, I set the style property is true in webdocumentexporter control, but not appear, . please help on this .