'Declaration Public Property PageHeaderTemplate As DataTemplate
public DataTemplate PageHeaderTemplate {get; set;}
Note: this property takes precedence over the setting on the ReportBase's ReportBase.PageHeaderTemplate.
Private Sub SetReportSettings() Dim reportObj As New Report() Dim section As New EmbeddedVisualReportSection(XamDataGrid1) reportObj.Sections.Add(section) ' set Header template for section only section.PageHeaderTemplate = TryCast(Me.Resources("PagePresenterHeaderTemplate"), DataTemplate) ' set Header data for section only section.PageHeader = "MyHeader" reportObj.Print(False) End Sub
private void SetReportSettings() { Report reportObj = new Report(); EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(XamDataGrid1); reportObj.Sections.Add(section); // set Header template for section only reportObj.PageHeaderTemplate = this.Resources["PagePresenterHeaderTemplate"] as DataTemplate; // set Header data for section only reportObj.PageHeader = "MyHeader"; reportObj.Print(false); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2