Index was out of range

Stimulsoft Reports.WPF discussion
Post Reply
terjoh
Posts: 6
Joined: Fri May 09, 2014 9:29 am

Index was out of range

Post by terjoh »

Hi,
We have reports that were created with Stimulsoft version 2013.3 and 2014.1.
We have now upgraded to 2015.3 version and some of the reports fail with the following error message (see error msg below)
I run the report once (using a filter value) - this results in a 2 page report
If I then change the filter (results in 1 page report) the error occurs.
Looks like the error is related to the "page collection" (the number of displayed pages in the report...)

Is this a known bug in 2015.3? Have you released any service pack or newer version that I can download?

Best Regards
Terje J

ERRORMSG:
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 64-bits: True
Exception: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

System.Collections.CollectionBase
System.Collections.IList.get_Item

Source: mscorlib
Target: System.Object System.Collections.IList.get_Item(Int32)

Stacktrace: at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
at Stimulsoft.Report.Components.StiPagesCollection.get_Item(Int32 index)
at Stimulsoft.Report.Viewer.StiWpfViewerControl.RenderViewesOnPage(StiPageVisual pageVisual, Boolean allowAnimation)
at Stimulsoft.Report.Viewer.StiWpfViewerControl.RerenderVisiblePages()
at Stimulsoft.Report.Viewer.StiWpfViewerControl.Refresh()
at Stimulsoft.Report.Viewer.StiWpfViewerControl.btRefreshClick(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Index was out of range

Post by Alex K. »

Hello,

Can you please send us a simple report with test data which reproduces the issue for analysis.

Thank you.
terjoh
Posts: 6
Joined: Fri May 09, 2014 9:29 am

Re: Index was out of range

Post by terjoh »

Hi Aleksey,

I'm not able to send you a test project right now.
But maybe you can try this to recreate the error:

Make a simple report with a date filter (filters the report data on a given date)

After you submit/run a report you can switch between different view modes using the Single Page button, Multiple Pages button and the Continuous button.

Let's say the report with the date filter resulted in 4 pages the first time you submitted it...
Set view mode to Multiple Pages, change the date filter (making sure this results in less than 4 pages) and then submit the report once more.

I get this error using your dll's in my project and also when running the report in the Stimulsoft Designer.
I get the same error in 3 unrelated reports...
And all of them works fine if I submit with view mode set to Single Page!

Regards
Terje
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Index was out of range

Post by Alex K. »

Hello,

Thank you for the detail description. But we couldn't reproduce this bug.
Please try to check the last build and let us know about the result.

Thank you.
Post Reply