Page 1 of 1
Export - Always turn on 'Use Page Headers & Footers'
Posted: Thu Jul 28, 2011 12:33 pm
by RossAFaneuf
We have a set of reports which are available to users of our Web application. The users have the option to save (export) reports in a limited number of formats. For MS Word 2007/2010 (docx), we need to set the 'Use Page Headers & Footers' to always be on. How do we do this in either the saved report MRT or the StiWebViewer configuration?
Export - Always turn on 'Use Page Headers & Footers'
Posted: Fri Jul 29, 2011 8:32 am
by Ivan
Hello,
You need to add your own method, for example:
Code: Select all
public void SetExportProperty(object sender, StiExportDataEventArgs args)
{
if (args.Settings is StiWord2007ExportSettings)
{
(args.Settings as StiWord2007ExportSettings).UsePageHeadersAndFooters = true;
}
}
Then you can use this method in the PageLoad event:
Code: Select all
StiWebViewer1.ReportExport += new Stimulsoft.Report.Web.StiExportDataEventHandler(SetExportProperty);
or add property for the StiWebViewer on the aspx-page:
Thank you.