Deploy Crystal Report dlls only using ClickOnce without using prerequisite .msi - deployment

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?

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.

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.

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).

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.

You can add CR runtime merge module to your click-one MSI package, MSI will take care of merge module installation, It merges crystal report runtime installation files\process to your application click-one package.
https://origin.softwaredownloads.sap.com/public/site/index.html

Related

Migrating ASP.NET 2005 to 2010 issue with crystal report reference.[ transferred my site from Wserver 2003 to wserver 2013 ]

Could not load file or assembly 'CrystalDecisions.Shared, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
Crystal can be, touchy to deploy and run if it's not your server (e.g. you don't have access to deploy there and possibly make tweaks). If it's your server, not a problem. Go get the Crystal merge modules from sap.com and install them on your server, then you will just need to reference them in your web.config. You may run into other issues with permissions (Crystal in some circumstances uses the C:\Windows\Temp directory to export files which hosted servers will at lot of times prevent you from using, I assume this is a throw back to the fact their codebase dates back to the Windows 3.x era).
I'm going to provide the links to the downloads page at SAP:
http://wiki.scn.sap.com/wiki/pages/viewpage.action?original_fqdn=wiki.sdn.sap.com&pageId=56787567
You're using version 10.2 (which is pretty old, Crystal is pretty good about backwards compatibility so if you're in a pinch you can use newer Crystal DLL's and they should export your reports fine).

Crystal Reports - applications with embedded reports

I have a SQL server database on my customer's server which is accessed by aprox 20 users through a winforms client application installed on individual machines.
I was thinking of using Crystal Reports to produce management reports etc and embedding this into my winforms application. However would this mean that crystal reports needs to be installed on every individual client machine, or just on the server?
For winforms you will need to install the Crystal Reports Runtime on the client machines so that they can view and interact with your Reports. You should be able to get the Runtime (msi) from SAP's website or sometimes it will come with your download when you purchase/download the software online (that was the case for me when I got the dev version for 2012).
SAP Crystal Reports, developer version for Microsoft Visual Studio - 2012 Now Available for Download
If that is not your version just Google for your specifics and you should be able to find what what you need.
BukHix is right, you need to install the runtime on each machine.
If you don't want to do this you can consider implementing a report scheduler, which will run the reports on the server and will deliver them to the management as excel, pdf or any other applicable file type

Crystal reports database connection issues

Failed to load database information. Details: The database DLL crdb_ado.dll could not be loaded. Error in File (filename) Failed to load database information.
I am receiving this error when i try to run a crystal report from my page. on the server I have installed the CRRedist2008_x86 and the dll file is in the business objects folder, but for some reason it is still not loading. I also checked to make sure I have the msvcp60.dll which is also needed but still am unable to run the report.
The server is running Windows Server 2008, has Visual Studio 2005 installed on it (not sure if that makes any difference). The application ran fine on my local machine, but after uploading it to the server, it's not wanting to play nice.
Any suggestions/help is appreciated.
Thank You
You should get Dependency Walker and open the crdb_ado.dll to confirm all the required files are there. Although checking for msvcp60.dll is generally the right idea, I've found that people are often looking for the wrong version of those files OR that other required DLLs are also missing.
Also, be sure the redist you are using matches the version of Crystal Reports you have referenced in your project. There is a difference between using, say Crystal Reports 2008 on top of Visual Studio 2005,, versus using the BUNDLED Crystal Reports that comes with Visual Studio 2005 (Or 2008, or 2010 for that matter.).
In fact, sometimes people don't realize that their .NET projects are referencing the "comes with Visual Studio" edition of Crystal Reports because they happen to have Crystal Reports version <whatever> installed on their PC.
That said, if you are pretty confident your redist of CRRedist2008_x86 matches what you are using, I'd focus on Dependency Walker to see if it is indicating a missing required file for the crdb_ado.dll.

how we can create an exe file to install jasper report server with our reports and database?

I am trying to create an exe file to install jasper report server with our reports and database. I just want to know how could be integrate my reports and database with jasper server exe file.
Use the import and export tools for jasper server to get your reports from e.g. development into production. This is all documented in the books.
You can bundle the installer for jasper and your database, the database server, the database dump with the reports and anything else you need as well as a script that installs it all together into a bundle. E.g. using Apache Maven with the app-assembler plugin. There are too many different ways to do it. You are basically automating the install and that would vary a LOT based on your needs. E.g. you could also look at puppet or chef or all sorts of installer solutions.
The best example is probably the JasperServer installer itself with the sample reports.. you could just take that and modify it to suit your needs (caveat... not sure about the license situation for doing that..).

Detecting x86/x64 and installing correct .msi

I am finalizing an application that will soon be submitted for Windows Logo Program validation. One of the requirements is x64 compatibility. Specifically, Crystal Reports 2008 must work under x64.
My problem is that Crystal Reports basic 2008 (the one packaged with Visual Studio 2008) has no merge modules and must be installed using the provided .msi installers. They offer separate installers for x86 and x64.
So how would I detect x86 and x64 during install and then run the appropriate Crystal msi? Is this even possible without merge modules?
EDIT:
This:
IF PROCESSOR_ARCHITECTURE == x86 AND
PROCESSOR_ARCHITEW6432 NOT DEFINED THEN
// OS is 32bit
ELSE
// OS is 64bit
END IF
seems to tell me how to detect it (thanks MicSim). But how do I perform this in an MSI? Is it a custom action? And then how do I trigger different required msi's for the x32 and x64 crystal reports?
And why doesn't the x86 crystal installer work under WOW64? You have to install x64 Crystal to work with your WOW64 x86 app. Frustrating...
EDIT 2:
Okay, so detecting x86/x64 seems to be covered here. Now how about manually triggering an msi of your choosing?
The easiest way I have found to detect a 64-bit operating system is to use the VersionNT64 property. This property can be used in conditions for components or custom actions (eg. the condition Not VersionNT64 will only be true for 32-bit operating systems).
As for installing other MSI packages during your installation, that is a little trickier. Windows Installer will only allow one MSI to be running the Execute Sequence at a time. This means that you must either install your Crystal Reports MSI during the UI Sequence using a custom action (be careful if you do this, the UI Sequence is skipped if the MSI is run in silent mode), or create some kind of bootstrapper program that will run both the Crystal Reports MSI and your own in sequence.
I have never created my own bootstrapper, but InstallShield has a bootstrapper program built into their setup.exe; they call packages installed this way prerequisites.
Just googled it: If you have an MSI project you could check the properties like described here.
For further information about detecting process and OS architecture you might want to read this MSDN blog about "HOWTO: Detect Process Bitness".
You can trigger the Crystal Reports MSI with a custom action that executes [SystemFolder]msiexec. Just specify "/i [YourFolderWithCRMSI]msiname.msi" as the arguments.
According to this forum, Crystal Reports now includes a merge module for visual studio 2008.
HREF=https://smpdl.sap-ag.de/~sapidp/012002523100005986132008E/cr10_net_mm.zip
Edit (from the author): It turns out that this doesn't work for the Crystal Reports that comes bundled with Visual Studio 2008.