CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 25th, 2004, 09:40 AM
    ramesh_cr ramesh_cr is offline
    Member
     
    Join Date: Jul 2003
    Posts: 28
    ramesh_cr is an unknown quantity at this point (<10)
    Angry Saving the ReportClientDocument

    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
    Reply With Quote
      #2    
    Old March 25th, 2004, 10:10 AM
    malleyo malleyo is offline
    Member +
     
    Join Date: Jul 2003
    Location: Florida
    Posts: 651
    malleyo has a spectacular aura about (125+)malleyo has a spectacular aura about (125+)
    I always access paths using a single backslash

    'D:\temp.rpt' instead of 'D:\\temp.rpt'
    __________________
    I'd rather be wakeboarding...
    Reply With Quote
      #3    
    Old March 25th, 2004, 10:13 AM
    ramesh_cr ramesh_cr is offline
    Member
     
    Join Date: Jul 2003
    Posts: 28
    ramesh_cr is an unknown quantity at this point (<10)
    I am using C# not VB.NET. So I have to use D:\\
    Reply With Quote
      #4    
    Old January 26th, 2009, 08:48 PM
    rogueenergy rogueenergy is offline
    Junior Member
     
    Join Date: Jan 2009
    Posts: 1
    rogueenergy is an unknown quantity at this point (<10)
    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.
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 12:52 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009