Skip to main content

Related Articles

Crystal Report Toolbar Images Not Displayed In ASP.NET

If you have used Crystal Report (Crystal Reports 2008 Official Guide) with Microsoft ASP.NET, you might have face this issue many times. This is a common problem with Crystal Report deployment and many people don't have proper solution for the problem. Crystal Report Toolbar images not shown in deployed environment is one of the main inconvenient with the tool that is leaded many developers not to use Crystal Report tool as their reporting tool even though Microsoft Visual Studio distribute Business Objects Crystal Report Tools free of charge. Even though your report is perfectly working inside the report viewer, it is not useful if the report viewers toolbar is not working properly. You can not navigate through multiple pages, can not export your report, can not print the report...etc. So that it is equally important to work your report and report viewer both correctly to feel end user happy reporting experience.



I have found few ways to overcome this issue and first solution is install Crystal Report Components for .NET using your Visual Studio Installation CD/DVD set. This method is applicable most of the time Vista operating system and XP with newly patches. I have experienced even though the the installation goes well, still problem might persist due to some problems of locating the installed images. Here you need understand that if the installation went well the required images will copy into your hard drive, but some cases the report viewer is unable to locate them. If the problem is still persist you can go into next solution where install "crredist2005_x86.msi" from SAP website or Upgrade Crystal Reports 2008 Win Nul. Business Object's Crystal Report Viewer is distributed by SAP and they have provide installation for Crystal Report Views as well. In same way you can install this msi file and check whether your problem is solved. This will install "Crystal Reports for .NET Framework 2.0 (x86)" into the system and it is having all the necessary components to run your report in crystal report viewer.

Above two methods are not very specific and blindly hit the target. But try them first and most of the time you will get happy results. But still if you are getting same error you have another method. After install above components and still you have error means all necessary components have been installed properly but your report viewer is unable to locate the images. Then easies them is locate your image file location and register with your report viewer. How you can do this? This depends on the way you have programmed your report. You have basically two methods to program either you can define all the parameters when your create your report viewer.


Fig 1: CR:CrystalReportViewer code section
or if you drag and drop the report viewer control from toolbox of visual studio editor it will insert the report viewer component separately and it takes all the configuration details by including "default.css" style sheet from "C:\inetpub\wwwroot\aspnet_client\system_web\2_0_50727\CrystalReportWebFormViewer3\css\default.css" in header section of the page.


Fig 2: "aspnet_client" location include from page header section

In both methods is has been loaded files from the same location. aspnet_client folder is normally locate under "C:\inetpub\wwwroot\aspnet_client" if you use default configurations while you installing IIS server. Now you know the place where your toolbar image files are located, but why the system is unable to locate them? Due to various reasons this might be happened. Whatever the reason if we could tell the IIS server where these image files are located, your problem is solved and report will work fine. So the easiest method to define files in any location IIS server manager is to create a virtual directory. If you analyze the above two code sections you will notice that all the path have been defined with respect to "aspnet_client" folder. So that you need to create virtual directory under your web site which will locate the "aspnet_client" folder.

Fig 3: Add Virtual Directory To Web Site


Virtual directory alias should be "aspnet_client" and browse the "aspnet_client" folder from physical path field. Reset you IIS server and browse your web site and see how your report viewer is loading your report without any error.

Still you are facing any issues, please feel free to mention them under comment section so that we can find solution for them as well.
Good Luck !
Find more details Crystal Reports 2008: The Complete Reference (Osborne Complete Reference Series)

Comments

  1. Thanks a lot bro, i found that article extremly helpful for me.

    regrads,
    "SOHAIL" from Pakistan.

    ReplyDelete
  2. Thank you alot
    I can view teh images now
    Pishkari from IRAN

    ReplyDelete
  3. Extremely helpful article. Thank you!

    ReplyDelete
  4. You are a real Genius.. Thank you so much

    ReplyDelete
  5. 問題解決了!!!Thanks!

    ReplyDelete
  6. wow this realy works.Thank you so much.

    Regards,
    Sunil Nikam
    (India)

    ReplyDelete
  7. Hi All,

    I added a image(my company logo)on my crystal report (version CR2008), and integrated with VS2005 asp.net webapplication , image was displayed on my report. and my code is here

    CrystalReport1 oRpt = new CrystalReport1();
    CrystalReportViewer1.ReportSource= oRpt;

    but at the runtime i was unable to find image on the crystal report. its like "X image"(image box displaying.

    How can i solve this problem.

    ReplyDelete
  8. Really really gr8 solutions...thanks a lot bro!!

    ReplyDelete

Post a Comment

Popular posts from this blog

Angular PrimeNG checkboxes styling and events handling

  Getting Started With PrimeNG Styling in Angular App This chapter I am planning to show how you can handle events of the checkboxes. For that I will use checkbox for every card to place the order.  To use PrimeNG checkboxes you have to import checkbox module in app.module.ts file. import {CheckboxModule} from 'primeng/checkbox'; import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { LandingComponent } from './modules/landing/landing.component'; import { HomeComponent } from './modules/home/home.component'; import { CardModule } from 'primeng/card'; import {CheckboxModule} from 'primeng/checkbox'; @NgModule({ declarations: [ AppComponent, LandingComponent, HomeComponent ], imports: [ BrowserModule, AppRoutingModule, CardModu

The Power of ChatGPT and Whisper Models

A Deep Dive into Natural Language Processing Natural Language Processing (NLP) has seen a significant boost in recent years due to advancements in artificial intelligence and machine learning. Two models that have shown remarkable success in NLP are ChatGPT and Whisper. In this article, we will delve into the power of these models and their applications in the field of NLP. ChatGPT is a transformer-based language model developed by OpenAI that uses unsupervised learning to predict the next word in a sentence based on the context of previous words. ChatGPT is a generative model that is trained on large datasets of text, such as books and articles, and can be fine-tuned for specific tasks, such as question-answering or dialogue generation. ChatGPT is known for its ability to produce human-like text, making it an ideal tool for applications such as chatbots, content creation, and language translation. Whisper, on the other hand, is a paraphrasing model developed by Google that is based on

Getting Started With PrimeNG Styling in Angular App

  This chapter I am going to explain how you can do the styling to our flower store app. There are different kind of CSS frameworks you can use to style you app. Such as: 1.        Angular Material 2.        ngx-bootstrap 3.        NG bootstrap 4.        Prime NG   I am planning to use PrimeNG styling framework to style our flower store app. PrimeNG has more than 80 UI component and it is a collection of rich UI components for Angular. All widgets are open source and free to use under MIT License.   How to Install Prime NG 1.     Run   npm install primeng –save  inside your root folder.                    2.        Run npm install primeicons –save to install prime icons. 3.        Run npm install font-awesome --save to Install Font Awesome 4.        Run npm install @angular/cdk –save to install angular  component dev kit. Now we are done with installing Prime NG to out flower store app. If you check your package json you will see below list of libraries.