Index was out of range.

2 posts, 0 answers
  1. Tom
    Tom avatar
    38 posts
    Member since:
    Mar 2007

    Posted 08 Oct 2014 Link to this post

    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?

  2. Stef
    Stef avatar
    2914 posts

    Posted 10 Oct 2014 Link to this post

    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

    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.


    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.

  3. DevCraft R3 2016 release webinar banner
Back to Top