解决ASP.NE页面水晶报表不显示工具栏图标的问题

开发环境 :VS2008 ,Crystal Report 2008

开发的网站没有使用系统默认的wwwroot目录,而是另建了一个目录 D:\published 做为网站的目录。

用Crystal Report2008在VS2008中开发报表,显示 正常,但当发布到网站上时水晶报表页没有图片,显示如下图,但是工作正常。

于是找原因,分析网页源码,找到代码如下:

复制代码
< table cellspacing = 0  cellpadding = 0 >< tr nowrap >
< td nowrap width = 8 >& nbsp; </ td >< td nowrap width = 22px >< input type = " image "  name = " CrystalReportViewer1$ctl02$ctl00 "  disabled = " disabled "  title = " Export "  src = " /aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/export.gif "  onmouseover = " this.src='/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/export_over.gif' "  onmouseout = " this.src='/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/export.gif' "  style = " height:22px;width:22px;border-width:0px; "   /></ td >
< td nowrap width = 8 >& nbsp; </ td >< td nowrap width = 22px >< input type = " image "  name = " CrystalReportViewer1$ctl02$ctl01 "  disabled = " disabled "  title = " Print "  src = " /aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/print.gif "  onmouseover = " this.src='/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/print_over.gif' "  onmouseout = " this.src='/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/print.gif' "  style = " height:22px;width:22px;border-width:0px; "   /></ td >
< td nowrap width = 8 >& nbsp; </ td >< td nowrap width = 22px >< input type = " image "  name = " CrystalReportViewer1$ctl02$ctl03 "  disabled = " disabled "  title = " Show/Hide Group Tree "  src = " /aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/grouptree.gif "  onmouseover = " this.src='/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/grouptree_over.gif' "  onmouseout = " this.src='/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/grouptree.gif' "  style = " height:22px;width:22px;border-width:0px; "   /></ td >
复制代码

 

根据源码,估计是因为网站没有找到图片资源所致,于是回到网站发布 目录,发现目录下的确并没有"/aspnet_client/system_web/2_0_50727/CrystalReportWebFormViewer4/images/toolbar/export.gif等等资源

网上有一说:IIS下没有此类资源的原因是: 没有安装   Crystal   Report   Web   Service,或者没有在IIS中注册。

  针对此类情况,通常的解决办法 是:

  安装   Crystal   Report   Web   Service:通过VS.NET安装,自动注册。   
  注册:首先进入MSDOS方式(可通过“开始”
- “运行...”,键入cmd,回车)。   
  将 C:\WINDOWS\Microsoft.NET\Framework\v1.
0.3705  作为当前目录,其中 C:\WINDOWS 根据操作系统的安装位置决定,v1. 0.3705  根据安装的  .NET FRAMEWORK   的版本决定。   
  键入   aspnet_regiis   
- i。   
  最后,在   IIS   中会出现一个   CrystalReportWebFormViewer   Web   共享目录。 

 

针对我的情况,联想到我没有使用IIS默认的网站,而我的发布目录中没有此文件夹,于是先到C:\inetpub\wwwroot中找,结果找到C:\inetpub\wwwroot\aspnet_client\system_web\2_0_50727\CrystalReportWebFormViewer4

正是我想要的,直接 拷到我的VS2008开发项目中,

 

 

重新编译、发布,于是在我的发布目录中出现了缺失的目录资源。重新运行网站,出现了相关图片

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值