Solved

Distributing Crystal Reports with a .NET solution

Posted on 2003-11-04
11
999 Views
Last Modified: 2012-08-14
OK, I've got the reports working in my app.  They are based on
strongly-typed DataSets instead of talking to the SQL Server.  (I'll
post a write-up of how this is done once I get it together in a Word
document in the Files section).

Here is my problem:  When I distribute my app and try to run a report
from it, I get this error message:

Load crpe32.dll failed

If I install the CR Redistributable, I don't get the message.  
However, I don't want to have to install this because every
installation requires me to enter our developer licence key and we
are not going to have control of the distribution.  I know it can be
done without this, but I just don't know what I'm doing wrong.

This is what I've done so far:
I installed the redistributable on my development machine.
I've included the following MSMs in my setup project:
crnetruntime
mapping
reportengine
dotnetcrystalreports
crystal_managed2003
VC_CRT
VC_SLT
License - including my development key in the properties of this file.

I have another solution that I've styled this setup project from and
everything looks fine, but I just can't get crystal reports to play
nicely.

Anyone have any ideas?
0
Comment
Question by:dimondwoof
11 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 9681721
0
 
LVL 10

Accepted Solution

by:
GoodJun earned 200 total points
ID: 9682183
Before you compile your setup project, make sure you put the license key property for the file installation properties.
0
 

Author Comment

by:dimondwoof
ID: 9682219
CR 9 - VS 2003 - VB.NET
0
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 

Author Comment

by:dimondwoof
ID: 9682265
GoodJun - Are you talking about something different than setting the license key in the License.MSM file?
0
 
LVL 10

Expert Comment

by:GoodJun
ID: 9682400
I am talking the regwiz.msm (or keycode.msm, they refer to the same thing in different documentation). I don't know the License.msm is the same thing or not?
I am using vs2002 and the cr shipped with vs.net.
0
 

Author Comment

by:dimondwoof
ID: 9682563
I think it is the same.  I tried to use the Crystal_RegWiz2003.MSM and had the same problem.
0
 
LVL 5

Assisted Solution

by:arvindb1
arvindb1 earned 200 total points
ID: 9683577
Create a setup and deployment project and follow step by step instructions provided in this guide.

http://support.crystaldecisions.com/communityCS/TechnicalPapers/crnet_deployment.pdf

Arvind
0
 

Author Comment

by:dimondwoof
ID: 9687375
I did that and now the setup package won't even run on the client machine.  It gets about 1/2 way done and throws a message listing a file (like CrystalDecisions.ReportAppServer.ClientDoc.dll, but it has thrown other, too) and says to check permissions on the directory, which it does NOT list.  I'm logged on to the machine as an administrator, so there are no directory restriction.  After the error, it reverses the install with no option.

The is SO frustrating.  I guess I have to pay Crystal's extortion fee to get them to tell me how to actually do this.  Have I mentioned that I HATE Crystal Reports?
0
 

Author Comment

by:dimondwoof
ID: 9695195
The document mentioned above did fix my problem EXCEPT the part where I needed to install the file cr90dbexwin_en.exe listed below.

For anyone out there that is struggling with this, these are the steps I took to fix this.  The configuration is VERY important, so if you're using any software other this this, you might need to do more research:

Windows 2000 Pro (not all that important)
Visual Studio 2003 (very important)
Crystal Reports 9 Upgrade (also refered to in the docs as a "full" version - also very important)
Reports in my project are filled using ADO.NET DataSets, NOT connecting to a data source like SQL.

Here are the quick and easy steps to getting this to work:
1. go out to Crystal Decisions web site and download the following:
  a. cr9netmergemodules - This is a zip file
  b. cr90dbexwin_en.exe
2. Install the cr90dbexwin_en.exe (required if you are using CR version 9 vs. version 9.2)
3. Expand the zip file.  These are the merge modules you'll need to add to your setup project.

In my setup project:
1. Add the merge modules from the zip file above.  The one you probably won't need to Mapping.msm because that is only for printing geographical information like maps.  Add your 19-digit key code (NOT the 10-digit registration number) to the License.msm.  The project won't build if you don't.
2. Add the following MSMs (this is where it is important to know which version of VS you are using.  These are for VS2003) - these files are required to get the reports that are based on the ADO.NET DataSets to work.
  a. VC_User_CRT71_RTL_X86_---.MSM
  b. VC_User_STL71_RTL_X86_---.MSM
3. IF you are using the FULL version of CR 9 - exclude the DotNetCrystalReports.msm from your dependancies folder.  This is VERY important.  The project will build and look normal (xcept you will get a list of warnings at the beginning of the build) but it will NOT install on the client because it's trying to install multiple versions of the same files in the client's GAC.  It will get part of the way through the install and throw an erronious message telling you to make sure you have permissions to some unknown directory.

Once I followed all these steps, I was able to get my app installed and the reports worked.

As for the reports themselves, this is what I did to get them to work:
I don't knwo if you have followed my posts so far, but I had reports that were written against a view n a SQL database.  To change them over to be based on DataSets, I did the following:

1. Build a strongly-typed DataSet in the app.  Do this by adding a data adapter to a form and generating a DataSet based on that.  You don't need to worry about permissions or anything like that, because the only reason for this is to generate the strongly-named dataset.  The result will end up as an XSD file in your project.  You have to base this on the view or table that the report is based on originally.  
2. Add the report to you app.
3. Right-click in the report window (but off of the report) and change the LocationSource from the database connection to the dataset you just generated.
4. In the function code that calls the report
  a. Create a new object based on the dataset.  
  b. Generate a table with your new data.  
  c. Add the table to the dataset object.
  d. Call the SetDataSource of the report.  Be sure to point to Table(1) of the dataset because when you add it to the dataset, it will be the second table (since this is a instance of the strongly-typed dataset that you created, there is already an empty table int he dataset.  Sounds weird, but that is what I found out).

If you try this and still have problems, you can contact me at keith.pinster@accent-inc.com.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10255799
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: GoodJun {http:#9682400} & arvindb1 {http:#9683577}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Alert on Server memory 2 37
.NET 2008 VB and C# 6 39
Need help deploying my first MVC.Net app with a SQL Server backend 3 25
Name Space error VS2015 1 22
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question