Summary:
This article troubleshoots an error that can occur when running a multi-sheet report that may be corrupted in Report Designer version 4.6+
Article Sections:
Symptoms:
When a user attempts to run a multi-sheet report that has been recreated based on a previous report that is working, the user receives the following error message:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at OneStop.Toolkit.AutoGrowList`1.get_Item(Int32 index)
at OneStop.Toolkit.DynamicMatrix`1.GetValue(Int32 row, Int32 column)
at OneStop.Framework.Engine.Selection.InstanceMatrix.InitReferences()
at OneStop.Framework.Engine.Selection.InstanceMatrix..ctor(SourceEnvironment senv, DefinitionItemCollection items, Boolean generateDrilldown)
at OneStop.Facade.Execute.BuildLayout(ReportEnvironment env, LayoutDefinition ld, Boolean generateDrilldown)
at OneStop.Facade.Execute.GetInstance(ReportEnvironment env, ExcelMapping exmap, String title, String sheet, Boolean generateDrilldown)
at OneStop.Facade.Execute.
Causes:
The report may have been corrupted by one of the following actions:
- User made changes to interface/data settings when in run mode. We have since prevented users from saving back changes in v4.7 to avoid this issue.
- This can be confirmed by clicking on Interface Settings when in Run mode. The window doesn’t show up and you get an error.
- User incorrectly used OSR copy/paste. The form may have been created using OSR copy/paste if it is based on an older report.
- Further evidence leads to this if the test form contains remnants of other forms in the Interface/Data Setting hidden sheets.
Resolution:
First identify which sheet is causing the error. An easy way to determine this is to delete a sheet and run the report, continuing one-by-one to deduce which sheet is causing the error. Once the sheet causing the error has been identified, try recreating the parameters on the sheet by deleting each and starting fresh.
If that does not resolve the issue, recreate the sheet.
Properties:
Applies To:
- Report Designer
- BI360 version 4.6+