Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setup and Deployment 2

Status
Not open for further replies.

Juice05

Programmer
Dec 4, 2001
247
US
I have created a VB.NET application for a client and need to create an msi so that they can install the application on client machines. My question is, I have a few Crystal reports that will be saved locally on each machine. First, how do I ensure that these files are included in the setup (I think I have this one figured out). Secondly, how do I code my report document (The one that loads the report) to know where to look for the report?

i.e.

Dim repDoc As New ReportDocument()

repDoc.Load("c:\Customers.rpt")

If this doesn't make sense I can further explain it...
 
If I'm understanding you correctly, you want to know where to put your reports. The "easiest" way is to just put them all in the app's directory and then call them without the preceeding drive\directory structure.

The "best" (imo), is to set up a reports directory, add an entry in your config file that gives the directory, then get the directory from your config file and append it to the beginning of the report you need to call. If you're not familiar with the config file, do a search here for Resource Manager and/or Config File. It's been discussed a few times before.
 
rightclick on your setup project go to view and then file system. Now in application forlde you can create extra folder's (rightclick add-folder) for example reports and then go to that folder just do add-file and choose the files you want to add in there. to make sure you can test your program like the user would have it make the same folder in the binfolder of your project and copy your reports in to that folder. And reference the files in the setup project to that folder.

then you just have to concat the name of the report with System.Windows.Forms.Application.StartupPath

Christiaan Baes
Belgium

"My new site" - Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top