Solve the problem that the toolbar icon is not displayed in the Crystal Report of ASP. Ne page.

Source: Internet
Author: User

Development Environment: vs2008 and Crystal Report 2008

The developed website does not use the system's default wwwroot directory, but creates another Directory D: \ published as the directory of the website.

Using Crystal report2008 to develop reports in vs2008, the display is normal, but when published to the website, the Crystal Report page does not have images, such as, but works normally.

Find the cause, analyze the webpage source code, and find the Code as follows:

<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>

 

According to the source code, it is estimated that the website did not find image resources, so it returned to the website release directory, the directory does not contain resources such as "/aspnet_client/system_web/2_0_50727/crystalreportwebformviewer4/images/toolbar/export.gif ".

The reason why IIS does not have such resources is that the crystal report web service is not installed or is not registered in IIS.

The common solution to this problem is:

Code

Install crystal report Web Service: it is automatically registered through vs. net.
Register: first enter the msdos mode (you can choose "start"> "Run...", type cmd, and press Enter ).
Set c: \ windows \ microsoft. net \ framework \ v1.0.3705 as the current directory, where C: \ WINDOWS depends on the operating system installation location, v1.0.3705 depends on the installation.. NET Framework version.
Type aspnet_regiis-I.
Finally, a crystalreportwebformviewer web shared directory appears in IIS.

 

In my case, I think I didn't use the default IIS website, but I didn't have this folder in my release directory. So I first searched for it in c: \ Inetpub \ wwwroot and found C: \ Inetpub \ wwwroot \ aspnet_client \ system_web \ 2_0_50727 \ crystalreportwebformviewer4

I just want to copy it to my vs2008 development project,

 

 

Re-compile and release, so the missing directory resources appear in my release directory. Re-run the website and a picture is displayed.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.