Results 1 to 12 of 12

Thread: [RESOLVED] Crystal Report: Object reference not set to an instance of an object

  1. #1

    Thread Starter
    Lively Member FunkySloth's Avatar
    Join Date
    Aug 2016
    Posts
    91

    Resolved [RESOLVED] Crystal Report: Object reference not set to an instance of an object

    Hi Guys,

    Hope everyone doing fine, I just need some help with this error that I'm getting when running my application made using VB.Net & VS 2010. When I open my crystal report files in design mode, it is working fine. However, when I run my application and open the module using those crystal report files and error prompt says Object reference not set to an instance of an object. I don't have any idea now what goes wrong, so I really appreciate for those who will guide me on this.

    BTW, this are the installed application related to my crystal report and I do have also a VS 2019 installed on my computer.

    Name:  Capture.jpg
Views: 4943
Size:  2.0 KB
    Name:  Capture1.jpg
Views: 5071
Size:  49.4 KB
    Name:  Capture2.jpg
Views: 4962
Size:  5.7 KB

    Thank you

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Crystal Report: Object reference not set to an instance of an object

    Take a look at the bin folder when you run the application outside of VS.
    Make sure the crystal report dll files are in there.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3

    Thread Starter
    Lively Member FunkySloth's Avatar
    Join Date
    Aug 2016
    Posts
    91

    Re: Crystal Report: Object reference not set to an instance of an object

    Hi Sapator,

    Thank you for reply, may I know if this is a CrystalReport.dll files or something else? And upon checking on my bin folder the only related on crystal report that in there where the following:

    Microsoft.ReportingServices.Interfaces - version 10.50.1600.1
    CrystalDecisions.Windows.Forms - version 13.0.1.220

    Thank you

    Edit:

    I just added some dll files in bin folder, but the object error still persist.

    CrystalDecisions.CrystalReports.Engine - version 13.0.27.3480
    CrystalDecisions.ReportSource - version 13.0.27.3480
    CrystalDecisions.Shared - version 13.0.27.3480
    CrystalDecisions.Web - version 13.0.27.3480
    Last edited by FunkySloth; Aug 6th, 2020 at 08:35 AM.

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Crystal Report: Object reference not set to an instance of an object

    A couple of things tho.
    If you are running this from another machine then you need to install the crystal report runtime in that machine.
    Also take a look at one folder that I am using crystal reports.
    There are other dll's but not sure if all are needed.
    Also there are known issues with CR if you are using a PDF .
    If nothing works you need to pinpoint the exact location on code that you get the error.

    Attachment 178208
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  5. #5

    Thread Starter
    Lively Member FunkySloth's Avatar
    Join Date
    Aug 2016
    Posts
    91

    Re: Crystal Report: Object reference not set to an instance of an object

    Hi Sapator,

    Unfortunately, the attachment give me this message "Invalid Attachment specified. If you followed a valid link, please notify the administrator".

    And may I know what crystal report runtime should I install that is compatible on what I have installed on my machine, base on the attachment that I posted?

    These were what I used:

    SAP Crystal Reports for Visual Studio (SP27) installation package for Microsoft Visual Studio IDE
    SAP Crystal Reports for Visual Studio (SP27) runtime engine for .NET framework MSI (64-bit)
    SAP Crystal Reports for Visual Studio (SP27) runtime (64-bit)


    BTW, I got the error Object reference not set to an instance of an object to all assignment of reports to ReportSource such as:

    Private rpt As New orderReport
    Me.CrystalReportViewer.ReportSource = rpt
    Last edited by FunkySloth; Aug 6th, 2020 at 09:12 AM.

  6. #6
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Crystal Report: Object reference not set to an instance of an object

    CrystalDecisions.CrystalReports.Engine.dll
    CrystalDecisions.ReportAppServer.ClientDoc.dll
    CrystalDecisions.ReportAppServer.CommLayer.dll
    CrystalDecisions.ReportAppServer.CommonControls.dll
    CrystalDecisions.ReportAppServer.CommonObjectModel.dll
    CrystalDecisions.ReportAppServer.Controllers.dll
    CrystalDecisions.ReportAppServer.CubeDefModel.dll
    CrystalDecisions.ReportAppServer.DataDefModel.dll
    CrystalDecisions.ReportAppServer.DataSetConversion.dll
    CrystalDecisions.ReportAppServer.ObjectFactory.dll
    CrystalDecisions.ReportAppServer.Prompting.dll
    CrystalDecisions.ReportAppServer.ReportDefModel.dll
    CrystalDecisions.ReportAppServer.XmlSerialize.dll
    CrystalDecisions.ReportSource.dll
    CrystalDecisions.Shared.dll
    (this might be the one) CrystalDecisions.Windows.Forms.dll
    You have 32 bit installed in your first picture. Try the 32 bit version.
    The fact that you don't have the CrystalDecisions.Windows.Forms.dll makes me suspicious.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  7. #7

    Thread Starter
    Lively Member FunkySloth's Avatar
    Join Date
    Aug 2016
    Posts
    91

    Re: Crystal Report: Object reference not set to an instance of an object

    Hi Sapator,

    By checking in my bin folder I have a CrystalDecisions.Windows.Forms.dll with the version of 13.0.1.220 and that is also the reference added on my project. Now I tried to replace the dll first in bin folder with the version 13.0.27.3480 and run the exe application the error persist.

    Should I replace the reference first in the project and rebuild it, is there a probability that this will work? My only concern is I don't see the version 13.0.1.220 in the list and might cause another problem if I remove it.

  8. #8
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Crystal Report: Object reference not set to an instance of an object

    I would suggest a clear remove of all the CR installed in Program and Features and then a restart of the machine and then install again.
    Also re - drag and drop any CR component in VS FORM
    Also what is the orderReport in Private rpt As New orderReport ?
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  9. #9

    Thread Starter
    Lively Member FunkySloth's Avatar
    Join Date
    Aug 2016
    Posts
    91

    Re: Crystal Report: Object reference not set to an instance of an object

    Hi Sapator,

    Alright I will do the re-installation and cr components. orderReport is the name of the crystal report file.
    Last edited by FunkySloth; Aug 6th, 2020 at 09:41 AM.

  10. #10
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Crystal Report: Object reference not set to an instance of an object

    What type is the Crystal Report File?
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  11. #11

    Thread Starter
    Lively Member FunkySloth's Avatar
    Join Date
    Aug 2016
    Posts
    91

    Re: Crystal Report: Object reference not set to an instance of an object

    I just tried to replace the 13.0.1.220 version reference on my project to 13.0.4000.0 (ofcourse I made a backup of my project first) and it's working fine now. Thank you very much for guiding me about this matter, really appreciate it. Have a good day ahead.

  12. #12
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: [RESOLVED] Crystal Report: Object reference not set to an instance of an object

    NP.
    You're welcome.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width