***************************************************************
System.InvalidOperationException was unhandled
Message="Collection was modified; enumeration operation may not execute."
Source="mscorlib"
StackTrace:
at System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()
at Stimulsoft.Report.Dictionary.StiDataCollection.RegData(StiDataCollection datas)
at Stimulsoft.Report.StiReport.RegData(StiDataCollection datas)
at SDP.Win.QueryBuilder.ReportDesigner.SetReportWizard() in D:\QueryBuilder2\QueryBuilderControls\Version2\ReportDesigner.vb:line 136
at SDP.Win.QueryBuilder.ReportDesigner.UltraButtonReportWizard_Click(Object sender, EventArgs e) in D:\QueryBuilder2\QueryBuilderControls\Version2\ReportDesigner.vb:line 122
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at Infragistics.Win.Misc.UltraButtonBase.OnClick(EventArgs e)
at Infragistics.Win.Misc.UltraButton.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at SDP.Win.QueryBuilder.App.Main.Main() in D:\QueryBuilder2\QueryBuilderApp\Main.vb:line 3
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
*****************************************************************************************
Code: Select all
Private Sub SetReportWizard()
Dim report As Stimulsoft.Report.StiReport = PopulateReportDesign()
Dim outputFieldSet As OutputFieldSet = OutPutFieldSetDataStore.getInstance.find(_reportLayout.RLAOFSID)
Dim ds As DataSet = ReportExecuter.ExtractSchema(outputFieldSet)
report.RegData("Data", ds)
report.Dictionary.Synchronize()
Dim wizard As Stimulsoft.Report.Design.Wizards.StiStandardWizardService = New Stimulsoft.Report.Design.Wizards.StiStandardWizardService()
Dim rptNew As Stimulsoft.Report.StiReport = wizard.CreateReport(report)
If (rptNew IsNot Nothing) Then
rptNew.RegData(rptNew.Dictionary.DataStore)
rptNew.Design()
Dim reportLayout As String = rptNew.SaveToString
_reportLayout.RLALayout = reportLayout
End If
End Sub