Skip to Content
0
Former Member
Mar 20, 2009 at 01:48 AM

How to know if Crystal Reports software is installed using Code?

671 Views

I have an we web-based application [(C#/ASP.NET/Crystal Report 11], which is throwing exceptions if user forget to install Crystal reports in the web-server. The exceptions are as below:

-


Error Messages Start----


(1) Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required

(2)

An unhandled exception occurred and the process was terminated.

Application ID: DefaultDomain

Process ID: 5188

Exception: System.Runtime.Serialization.SerializationException

Message: Type 'CrystalDecisions.CrystalReports.Engine.LoadSaveReportException' in Assembly 'CrystalDecisions.Shared, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is not marked as serializable.

StackTrace: at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)

at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)

at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)

at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)

at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)

at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeObject(Object obj, MemoryStream stm)

at System.AppDomain.Serialize(Object o)

at System.AppDomain.MarshalObject(Object o)

-


Error Messages End----


So I was wondering is there any way I can check to see programatically if Crystal Report is installed in web-server?

or, any other suggestion to make situation better will be helpful.

Thanks.