一、错误描述
在公司做项目的时候,有时会需要用到水晶报表显示数据,水晶报表在ASP.NET中使用时没有问题,winform项目开发也没有问题,但是在ext.net开发使用时却报错了,错误:Uncaught ReferenceError: bobj is not defined,也就是未定义参考错误:bobj未定义。
然后在网上找了好久的资料,都没有解决问题,后来无意间看到一网站:http://www.knowsky.com/897567.html。说得很详细,通过修改web.config解决了错误。我是为了方便自己以后查找,又整理了出来了。希望给用得到的朋友提供帮助。
二、解决方案
在web.config添加节点代码
<configSections> <sectionGroup name="businessObjects"><!--水晶報表--> <sectionGroup name="crystalReports"> <section name="rptBuildPRovider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/> <section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"></section> </sectionGroup> </sectionGroup> </configSections> <!--水晶報表--> <businessObjects> <crystalReports> <crystalReportViewer> <add key="ResourceUri" value="/aspnet_client/system_web/4_0_30319/crystalreportviewers13"/> </crystalReportViewer> </crystalReports> </businessObjects>
最主要就是这两段,