on 03-15-2012 8:57 PM
I need a way to determine if the cr runtime is installed before attempting to run any reports and getting the message " An error has occurred while attempting to load the Crystal Reports runtime. Either the Crystal Reports registry key permissions are insufficient, or the Crystal Reports runtime is not installed correctly. .........."
I am appreciative of any available assistance.
Thank you, Doyle
No quick; here is how to do it. Couple of ideas:
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've been able to follow Bushan's advice and check the GAC programmaticly via a call (in C#) such as this:
try
{
//13.0.2000.0 is Crystal Reports for VS 2010
var a = System.Reflection.Assembly.Load("CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral,PublicKeyToken=692fbea5521e1304");
}
catch (System.IO.FileNotFoundException)
{
//Not Installed
}
catch
{
//Runtime is in GAC but something else prevents it from loading. (bad install?, etc)
}
However, I've discovered, that the Full Assembly name used above in the Load call is the exact same for all four of the following versions of the runtime:
My application is 32 bit and will crash if the 64bit runtime is installed. Is there an additional check that can be used to check whether the 32 or 64 bit runtime was installed? And even whether SP1 or SP2 is installed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the 64 bit runtime is already there, then it will be in the C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64 directory. Perhaps you can search for that. Alternatively the Registry can also be searched for the 64 bit install.
The more interesting thing is that your 32 bit app crashes if there is the 64 bit runtime - perhaps a subject for another forum post(?).
- Ludek
Thanks Ludek,
Do you know the specifics for searching the registry? (What keys and values to look for?) I don't want to rely on a directory location as it could be installed in a custom location. Also different versions of Windows could install it in different default locations:
I'll have to revisit internally the specifics of my comment regarding crashing with the 64bit runtime installed. I'll get more specifics, dive into it deeper, and formulate a forum post as necessary.
The following are the keys that get created on install of CRVS2010, 32 and 64 bit:
HKEY_CURRENT_USER\Software\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0
HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0
- Ludek
We use a software installation tool that includes predefined scripts to find out if the crystal reports runtime is installed or not.
I am not completely sure how the script works but looking at it, it appears that it checks whether a windows installer setup is presently installed on the system by using the windows installer Product Code (Guid).
In order to see if the 32 bit runtime is installed it looks for GUID: {8D6181F3-CACB-4B48-8B08-981F3A7F318B}
In order to see if the 64 bit runtime is installed it looks for GUID: {0441D301-5C34-4DC6-B7C8-0727344AA220}
Two questions for Ludek or someone from SAP:
1) Is this not a bullet proof way of knowing if the crystal reports runtime is install or not assuming we use the provided msi to install the runtimes?
2) Are those GUID values the same for the original msi as well as the msi used to install SP1 and SP2 runtimes?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check for 'CrystalDecisions.CrystalReports.Engine' assembly at
C:\Windows\assembly folder (GAC)
To check the version Right click on the above dll, go to properties , click the version tab.
- Bhushan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.