none
[vb.net2005]在中文版VS2005開發後移到英文版後crystal report就不能用了 RRS feed

  • 問題

  • 請問一下各位

    我在vs2005中文版中開發vb.net程式+crystal report報表(直接用Crystal Reports for Visual Studio 2005 ),執行一切正常

    後來因為要出多國語言版

    因此重新安裝英文版的VS2005

    結果出現下列錯誤

    請問是什麼原因??

    謝謝~~~

    System.Reflection.TargetInvocationException was unhandled
      Message="引動過程的目標傳回例外狀況。"
      Source="mscorlib"
      StackTrace:
           於 System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
           於 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
           於 System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
           於 System.Activator.CreateInstance(Type type, Boolean nonPublic)
           於 CrystalDecisions.CrystalReports.Engine.EngineObjectFactory.CreateEngineObject(Object rasObject, Type engineObjectType)
           於 CrystalDecisions.CrystalReports.Engine.EngineObjectFactory.GetEngineObject(Type engineObjectType)
           於 CrystalDecisions.CrystalReports.Engine.ReportDocument.get_FormatEngine()
           於 CrystalDecisions.CrystalReports.Engine.ReportDocument.Refresh()
           於 CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type)
           於 CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
           於 CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet)
           於 Taidoc.BGPrintReport.PB_OK_Click(Object sender, EventArgs e) 於 D:\VB2005程式\DrT\Taidoc\Taidoc\BGPrintReport.vb: 行 359
           於 System.Windows.Forms.Control.OnClick(EventArgs e)
           於 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           於 System.Windows.Forms.Control.WndProc(Message& m)
           於 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           於 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           於 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           於 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           於 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 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)
           於 System.Windows.Forms.Application.Run(ApplicationContext context)
           於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
           於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
           於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
           於 Taidoc.My.MyApplication.Main(String[] Args) 於 17d14f5c-a337-4978-8281-53493378c1071.vb: 行 81
           於 System.AppDomain.nExecuteAssembly(Assembly 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)
           於 System.Threading.ThreadHelper.ThreadStart()

     

    2006年11月6日 上午 05:48

解答

所有回覆

  • gRpt.FileName = gFileName
                gRpt.SetDataSource(gDst)
                CRViewer.ReportSource = gRpt
                If gExportLimit = False Then
                    CRViewer.ShowExportButton = False
                End If
                If gPrintLimit = False Then
                    CRViewer.ShowPrintButton = False
                End If

    {"引動過程的目標傳回例外狀況。"}
        System.Reflection.TargetInvocationException: {"引動過程的目標傳回例外狀況。"}
        Data: {System.Collections.ListDictionaryInternal}
        HelpLink: Nothing
        InnerException: {System.IO.FileNotFoundException}
        Message: "引動過程的目標傳回例外狀況。"
        Source: "mscorlib"
        StackTrace: "   於 System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
       於 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
       於 System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
       於 System.Activator.CreateInstance(Type type, Boolean nonPublic)
       於 CrystalDecisions.CrystalReports.Engine.EngineObjectFactory.CreateEngineObject(Object rasObject, Type engineObjectType)
       於 CrystalDecisions.CrystalReports.Engine.EngineObjectFactory.GetEngineObject(Type engineObjectType)
       於 CrystalDecisions.CrystalReports.Engine.ReportDocument.get_FormatEngine()
       於 CrystalDecisions.CrystalReports.Engine.ReportDocument.Refresh()
       於 CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type)
       於 CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
       於 CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet)
       於 NsReport.FrmReport.FrmReport_Load(Object sender, EventArgs e)"
        TargetSite: {System.Reflection.RuntimeMethodInfo}

    2006年11月30日 上午 02:21
  • 我後來把VS2005移除

    重新再灌一次後

    就沒有問題了

    您可以試試看

    2006年11月30日 上午 10:08