ReportCacheMode and Export to Excel

Stimulsoft Reports.NET discussion
Post Reply
jplaberge
Posts: 15
Joined: Wed Dec 03, 2014 9:51 pm

ReportCacheMode and Export to Excel

Post by jplaberge »

Hi,


We are having problems when our users try to export reports to Excel when the reports are set to use Cache (ReportCacheMode = On). We use this mode when a report contains many images.

To reproduce the problems, I have created a small application, StimulsoftCacheModeTest. It will open the report viewer, and you can then choose how to export to Excel. Click Save >> Microsoft Excel File.

1/ Check Export Data Only. The report is supposed to display rows 1 to 500, but on the report, only the first 423 rows will be displayed. In addition, the footers are not supposed to be displayed when Export Data Only is checked.

2/ Export again, this time check "Use One Page Header and Footer". The page numbers will be displayed, and the header will be repeated for each page, instead of only one header at the top of the Excel sheet.

3/ I could not reproduce it with the sample application, but if both Export Data Only and Export Object Formatting are checked, on some reports I have the "Exception Report" Window from Stimulsoft with this exception: "Index was outside the bounds of the array." (see the stack trace below)


If you uncomment _stiReport.ReportCacheMode = StiReportCacheMode.On and run the application again, all options will work as expected.


Thank you

----------------------------

[Exception Info]
Message: Index was outside the bounds of the array.

Source: Stimulsoft.Report

StackTrace:
at Stimulsoft.Report.Export.StiExcel2007ExportService.WriteSheet(Int32 indexSheet, StiPage page)
at Stimulsoft.Report.Export.StiExcel2007ExportService.ExportExcel(StiReport report, Stream stream, StiExcelExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, StiExportService exportService, Stream stream, StiExportSettings settings)
at Stimulsoft.Report.Export.StiExportService.DoExport(StiExportInfo info)
at Stimulsoft.Report.Export.StiExportService.StartExport(StiReport report, Stream stream, StiExportSettings settings, Boolean sendEMail, Boolean openAfterExport, String fileName, StiGuiMode guiMode)
at Stimulsoft.Report.Export.StiExcelExportService.form_Complete(IStiFormRunner form, StiShowDialogCompleteEvetArgs e)
at Stimulsoft.Report.Export.StiExcelExportService.Export(StiReport report, String fileName, Boolean sendEMail, StiGuiMode guiMode)
at Stimulsoft.Report.Viewer.StiViewerControl.OnProcessExport(Object sender)
at Stimulsoft.Report.Viewer.StiViewerControl.cmExport_Click(Object sender, EventArgs e)

----------------------------
Attachments
StimulsoftCacheModeTest.zip
(36.69 KiB) Downloaded 198 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: ReportCacheMode and Export to Excel

Post by HighAley »

Hello.

We have reproduced the issue.
We need some time to make an improvement.
We will let you know about results.

Thank you.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: ReportCacheMode and Export to Excel

Post by Ivan »

Hello,
jplaberge wrote:1/ Check Export Data Only. The report is supposed to display rows 1 to 500, but on the report, only the first 423 rows will be displayed. In addition, the footers are not supposed to be displayed when Export Data Only is checked.
2/ Export again, this time check "Use One Page Header and Footer". The page numbers will be displayed, and the header will be repeated for each page, instead of only one header at the top of the Excel sheet.
The problem is solved.
The patch will be available in the next prerelease build.

Thank you.
Post Reply