Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Access denied. Please check directory setting for files you can access.

$
0
0

Hi ,

I am trying to run this code but i am faceing strange issue with this code that the path is access denied

can you please advice ?

 

 

RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\Server\LocalConnectionMgr");

            if (key != null)

                tempFilePath = key.GetValue("ReportDirectoryPath").ToString();

 

 

            if (tempFilePath == "") //set the default

                tempFilePath = @"C:\Program Files\Business Objects\Crystal Reports 12.0\Samples\EN\Reports\";

 

 

            tempFilePath += @"NiceReporter\";

            if (!Directory.Exists(TempFilePath))

                Directory.CreateDirectory(TempFilePath);

            tempFilePath += "Evaluators Trend.rpt";

 

 

            CrystalDecisions.CrystalReports.Engine.ReportDocument rd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

            CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument boReportClientDocument;

            boReportClientDocument = new CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument();

            boReportClientDocument.ReportAppServer = System.Environment.MachineName;

            object path = (object)tempFilePath;

            boReportClientDocument.Open(ref path, 0);

 

thanks

Fade


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>