IndexOutOfRangeException while rendering

Stimulsoft Reports.NET discussion
Post Reply
Slesarev
Posts: 4
Joined: Fri Nov 08, 2019 10:19 am

IndexOutOfRangeException while rendering

Post by Slesarev »

Hello everyone
Just got the last version of Stimulsoft.Reports.Engine package. Current version is 2019.4.1
We're testing the capabilities of stimulsoft and using trial version. It works great on small reports, but when we are trying to render bigger reports an exception occures
It says

Code: Select all

System.IndexOutOfRangeException
in Stimulsoft.Report.Export.StiExcelExportService.MakeWorksheetStream(StiPagesCollection pages)
in Stimulsoft.Report.Export.StiExcelExportService.MakeMainStream(StiReport report, StiPagesCollection allPages)
in Stimulsoft.Report.Export.StiExcelExportService.ExportExcel(StiReport report, Stream stream, StiExcelExportSettings settings)
in Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, StiExportService exportService, Stream stream, StiExportSettings settings)
in Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, Stream stream, StiExportSettings settings)
in System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
If you need more information to resolve this error, please leave a comment and I reply as soon as possible
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: IndexOutOfRangeException while rendering

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
Slesarev
Posts: 4
Joined: Fri Nov 08, 2019 10:19 am

Re: IndexOutOfRangeException while rendering

Post by Slesarev »

Hello Lech, thank you for your response
I've prepared a solution, to reproduce the issue. Simply restore nuget packages and run the application

https://drive.google.com/file/d/11e11NS ... sp=sharing
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: IndexOutOfRangeException while rendering

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Slesarev
Posts: 4
Joined: Fri Nov 08, 2019 10:19 am

Re: IndexOutOfRangeException while rendering

Post by Slesarev »

Hello, Lech
Got it, thank you for your help
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: IndexOutOfRangeException while rendering

Post by Lech Kulikowski »

Hello,

The issues with IndexOutOfRangeException is fixed.

Also, your code is incorrect, you should use
buffer = stream.ToArray();
instead of:
buffer = stream.GetBuffer();

Also, Excel file is 131mb but is you will use export to Excel2007+ (xlsx), the file will 27mb

Thank you.
Slesarev
Posts: 4
Joined: Fri Nov 08, 2019 10:19 am

Re: IndexOutOfRangeException while rendering

Post by Slesarev »

Hello, Lech
Which version should I use to check if my report exports correctly?
Thanks
Lech Kulikowski
Posts: 6266
Joined: Tue Mar 20, 2018 5:34 am

Re: IndexOutOfRangeException while rendering

Post by Lech Kulikowski »

Hello,

The next release will be available in the start of December.

You can send a request on support@stimlsoft.com

Thank you.
Post Reply