views:

1104

answers:

4

Hi,

I believe the conventional way to deploy Crystal Report with a .NET program is to set it as a prerequisite in the publish settings and then a .msi will be packaged with the ClickOnce files on the web/network/CD/wtv. When the user runs setup.exe, it will check whether Crystal Report is on the client computer. If not, it runs the Crystal Report .msi. But that will always require admin rights.

My question is, is it possible to package Crystal Report's dlls along with other application's output assemblies so that no explicit install is required? My application makes use of many many components and including a dll with the install is sufficient for most of them. Could I do the same with Crystal Report?

+2  A: 

I hate to be the bearer of bad news, but Crystal Reports for Visual Studio .NET is not designed for click-once deployment. Crystal Reports is a native application, and the assemblies you use to deal with the report depend on many non-.NET libraries.

Lots of COM objects that require registration, support DLL's that have to be installed... Licensing information that must be placed somewhere (Crystal Reports has always been big on licensing).

In theory, if your application is running full-trust you could monitor the installation of the Crystal Reports for .NET runtime, and duplicate it in c#, but that is a lot of work, and will be unreliable at best.

Sadly, the final answer is you can't.

You might check out Active Reports, or some of the other pure .NET reporting solutions.

Cub
Thanks for the answer. Just wondering however. My application deploys a bunch of dlls currently through ClickOnce. Most of them not too pretty. Lots of COM stuff, some of them pretty heavy weight. Everything else seems to work fine except Crystal Report. 3 of my other third party products require licensing too (DotNetBar, DevXpress and FarPoint). Can I theoretically do the same thing with Crystal Report and have it carried through ClickOnce via dlls?
Xster
+1  A: 

If you are dead-set on doing it yourself, you can monitor the installation of the Crystal Reports runtime to see what files/registry entries/settings it creates/modifies. Alternatively, you can decompile the msi or download and decompile the mst transform file from Crystal Reports. Once you know what it is doing, write something to do it yourself.

Cub
A: 

I am almost sure that there is a redistributable package of libraries that ships with the final version of Crystal Reports when you buy it (not sure if this package ships with the Visual Studio version).

j.a.estevan
Hi, but I think the redistributable is an .msi which requires admin rights to install. My intent is to let the user get my software over a ClickOnce package and install everything required locally without an admin
Xster
@Xster - "without an admin" is going to mean your ClickOnce app is **very limited** to what it can and cannot do (e.g. network access, file access).
Brett Veenstra
A: 

I'd provide a separate link to the Crystal Redistributable on the installation site and build a check in the ClickOnce app for the presence of the Crystal files.

Brett Veenstra