Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 246539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:10:51+00:00 2026-05-11T21:10:51+00:00

I have created a class which builds a Crystal report and displays it in

  • 0

I have created a class which builds a Crystal report and displays it in a report viewer.

However, without the Crystal Redistributable, the code crashes. How can I programatically detect whether the end-user has the Crystal DLL installed?

The code I am required to include is:

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:10:52+00:00Added an answer on May 11, 2026 at 9:10 pm

    I suppose Crystal installs to GAC.
    So you need to programmatically browse Global assembly cache and look for Crystal assembly there

    GAC can be programmatically managed thru Windows API.
    Here you will find a simple wrapper that allows to manage GAC from a managed code

    But I would not recommend you to go this way. 🙂

    The good solution is usually too check for all required assemblies during the installation of your software, I suppose Windows Installer has functions to check for assemblies

    However, it is not always OK.
    Suppose if you would like users to run your program even without Crystal, but do not allow show reports if Crystal is not installed.

    In this case you should decouple all Reports functionality from other forms. You should create a separate project with Crystal Reports functionality, let’s call it MyReports. Only that project should reference to Crystal assemblies, while other should not. Other projects also should not directly reference to MyReports.

    And finally you should use reflection to call a report viewer that is implemented inside MyReports from other projects.

    Usually you will write try / catch around the procedure where you will use reflection to load MyReports assembly from file. So, if Crystal or something else not exist, it will throw exception, you will display it to user, but the other parts of the program will work.

    Also, you can read about Dependency Injection design pattern, it helps to manage such problems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using C#. I have created a class which can be included in
I am using the apache library. I have created a class which sends a
In Java I have created the following class which extends ImageView to create a
I have created a class library called AddServiceLibrary in which I have a method
i have created a simple public ref class in the vc++ project, which is
I have created a class which extends HttpServlet in a package called controller I
I have successfully created a buildfile which builds my application. There is a dependency,
I have created a class called BasePage which inherits System.Web.UI.Page. On this page I've
I have a class which accumulates information about a set of objects, and can
I currently have a custom session handler class which simply builds on php's session

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.