cancel
Showing results for 
Search instead for 
Did you mean: 

Can I get the Version a Crystal Report Was Designed Against

Former Member
0 Kudos

Hi,

I'm working on a web application developed in C# using the Crystal Reports runtime 10.5 that came with Visual Studio.

What I am trying to do is to check the version of a Report File that the application is trying to run before actually running it.

So that a Report written in Crystal Reports 11 can be flagged as being potentially incompatiable (as it may contain new features not supported by the runtime).

Is there any way to get this version number in C# code?

Any help would be much appreciated.

Thanks

Steve

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Steve,

If you want to check the version of CR runtimes on deployment machine than you can check it through the "web.config" file.

"web.config" file contains the version of CR which being used by the web application.

please correct me if I misunderstood your question.

Regards,

Amit

Former Member
0 Kudos

Thanks for the reply.

In the application I'm working on people can write and upload their own Crystal Reports. The application then runs these reports for them (also doing other things such as exporting (PDF) and emailing the report).

At the minute, and in past releases the application uses the 10.5.3700.0 runtime. Everything functions fine in the application.

My only concern is that a user could write a report in Crystal 2008 using functionality that is in Crystal 2008 but not supported by the 10.5.3700.0 runtime.

Therefore when a user uploads a report I was hoping to analyse the rpt file to find out what version they used to design the report. Then if it is not designed in version 10, inform them that some functionality may not be supported by the current runtime.

I've had a go through code and found a property called MajorVersion which seemed to be just what I wanted, but it was Non-Public so unfortunately this wasn't available to use.

((CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper)((CrystalDecisions.CrystalReports.Engine.EngineObjectBase)(sInfo)).m_rasRptClientDoc).MajorVersion

I was hoping to go for this solution of warning users rather than compiling using the Crystal 2008 runtime, as updating the runtime may incur a cost to current customers who are happy using 10.5.3700.0.

I hope that is a bit clearer.

Answers (1)

Answers (1)

0 Kudos

No API to get the report version in .NET