惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
LINUX DO - 最新话题
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
月光博客
月光博客
博客园 - 叶小钗
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Tailwind CSS Blog
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog RSS Feed
量子位
美团技术团队
Vercel News
Vercel News
Y
Y Combinator Blog
IT之家
IT之家
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
腾讯CDC
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
罗磊的独立博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
博客园 - 司徒正美
N
Netflix TechBlog - Medium
S
Schneier on Security
博客园 - 聂微东
U
Unit 42
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
Latest news
Latest news

博客园 - Lavenders

Java 正则表达式 量词 --- 三种匹配模式【贪婪型、勉强型、占有型】 信号量与PV操作 java的(PO,VO,TO,BO,DAO,POJO)解释 使用Application对象简单完成网站总访问人数的统计 更新记录后关闭子窗口并刷新父窗口的Javascript jquery jqPlot API 中文使用教程 一款基于bootstrap的datetimepicker ASP.NET下CKEditor3.6.4结合CKFinder2.3实现文本编辑器的上传功能 VS2010创建Web Service程序 【转】XSL和XSLT jQuery历史版本 【转】让Iframe自适应高度 【转】框架集中framespacing、border和frameborder属性的关系 【转】Meta标签详解 ASP.NET保存信息总结(Application、Session、Cookie、ViewState和Cache等) . 【原创】VS2008 Web应用程序带数据库制作安装程序 asp.net中的缓存(三)应用程序数据缓存 asp.net中的缓存(二)局部数据缓存 asp.net中的缓存(一)页面输出缓存
【原创】VS2010中水晶报表与VS2008水晶报表版本冲突问题
Lavenders · 2012-10-25 · via 博客园 - Lavenders

VS2010中的水晶报表是单独安装的,安装成功后,会在VS的工具栏中出现【报表设计】一栏,里面有3个控件,当把这3个控件任意一个拖拽到页面上时,控件会报错,显示“未将对象引用设置到对象实例”,运行页面,则会出现如下提示“

CS0433: 类型“CrystalDecisions.Web.CrystalReportViewer”同时存在于“c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Web.dll”和

“c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Web.dll”中

这是因为VS2010中水晶报表V13与VS2008中水晶报表V10版本冲突,导致程序在编译时无法正确定位到正确版本的DLL文件,在VS2010中,所有的DLL文件,都使用V13,具体解决方法如下:

(1)先检查web.config文件中关于程序集的引用,是否如下,是V13

<assemblies>
        <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
        <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
        <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
        <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
        <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
      </assemblies>

(2)在项目根目录下添加Bin文件夹,将C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet下的以下5个DLL文件复制到Bin文件夹下,

CrystalDecisions.CrystalReports.Engine.dll

CrystalDecisions.ReportSource.dll

CrystalDecisions.Shared.dll

CrystalDecisions.Web.dll

CrystalDecisions.Windows.Forms.dll

(3)最后将工具栏中,报表设计栏目下用到的控件拖拽到页面中,切换到HTML,将

<%@ Register assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>

改成

<%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>

,控件就能够正常使用了