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.
muthu kumarPosted Jun 3, 2010, 5:58 AM
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
Jaish MathewsPosted Apr 7, 2010, 1:29 AM
Think Server.MapPath is a short cut up to your web root folder. Beyond if any hierarchy is there, you need to fill.