C# DevExpress 的gridControl或gridView数据导出失败解决方法
2016-07-05 10:14
471 查看
来自:http://blog.csdn.net/lybwwp/article/details/8049464
谢谢
在使用DevExpress 的GridPanel控件的时候出现了一个莫名其妙的现象,在使用ExportToXls方法导出表格到Excel的时候,在本地调试没有问题。部署到客户机上的时候问题出现了,居然没有创建文件。包括ExportToPdf、ExportToMht等都不行。google后在csdn的一片文章内(http://topic.csdn.net/u/20080303/17/76d3ded4-d43d-4c57-907a-492fce69ac27.html),发现原来是没有引用DevExpress.XtraPrinting。引用后把DevExpress.XtraPrinting.v8.3.dll文件一起部署到客户机后,问题解决。
C# DevExpress 的gridControl或gridView数据导出数据时报如下错误
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。
************** 异常文本 **************
System.NullReferenceException: 未将对象引用设置到对象的实例。
在 DevExpress.XtraPrinting.ComponentPrinter.CreateLink()
在 DevExpress.XtraPrinting.ComponentExporter.get_LinkBase()
在 DevExpress.XtraGrid.Views.Base.BaseView.ClearDocumentIfNeeded()
在 DevExpress.XtraGrid.Views.Base.BaseView.ExecutePrintExport(Action0 method)
在 DevExpress.XtraGrid.Views.Base.BaseView.ExportToXls(String filePath)
在 DevExpress.XtraGrid.GridControl.ExportToXls(String filePath)
在 Medicine_ERP.Room_YaopinForm.barButtonItem4_ItemClick(Object sender, ItemClickEventArgs e)
在 DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
在 DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)
在 DevExpress.XtraBars.BarItemLink.OnLinkClick()
在 DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
在 DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
在 DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
在 DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
在 DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
在 DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 4.0.0.0
Win32 版本: 4.0.30319.1 (RTMRel.030319-0100)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework
4.0.30319/mscorlib.dll
----------------------------------------
Medicine_ERP
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files/Anshield_Medicine_ERP/Anshield_Medicine_ERP/Medicine/Medicine_ERP.exe
谢谢
在使用DevExpress 的GridPanel控件的时候出现了一个莫名其妙的现象,在使用ExportToXls方法导出表格到Excel的时候,在本地调试没有问题。部署到客户机上的时候问题出现了,居然没有创建文件。包括ExportToPdf、ExportToMht等都不行。google后在csdn的一片文章内(http://topic.csdn.net/u/20080303/17/76d3ded4-d43d-4c57-907a-492fce69ac27.html),发现原来是没有引用DevExpress.XtraPrinting。引用后把DevExpress.XtraPrinting.v8.3.dll文件一起部署到客户机后,问题解决。
C# DevExpress 的gridControl或gridView数据导出数据时报如下错误
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。
************** 异常文本 **************
System.NullReferenceException: 未将对象引用设置到对象的实例。
在 DevExpress.XtraPrinting.ComponentPrinter.CreateLink()
在 DevExpress.XtraPrinting.ComponentExporter.get_LinkBase()
在 DevExpress.XtraGrid.Views.Base.BaseView.ClearDocumentIfNeeded()
在 DevExpress.XtraGrid.Views.Base.BaseView.ExecutePrintExport(Action0 method)
在 DevExpress.XtraGrid.Views.Base.BaseView.ExportToXls(String filePath)
在 DevExpress.XtraGrid.GridControl.ExportToXls(String filePath)
在 Medicine_ERP.Room_YaopinForm.barButtonItem4_ItemClick(Object sender, ItemClickEventArgs e)
在 DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
在 DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)
在 DevExpress.XtraBars.BarItemLink.OnLinkClick()
在 DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
在 DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
在 DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
在 DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
在 DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
在 DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 4.0.0.0
Win32 版本: 4.0.30319.1 (RTMRel.030319-0100)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework
4.0.30319/mscorlib.dll
----------------------------------------
Medicine_ERP
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files/Anshield_Medicine_ERP/Anshield_Medicine_ERP/Medicine/Medicine_ERP.exe
相关文章推荐
- C#信号量用法简单示例
- c# equals与==的区别
- C# Webservice
- 22 C#中的异常处理入门 try catch throw
- VS 2010 批量封装字段
- C# ArcEngine TOCControl上实现右键
- C# 文件及目录操作类
- C# ListView 列宽调整 刷新
- 栈
- c#自定义条件排序 可以使用中文条件 datagirdview
- C#实现winform下图片的上传预览保存以及在桌面应用系统的应用
- C#:生成短网址
- c# serialport读取不限数量的16进制数据
- [C#6] 3-null 条件运算符
- MD5算法原理简要介绍并采用C#应用在桌面应用系统的用户登录与注册中
- C#中的Sealed和J#中的Final比较(转载)
- C# 对象的使用
- C#实现对远程服务器的内存和CPU监控
- c# 16进制显示转化
- C# Enum,Int,String的互相转换 枚举转换