how do i reference files in the User's Application Data Folder when deployed

  • Thread starter Thread starter tigger
  • Start date Start date
T

tigger

hi

i have a report which i wish to reference from within the program
this is what i am currently using which is fine on my local computer.
crystalReportViewer1.ReportSource = "C:\\\\Documents and
Settings\\\\tigger\\\\My Documents\\\\Visual Studio
Projects\\\\theProgram\\\\Report.rpt";

but i wish to deploy the program how do i reference the report after i have
deployed it.
i have created a deployment project and have added the Report.rpt file into
the User's Application Data Folder.

thanks
tigger
 
Use
System.Environment.GetFolderPath(System.Environment.SpecialFolder.Applicatio
nData) for accessing the folder.
It returns a string that gives you the path.

Cheers,
Branimir
 
Back
Top