This is a migrated thread and some comments may be shown as answers.

Index was out of range.

1 Answer 178 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Dev asked on 08 Oct 2014, 05:11 PM
I'm using Reporting 2013 Q1 in a WPF application. We have several reports which are displayed in a Report Viewer using ViewMode.PrintPreview.

On one of our reports, which has several graphs we sometimes get an error generated by the report ( i.e the report loads and the query is run, data is successfully returned, but the report viewer itself generates the error).

Error is:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Any ideas what this could be?



1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 10 Oct 2014, 11:33 AM
Hello Tom,

The problem is most probably related to the data. Please test to run the design preview of the report with the same set of records producing the error in the viewer, in order to check if this is the problem. You can also subscribe for the report's Error event and log the exception.


If you have chance, test also to upgrade the project  or only the reports to the latest available Telerik Reporting Q2 2014 SP1 version 8.1.14.804.

In case you decide to upgrade all projects after testing the reports, keep in mind that as of Q1 2014 the WPF/Silverlight ReportViewer uses implicit styles instead of the StyleManager to apply themes.
The latest available Telerik Reporting release Q2 2014 SP1 version 8.1 14.804 is built against UI for WPF Q2 2014 SP1 version 2014.2.729.40. Thus you will need to download and the corresponding UI for WPF official or a greater version. If you use greater version of Telerik UI for WPF, you will need to apply proper binding redirects and update the corresponding XAML resources for the WPF controls.

Details how to add a WPF ReportViewer are available in the How to: Add report viewer to a WPF application help article. Also the following blog post elaborates on all strategies for using the WPF ReportViewer with the existing UI for WPF assemblies (NoXAML and full): Setting a theme of the WPF/Silverlight Report Viewer (Q1 2014 and later).


Feel free to open a support ticket and send us the problematic report and test data, in order to run the report and reproduce the error.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Report Designer (standalone)
Asked by
Dev
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or