I have crystal reports that keeps saying this error:
{'Object reference not set to an instance of an object.'}
Jul 03, 2018 Reference links: “Object reference not set to an instance of an object” when viewing Database Availability Group in Exchange Admin Console in Exchange 2016 CU1 2016 EAC DAG - Object reference not set to an instance of an object DAG Object reference not set to an instance of an object. Hope it helps. Regards, Manu Meng. Object reference not set to an instance of an object. (Microsoft.VisualStudio.Platform.Windows Management) Also in this window toward the bottom of the window I can click to copy the entire detailed message, which follows.
Stacktrace:
Sometimes it loads, most of the time it says that. It seems to say that alternately. Like if I rerun the report, it loads the report as what is expected then does not on the second run. What is wrong?
it stops in this code: crview.ShowDialog();
To give you background, I am using dataset source the same with otehr reports. but other reports are not havign this kind of problem. Anyone who can tell me? thanks.
user742102user74210269366 gold badges2424 silver badges4444 bronze badges
3 Answers
While this is an older thread, here is how I solved my issue.
I found that I had a text box with a formula that was beyond the bounds of the page. So it was causing a new page to be created with a NULL string. The formula was crashing and causing the following error:
System.NullReferenceException was unhandledMessage=Object reference not set to an instance of an object.
I was only seeing this once in a while because the returned value sometimes caused the TextObject to grow.
To solve this
- I can fix the formula to handle NULLs, though it would still cause the extra blank page
- Re-position the text box within the bounds of my page size and set CanGrow to False.
I opted for both because a user could unintentionally cause blank pages by selecting a smaller paper size from their printer.
Don GrahamDon Graham
![Object Object](/uploads/1/2/5/8/125830306/110960569.jpg)
Upgrading to Crystal Reports for Visual Studio re-distributable version 13_0_3 solved this issue for me.
user677686user677686
Solved!I had this problem for years!I work with DataSet as reportSource. Finally, after trying every solution I could find on forums, I found the answer myself: the DataSet contained null values, so I just had to make the DataSet string fields DefaultValue: ' ' instead of DBNull... dead simple, yet effective.
Hope this helps.
PepePepe
Not the answer you're looking for? Browse other questions tagged objectcrystal-reportsnullreferenceexception or ask your own question.
Hi Swadhin,
•When exactly do you get this error message?
•Do you have Visual Studio installed?
•Were there any changes made on the computer prior to the issue?
This error seems to be related to Visual Studio or third-party applications. Follow these steps and check:
Step 1:
Check if you face the similar issue in Safe Mode with networking, if not you can try putting your computer in a Clean Boot state in normal mode and check if it helps:
Step 2:
Clean boot helps eliminate software conflicts. Follow the Microsoft KB article to perform clean boot on the computer:
How to perform a clean boot to troubleshoot a problem in Windows 8, Windows 7, or Windows Vista
Disclaimer: After you have finished troubleshooting, follow these steps from section “How to reset the computer to start as usual after clean boot troubleshooting”to reset the computer to start as usual.
You may also refer these articles regarding 'error object reference not set to an instance of an object'
Hope this helps. If you need further assistance with Windows, let us know and will be glad to help.