| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I am not able to save a port which is created using ReportClientDocument. I am using the following Code. m_crReportDocument = new ReportClientDocument(); Object path = new object(); path = "D:\\"; m_crReportDocument.SaveAs("Temp.rpt", ref path, 1); It gives the following error Access denied. Please check directory setting for files you can access. System.Runtime.InteropServices.COMException: Access denied. Please check directory setting for files you can access. I gave permissions to D: drive for LocalComputer\ASPNET also. Even I Tried giving "D:\\temp.rpt" for Path Any Ideas? Thanks Ramesh |
|
#2
|
|||
|
|||
|
I always access paths using a single backslash
'D:\temp.rpt' instead of 'D:\\temp.rpt'
__________________
I'd rather be wakeboarding... |
|
#3
|
|||
|
|||
|
I am using C# not VB.NET. So I have to use D:\\
|
|
#4
|
|||
|
|||
|
Re: Saving the ReportClientDocument
I'm completely new to this, but your post helped me to save a copy of my file, so I'll share what I have in hopes that it helps you in turn.
I declare the ReportDocument then the ReportClientDocument once the ReportDocument is loaded: ReportDocument crDoc; crDoc = new ReportDocument(); crDoc.Load("C:\\SomeReport.rpt"); ISCDReportClientDocument reportClientDoc = crDoc.ReportClientDocument; object path = new object(); path = "C:\\"; reportClientDoc.SaveAs("Test", ref path, 1); Hope this helps you. Though guessing by the date of your post it might not. But maybe it will help someone else who's looking for a similar solution. |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|