2 Replies - 2655 Views - Last Post: 02 May 2013 - 05:20 AM Rate Topic: -----

#1 thanzeem7   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 14-January 13

How to set the Report path in App.path VB.NET

Posted 02 May 2013 - 02:49 AM

Can anyone know how to set the Crystal Report path as App.path. Because in my project, the report path in LocalDisk(D:). I copy the debug folder to another computer with only one LocalDisk(C:). It display error. So i need the reports in app path. How i perform this?
Is This A Good Question/Topic? 0
  • +

Replies To: How to set the Report path in App.path VB.NET

#2 CharlieMay   User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1734
  • View blog
  • Posts: 5,710
  • Joined: 25-September 09

Re: How to set the Report path in App.path VB.NET

Posted 02 May 2013 - 05:03 AM

So how did you set the report path to D: ?

Using that same method you would change it to the Application.StartupPath. But I wouldn't do that. ProgramFiles is protected and could cause issues (maybe not since the report is read-only) but nevertheless, I would instead use the ApplicationData folder to store the report or some other specialfolder that is intended for the purpose of housing these types of files.

Here is a link to the SpecialFolders Enum which will explain better
Was This Post Helpful? 2
  • +
  • -

#3 AdamSpeight2008   User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: How to set the Report path in App.path VB.NET

Posted 02 May 2013 - 05:20 AM

I agree with CharlieMay create a folder in ApplicationData.
For example use the follow folder structure.
/Company
  /Application Name
    /Version#
      /Data
    /Version#
      /Data


Don't forget about My.Computer.FileSystem.SpecialDirectories. for easier access to the path names.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1