prob using ..\..\my.exe syntax to reach file in different subfol

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

What syntax can I use to reach an application file located in a different
subfolder than the exe file?

AppDir
l__Bin
l l__Debug
l l__my.exe
l
l__Reports
l__my.rdlc

I am invoking an rdlc file for running in the reportviewer control.
Originally, the rdlc file resided in AppDir, so I could use this syntax from
the exe:

reportViewer.LocalReport.ReportPath = "..\..\Report3.rdlc"

but now the rdlc reside in the Reports subfolder. I am trying to steer away
from hardcoding the path. How can I do this relatively?

Thanks,
Rich
 
I figured it out:

reportViewer.LocalReport.ReportPath = "..\..\Reports\Report3.rdlc"

I move to the root application folder then move to the desired subfoler.
 
Back
Top