-
Aug 6th, 2020, 08:01 AM
#1
Thread Starter
Lively Member
-
Aug 6th, 2020, 08:11 AM
#2
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.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Aug 6th, 2020, 08:16 AM
#3
Thread Starter
Lively Member
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.
-
Aug 6th, 2020, 08:54 AM
#4
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
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Aug 6th, 2020, 08:59 AM
#5
Thread Starter
Lively Member
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.
-
Aug 6th, 2020, 09:13 AM
#6
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.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Aug 6th, 2020, 09:25 AM
#7
Thread Starter
Lively Member
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.
-
Aug 6th, 2020, 09:29 AM
#8
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 ?
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Aug 6th, 2020, 09:34 AM
#9
Thread Starter
Lively Member
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.
-
Aug 6th, 2020, 09:36 AM
#10
Re: Crystal Report: Object reference not set to an instance of an object
What type is the Crystal Report File?
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Aug 6th, 2020, 09:41 AM
#11
Thread Starter
Lively Member
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.
-
Aug 6th, 2020, 09:44 AM
#12
Re: [RESOLVED] Crystal Report: Object reference not set to an instance of an object
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|