Solved

Packaging  VB.net 2008 application with Crystal reports

Posted on 2011-03-07
15
943 Views
Last Modified: 2013-11-27
Dear experts,
I’m trying to create a package (using published folder) for my users. It’s my first time using Crystal report inside my app.
The  exe works fine on my machine. When I copy my publish folder the app works until I call a Crystal report where it says report "Failed to load".
Can someone explain the proper steps to packaging a VB.net 2008 app with Crystal for deployment on user  desktop?
Also does it matter if the files are local on Network drive?

Thanks
Cin
0
Comment
Question by:cin_champ
  • 7
  • 4
  • 4
15 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 150 total points
ID: 35059199
This tutorial addresses the  issue starting on page 434

http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

mlmcc
0
 
LVL 20

Expert Comment

by:hes
ID: 35059275
Are you using the Crystal Reports that comes with VS 2008 ?
If so there is no merge modlue. You will have to include the file CRRedist2008_x86.msi  (or x64 for 64 bit OS's) as an additions file in the setup package. And have the users run that before they run your application.
The file is located in the
"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5"

"CRRedist2008_x86.msi" (for 32bit)
"CRRedist2008_x64.msi" (for 64bit)

0
 

Author Comment

by:cin_champ
ID: 35060787

It's my first app deployment...Sorry tried both solutions... not working for me...

I'm using the CrystalReportViewer and Crystal 8.5 is already installed on the user machine.

My app is on my C drive, I want to be able to set it up on any desktop. My setup package seems to be looking for the files on my computer location on :c/cin/ Mynewapp folder instead of in the package on the user machine.

Can you explain( in the property tab Publish*) what is  the difference
 bet. the Publishing folder and the installation folder? I would like to setup the user app in the C:\program files folder.

Thanks
Cin

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35060915
I am rather surprised that CR8.5 works with VS2008.  I know I assumed you were using the Crystal that comes with VS2008 or even CR2008.

mlmcc
0
 

Author Comment

by:cin_champ
ID: 35061207
I am using the crystal that comes in the app I am deploying with VS2008 but we also use crystal 8.5 on most older VB apps.
Cin
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35061416
The 2 are quite different and there may be an issue if you are using CR8.5 files with your application.

Also CR8.5 may not ba able to be installed along sie other versions.  Crystal made some major changes in CR9 to allow more than one version to be able to be installed on a machine.

mlmcc
0
 

Author Comment

by:cin_champ
ID: 35061793
Crystal 8.5 and Report View work fine on my machine...

I think my problem is, in how I'm setting my package, I can't get that to work. The only time I got anything to work is by copying the publish folder in my project's bin folder. All is well until I try to open a Crystal Report and then I get "Load Report Failed".

Thanks
Cin


0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 100

Expert Comment

by:mlmcc
ID: 35063776
What is Report View?

What CrystalReportViewer  are you using?

mlmcc
0
 

Author Comment

by:cin_champ
ID: 35068784
CrystalDecisiion.windows.form.crystalReportViewer?

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Windows.Forms
Imports CrystalDecisions.ReportSource

Is this what you mean?
If not, could you please clarify?
Thanks
Cin

0
 
LVL 20

Expert Comment

by:hes
ID: 35069311
CR 10.5 is what comes with VS2008 and is not the Crystal Reports full blown version. You need to install the MSI I mentioned earlier on the client pc's
0
 

Author Comment

by:cin_champ
ID: 35070273
When I tried to run the MSI on this machine is says there is already an existing version.

I'm now using a test machine with no prior VB.net on it.

On this  test machine I was able to run the install Crystal 10.5.

But myapp is not working. I fist tried to put the release folder on that machine but everything now seems to point back to my  machine, defaulting into my own folder paths settings.

How do I  bring the application and reports over to this machine? Do I use the release folder or a app.published?
Neither seems to work for me now...

Cin
0
 
LVL 20

Expert Comment

by:hes
ID: 35070412
Create a setup project and create a msi
0
 

Author Comment

by:cin_champ
ID: 35096231
mlmcc & ges

The only way  I got my app to work was to build and take the Release folder (from the bin folder) and adjust my Crystal report path to match the new location inside my project. That's where my "Failed to load" error was coming from...
(The hard coded report path in my code was wrong once it got on the other desktop)

Guys can you tell me if this setup is OK? and what is the best practice for distributing .net apps in a small environment; can I put this on a server and have the user use the exe shortcut  or should it be on the user's desktop?

Thanks for your assistance
Cin
0
 
LVL 20

Accepted Solution

by:
hes earned 350 total points
ID: 35096492
The best practice where I work is to NEVER just COPY a folder to a PC. You create a Setup project in Visual Studio . For path's you create them under the Visual Studio project folder and add the folder as a dependency to the install and it will create it correctly no mater where the user installs your appliication.

Example:
In Visual Studio I have a Project1
VS creates the folder structure as
Project1
   Project1
       bin
       My Project
       obj

If I need to add some folders I create them in the Visual Studio Project and include them in the Setup project as dependent folders.
So Now I have

Project1
   Project1
       bin
           release
               MyFolder1
               MyFolder2
       My Project
       obj

In the code I look at
System.AppDomain.CurrentDomain.BaseDirectory() for the directory no matter where it is installed on the users PC.


0
 

Author Closing Comment

by:cin_champ
ID: 35096575
Thank you both for you time and assistance!
Cin
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now