我正在研究一个项目并遇到了一个问题.当我运行我的代码时,我收到此错误消息:
The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception
Run Code Online (Sandbox Code Playgroud)
消息的标题是"TypeInitializerException未处理".
我在这行代码中收到此错误:
this.crystalReportViewer = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
Run Code Online (Sandbox Code Playgroud)
我一直在寻找解决这个问题的方法,但我一直在遇到另一个问题.我发现的关于如何解决这个问题的一切都说平台目标应该改为x86.遵循该建议的所有评论总是积极的,因为它似乎适用于每个人,但它不适合我.我还尝试将平台目标作为x64.当我这样做时,我没有收到先前声明的错误,但我收到的新错误如下:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
Run Code Online (Sandbox Code Playgroud)
此消息的标题是"InvalidOperationException未处理".错误就在这条线上:
db.Open();
Run Code Online (Sandbox Code Playgroud)
db,当然,被设置为新的OleDbConnection(连接).connection =一个Access数据库.
当平台目标是x86时,为什么我收到第一个错误而不是第二个错误,如果平台目标是x64,反之亦然?
堆栈跟踪:
System.TypeInitializationException was unhandled
Message=The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception.
Source=CrystalDecisions.Shared
TypeName=CrystalDecisions.Shared.SharedUtils
StackTrace:
at CrystalDecisions.Shared.SharedUtils.get_CurrentControl()
at CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture()
at CrystalDecisions.Shared.LocaleManager..ctor()
at CrystalDecisions.Windows.Forms.CrystalReportViewer.InitReportViewer()
at CrystalDecisions.Windows.Forms.CrystalReportViewer..ctor()
at Client_Manager.ReportViewer.InitializeComponent() in C:\Users\Will\Desktop\Client_Manager\SyndicateII\ReportViewer.Designer.cs:line 31
at Client_Manager.ReportViewer..ctor() in C:\Users\Will\Desktop\Client_Manager\SyndicateII\ReportViewer.cs:line 27
at Client_Manager.Form1..ctor() in C:\Users\Will\Desktop\Client_Manager\SyndicateII\Form1.cs:line 174
at Client_Manager.Program.Main() in C:\Users\Will\Desktop\Client_Manager\SyndicateII\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, …Run Code Online (Sandbox Code Playgroud) c# visual-studio-2010 unhandled-exception crystal-reports-xi
有谁知道如何计算两个日期字段之间的工作日数?我正在使用oracle sql developer.我需要找到多个开始和结束日期之间的平日工作日.因此,我需要获取每条记录的天数,以便我可以将它们平均化.这可以在SELECT我的查询部分中作为一行完成吗?
我在Visual Studio 2010中使用C#编写需要在多台计算机上运行的程序.到目前为止,如果电脑上安装了VS 2010,我可以在另一台电脑上运行该程序.如果没有VS 2010,则程序不会运行.有没有办法让程序运行而无需安装VS 2010?