none
C# visual studio 2017 report load error RRS feed

  • Question

  •        

    Hi Friends,

    Please help me as I am trying to call crystal report from visual studio 2017 on computer where visual studio installed its calling crystal reports and working fine but when I am running the same from another computer its give me report load error I checked crystal report available in given path please help me me code given below. thank you

    dview cc = new dview();

                ReportDocument cryRpt;

                cryRpt = new ReportDocument();

                cryRpt.Load(@"C:\\Users\\administrator\\Desktop\\dailyincomeInterface\\bin\\Debug\\iprefund.rpt");
                cryRpt.SetDataSource(dt);
                cc.crystalReportViewer1.ReportSource = cryRpt;

                cc.crystalReportViewer1.Refresh();
                cc.ShowDialog();

     

    asad

    • Moved by CoolDadTx Friday, October 11, 2019 1:59 PM Third party product
    Thursday, October 10, 2019 12:13 PM

All replies

  • Hi Friends,

    Please I am encountering problem with C# when calling crystal reports, crystal report running fine on computer where visual studio 2017  installed , but when I call from another computer client its giving Please error I am encountering  as wel my code as followed even I installed crystal report run time on client 

                ReportDocument prtdoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
                dview cc = new dview();
                prtdoc = new iprefund();
                prtdoc.SetDataSource(dt);
                cc.crystalReportViewer1.ReportSource = prtdoc;
                cc.ShowDialog();

    


    asad


    Thursday, October 10, 2019 8:12 AM
  • Does this path exists on the computer crashing? And why are you using bin\debug as that is for a development environment

    C:\\Users\\administrator\\Desktop\\dailyincomeInterface\\bin\\Debug

    What is the build action? Perfer 32bit, 32 or 64x ? Try changing this,

    Also since this is a third party library you should ask here

    https://community.sap.com/topics/


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, October 10, 2019 1:14 PM
  • thank you for reply, I am using 64bit and I check path exist please help me 

    asad

    Thursday, October 10, 2019 1:48 PM
  • Is the other computer a 64x machine?

    Since Visual Studio is not available wrap the code in a try-catch and write the error information to a text log file.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, October 10, 2019 2:12 PM
  • yes I it also 64bit with crystal report runtime installed, I am surprised its working fine in development environment but when we are running from another computer its give me load error.  

    asad

    Thursday, October 10, 2019 2:51 PM
  • yes I it also 64bit with crystal report runtime installed, I am surprised its working fine in development environment but when we are running from another computer its give me load error.  

    asad

    Common reasons why a program done in Visual Studio failing on a computer without Visual Studio.

    • Wrong build (already mentioned)
    • Base DLL's on the machines differ (system or project related) which may be from different versions of Windows or same version with different service patches
    • Corrupt .NET Framework under Windows folder on the client machine

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, October 10, 2019 3:12 PM
  • thank u for reply, means I will use the windows version on development as well when on deploying machine, how I can fix corrupt .net framework just to reinstall?, and how i can handle wrong build 

    thank you.

    regards


    asad

    Thursday, October 10, 2019 3:28 PM
  • To fix a corrupt Framework install over the current version being targeted e.g.

    https://dotnet.microsoft.com/download/dotnet-framework/net472

    https://dotnet.microsoft.com/download

    Try different builds e.g.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, October 10, 2019 4:36 PM
  • "Load Report Failed" is from Crytal Reports, so I doubt has anything to do with corrupt .Net framwork.
    see Troubleshooting the “Load Report Failed” Error

    and btw.: posting the call stack and exception type instead of this useless screenshot could help

    • Edited by EckiS Thursday, October 10, 2019 4:46 PM
    Thursday, October 10, 2019 4:45 PM
  • Please find below the error details I am encountering thank you

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: The document has not been opened.
       at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.get_ReportAppServer()
       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.get_ReportAppServer()
       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
       --- End of inner exception stack trace ---
       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
       at dailyincomeInterface.DailyIncome_interface.button30_Click(Object sender, EventArgs e) in E:\Softwares\mydrve\today\dailyincomeInterface\dailyincomeInterface\Form1.cs:line 1594
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
    ----------------------------------------
    dailyincomeInterface
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/dailyincomeInterface.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Data
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Core
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Transactions
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------
    System.EnterpriseServices
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    ----------------------------------------
    System.Numerics
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
    ----------------------------------------
    CrystalDecisions.CrystalReports.Engine
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.CrystalReports.Engine.DLL
    ----------------------------------------
    CrystalDecisions.Shared
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.Shared.DLL
    ----------------------------------------
    CrystalDecisions.Windows.Forms
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.Windows.Forms.DLL
    ----------------------------------------
    CrystalDecisions.ReportSource
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.ReportSource.DLL
    ----------------------------------------
    System.Web
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
    ----------------------------------------
    log4net
        Assembly Version: 1.2.10.0
        Win32 Version: 1.2.10.0
        CodeBase: file:///C:/Windows/assembly/GAC_64/log4net/1.2.10.0__692fbea5521e1304/log4net.dll
    ----------------------------------------
    CrystalDecisions.ReportAppServer.CommLayer
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.ReportAppServer.CommLayer.DLL
    ----------------------------------------
    CrystalDecisions.ReportAppServer.DataSetConversion
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.ReportAppServer.DataSetConversion.DLL
    ----------------------------------------
    CrystalDecisions.ReportAppServer.ClientDoc
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.ReportAppServer.ClientDoc.DLL
    ----------------------------------------
    CrystalDecisions.ReportAppServer.DataDefModel
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.ReportAppServer.DataDefModel.DLL
    ----------------------------------------
    CrystalDecisions.ReportAppServer.CubeDefModel
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.ReportAppServer.CubeDefModel.DLL
    ----------------------------------------
    CrystalDecisions.ReportAppServer.ReportDefModel
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.ReportAppServer.ReportDefModel.DLL
    ----------------------------------------
    CrystalDecisions.ReportAppServer.Controllers
        Assembly Version: 13.0.3500.0
        Win32 Version: 13.0.22.2668
        CodeBase: file://423m/MIS%20Shared/Rubi%20Queen/dailyincomeInterface/dailyincomeInterface/bin/Debug/CrystalDecisions.ReportAppServer.Controllers.DLL
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.


    asad

    Friday, October 11, 2019 3:58 AM
  • When the document I linked does not help: ask in the forum linked to by Karen
    Friday, October 11, 2019 4:10 AM
  • Please what is the solution help me thank you

    asad

    Friday, October 11, 2019 4:58 AM
  • Hi malikasad, 

    Thank you for posting here.

    I note that crystal report is a third-party product, unfortunately we don't provide support for third party products in the forums, so questions specifically related to using the third party API, as Kareninstructor suggested, you'll need to post in crystal report forums.

    The C# forum is for C# related question, we discuss and ask the C# programming language, IDE, libraries, samples and tools here.

    Thank you for your understanding.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 11, 2019 8:25 AM