I have a very basic question. I was trying to export my CR file to PDF for that i used
string repFilePath = Server.MapPath("RadTechPublicReport.rpt");
It gave me an error say the path was not correct.
So i looked around and found that the it was missing a folder so then I replace the above code with
string repFilePath = Server.MapPath(@"Reports\RadTechPublicReport.rpt");
Now my question is why did MapPath not recognize Reports
Please if any one can answer this question.

Jaish MathewsRank #225 · 11K reputationPosted Apr 6, 2010, 9:29 PM EDT
Think Server.MapPath is a short cut up to your web root folder. Beyond if any hierarchy is there, you need to fill.
muthu kumar3 reputationPosted Jun 3, 2010, 1:58 AM EDT
You need to specify a sub folder's name because server.mappath searches for the root's element and it will be more specific when you provide subdirectory for sub-directory-wise searching of the File existence