I'm having a fairly serious problem getting the report to break after my group. When I set the group sections PageBreak = After, the report no longer generates! It just sits there for a long time showing the 'generating report', and then finally errors out with the following error:
I thought it might be the report itself that was corrupted or something so I used the wizard to whip up a brand new report using the same data source, but I've still got the same problem.
The report is simply structured:
Group
Data
Data
Group
Data
The grouping section is a single field, with only standard fields in the data, and it works 100% great - IF I don't specify the Pagebreak = After. It even works if I set PageBreak = Before, but then of course I get a blank page at the beginning of the report, which is crap.
To set the data for the report I'm just creating the report, calling the database and returning a generic dataset structured exactly the same as the report dataset, and the setting the report's datasource = to the returned data.
EDIT: I've also just tried setting the datasource in the NeedDataSource event handler, but it still sits there and crashes when I close the report viewer.
How do I get around this / fix this issue?
Telerik.ReportViewer.WinForms.ReportViewerException: The ReportViewer control handle failed to create. |
at Telerik.ReportViewer.WinForms.ReportViewerBase.OnRenderingComplete(RenderingThreadResult result, PostRenderArgs args) |
at Telerik.ReportViewer.WinForms.RenderingThread.OnComplete(RenderingThreadArgs args, RenderingThreadResult result) |
at Telerik.ReportViewer.WinForms.RenderingThread.ThreadFunc(Object o) |
at System.Threading.ThreadHelper.ThreadStart_Context(Object state) |
at System.Threading.ExecutionContext.runTryCode(Object userData) |
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) |
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) |
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) |
at System.Threading.ThreadHelper.ThreadStart(Object obj) |
I thought it might be the report itself that was corrupted or something so I used the wizard to whip up a brand new report using the same data source, but I've still got the same problem.
The report is simply structured:
Group
Data
Data
Group
Data
The grouping section is a single field, with only standard fields in the data, and it works 100% great - IF I don't specify the Pagebreak = After. It even works if I set PageBreak = Before, but then of course I get a blank page at the beginning of the report, which is crap.
To set the data for the report I'm just creating the report, calling the database and returning a generic dataset structured exactly the same as the report dataset, and the setting the report's datasource = to the returned data.
EDIT: I've also just tried setting the datasource in the NeedDataSource event handler, but it still sits there and crashes when I close the report viewer.
How do I get around this / fix this issue?