Hi,
I'd like to be able to control the visibility of the progress bar during Export like how RenderWithWpf can using a showProgress bool parameter. Is this functionality perhaps hidden somewhere else? Perhaps it should be made to be standard across the various parts of the report engine? Thanks.
Regards,
David
Export Document Without Progress Bar
Export Document Without Progress Bar
Hello, David.[quote="david".tom]I'd like to be able to control the visibility of the progress bar during Export like how RenderWithWpf can using a showProgress bool parameter. Is this functionality perhaps hidden somewhere else? Perhaps it should be made to be standard across the various parts of the report engine? [/quote]
Here is the code for exporting report:
Thank you.
Here is the code for exporting report:
Code: Select all
bool useExportSettingsMenu = false;
bool useProgress = true;
StiReport rep = new StiReport();
rep.Load(@"d:\test.mrt");
rep.RenderWithWpf(false);
FileStream fs = new FileStream(@"d:\test1.xlsx", FileMode.Create);
if (useExportSettingsMenu)
{
rep.ExportDocument(StiExportFormat.Excel2007, fs);
}
else
{
StiExcel2007ExportService service = new StiExcel2007ExportService();
StiExcel2007ExportSettings exportSettings = new StiExcel2007ExportSettings();
if (useProgress)
{
service.Progress = StiGuiOptions.GetProgressInformation(service.OwnerWindow, StiGuiMode.Wpf);
service.Progress.Start(StiLocalization.Get("Export", "ExportingReport"));
service.ExportExcel(rep, fs, exportSettings);
service.Progress.Close();
service.Progress = null;
}
else
{
service.ExportExcel(rep, fs, exportSettings);
}
}