Reputation: 8601
I am creating a WinForms application using C# (.NET 4.5) and Crystal Reports (13.0.5.891). I am using Visual Studio 2012. I have made a few modifications to a Crystal Report (mostly renaming fields). When I go to the form that holds the report viewer, the following thing happens:
The error message displayed is:
The control CrystalDecisions.Windows.Forms.PageControl has thrown an unhandled exception in the designer and has been disabled. Exception: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Stack trace: at CrystalDecisions.Windows.Forms.PageControl.OnPaint(PaintEventArgs e) at CrystalDecisions.Windows.Forms.PageControl.WndProc(Message&m)
When I run the program, for some reports it works well, for others it just closes the report viewer window completely. Editing the report does not show any error.
I tried cleaning the project and restarting the IDE. Also, when looking for the error online, I only managed to find this post but it was of no help.
Upvotes: 1
Views: 910
Reputation: 274
I've had similar problems in with CR where a change of field has broken formulas but not been picked up by the report validation and only thrown "Index out of range" errors at run-time.
If you can rollback the reports to before you made your changes and check they are working you will at least know its the (mostly renaming fields) thats caused it. Apply your changes in steps and test as you go till you hit the errors you're getting now.
Upvotes: 1