带有报表查看器的exe的CLR20r3问题

时间:2016-09-06 17:19:55

标签: c#-4.0 reportviewer2008

在C#中创建一个包含reportviewer句柄的应用程序.rd1

DataSet dataset = new DataSet();

             comMycom = new SqlCommand(@"sqlqeury", conMycon);

             comMycom.CommandTimeout = 0;
             SqlDataAdapter dataAdapter = new SqlDataAdapter(comMycom);
             dataAdapter.Fill(dataset);
             this.reportViewer1.LocalReport.ReportPath = Application.StartupPath + "\\Loy.rdl";

             this.reportViewer1.LocalReport.DataSources.Clear();


             this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Loy", dataset.Tables[0]));

             this.reportViewer1.RefreshReport();
             reportViewer1.Update(); 

exe在两个系统中成功运行,但在exe打开时在另一个系统中给出错误,如下所示

Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01: loy.exe
  Problem Signature 02: 1.0.0.0
  Problem Signature 03: 57cef963
  Problem Signature 04: loy
  Problem Signature 05: 1.0.0.0
  Problem Signature 06: 57cef963
  Problem Signature 07: a
  Problem Signature 08: 1f
  Problem Signature 09: System.IO.FileNotFoundException
  OS Version:   6.1.7601.2.1.0.256.48
  Locale ID:    1033
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

应用程序在.NETFRAMEWORK 4.0中

知道为什么它不能在一个特定的系统中工作

事件查看器

Faulting application name: loy.exe, version: 1.0.0.0, time stamp: 0x57cef963
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time stamp: 0x53159a86
Exception code: 0xe0434352
Fault offset: 0x0000c42d
Faulting process id: 0x1d4c
Faulting application start time: 0x01d20861d0c5f841
Faulting application path: C:\report\loy\loy.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 0f0d3cc3-7455-11e6-bd16-a0481c8259f6

0 个答案:

没有答案