Solved

Packaging  VB.net 2008 application with Crystal reports

Posted on 2011-03-07
15
973 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 4
15 Comments
 
LVL 101

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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 101

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 101

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
 
LVL 101

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

691 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