|
Invité de passage
Inscription : décembre 2010 Messages : 3 Détails du profil  Informations forums : Inscription : décembre 2010 Messages : 3 Points : 3 Points : 3
|
Plantage VS avec Crytal Report
Bonjour,
Bon, je tourne en rond car je suis tombé sur un bug aléatoire, et je n'ai trouvé qu'une référence sur un site américain Microsoft où le sujet a été clôturé car non reproductible...
Voilà le problème :
- un état crystal report basé sur un dataset.
- le dataset contient une datatable non connecté à une bdd.
- un formulaire contenant un objet CrystalReportViewer.
L'état est chargé dynamiquement de la façon suivante à partir d'une procédure stockée :
Code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Try
Dim Param AS New SCOT_COMMUN.Param
Dim Connect AS New SqlConnection
Dim Adapter AS New SqlDataAdapter
Dim Command AS New SqlCommand
Connect.ConnectionString = Param.GetConnectDb
Command.Connection = Connect
Dim Dataset AS New DataSetPli
Command.CommandType = CommandType.StoredProcedure
Command.CommandText = "Ihm_Proc_PrintPli"
Command.Parameters.ADD("@NumPli", SqlDbType.Int)
Command.Parameters("@NumPli").Value = NumPli
Command.Parameters.ADD("@NumSupport", SqlDbType.Int)
Command.Parameters("@NumSupport").Value = NumSupport
Adapter.SelectCommand = Command
Dataset.Locale = System.Globalization.CultureInfo.InvariantCulture
Adapter.Fill(Dataset, "PLI")
Dim RptDoc AS New RptSupportIB1
RptDoc.SetDataSource(Dataset)
CrystalReportViewer.ReportSource = RptDoc
Command = Nothing
Connect.Close()
Catch ex AS Exception
MsgBox("Erreur critique lors de l'affichage du rapport support", MsgBoxStyle.Critical)
End Try |
J'ai de manière totalement aléatoire et sur les mêmes données le message d'erreur
Citation:
|
L'exception NullReferenceException n'a pas été gérée
|
: une fois mon état va s'afficher, une fois cela va planter et ce sur exactement les mêmes données !!!
J'ai essayé de jouer sur l'attribut "NullValue" de chaque champ du dataset, ça ne marche pas. J'ai mis des try catch avant l'appel de la form, pendant la génération, après la génération : rien, nada, toujours le même plantage "hard".
Le pire est que j'ai un autre état qui est basé sur la même procédure et chargé de la même façon, et lui s'exécute correctement sans jamais planter !
Quelqu'un a t'il une idée car là je craque un peu
Le dump de la fenêtre d'exécution au moment du plantage :
Citation:
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Exception non prise en charge</Description><AppDomain>SCOT_IHM.vshost.exe</AppDomain><Exception><ExceptionType>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>La référence d'objet n'est pas définie à une instance d'un objet.</Message><StackTrace> à CrystalDecisions.Windows.Forms.PageControl.OnMouseMove(MouseEventArgs e)
à System.Windows.Forms.Control.WmMouseMove(Message&amp; m)
à System.Windows.Forms.Control.WndProc(Message&amp; m)
à System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
à System.Windows.Forms.UserControl.WndProc(Message&amp; m)
à CrystalDecisions.Windows.Forms.PageControl.WndProc(Message&amp; m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
à SCOT_IHM.My.MyApplication.Main(String[] Args) dans 17d14f5c-a337-4978-8281-53493378c1071.vb:ligne 81
à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
à CrystalDecisions.Windows.Forms.PageControl.OnMouseMove(MouseEventArgs e)
à System.Windows.Forms.Control.WmMouseMove(Message&amp; m)
à System.Windows.Forms.Control.WndProc(Message&amp; m)
à System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
à System.Windows.Forms.UserControl.WndProc(Message&amp; m)
à CrystalDecisions.Windows.Forms.PageControl.WndProc(Message&amp; m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
à SCOT_IHM.My.MyApplication.Main(String[] Args) dans 17d14f5c-a337-4978-8281-53493378c1071.vb:ligne 81
à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord>
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Exception non prise en charge</Description><AppDomain>SCOT_IHM.vshost.exe</AppDomain><Exception><ExceptionType>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>La référence d'objet n'est pas définie à une instance d'un objet.</Message><StackTrace> à CrystalDecisions.Windows.Forms.PageControl.OnMouseMove(MouseEventArgs e)
à System.Windows.Forms.Control.WmMouseMove(Message&amp; m)
à System.Windows.Forms.Control.WndProc(Message&amp; m)
à System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
à System.Windows.Forms.UserControl.WndProc(Message&amp; m)
à CrystalDecisions.Windows.Forms.PageControl.WndProc(Message&amp; m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
à SCOT_IHM.My.MyApplication.Main(String[] Args) dans 17d14f5c-a337-4978-8281-53493378c1071.vb:ligne 81
à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
à CrystalDecisions.Windows.Forms.PageControl.OnMouseMove(MouseEventArgs e)
à System.Windows.Forms.Control.WmMouseMove(Message&amp; m)
à System.Windows.Forms.Control.WndProc(Message&amp; m)
à System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
à System.Windows.Forms.UserControl.WndProc(Message&amp; m)
à CrystalDecisions.Windows.Forms.PageControl.WndProc(Message&amp; m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
à System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
à SCOT_IHM.My.MyApplication.Main(String[] Args) dans 17d14f5c-a337-4978-8281-53493378c1071.vb:ligne 81
à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord>
|
Merci
|