Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Packaging  VB.net 2008 application with Crystal reports

Posted on 2011-03-07
15
Medium Priority
?
992 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 101

Assisted Solution

by:mlmcc
mlmcc earned 600 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 1400 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

578 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