How to debug an 'object reference not set to an instance of an object' ?
Hi,
So I have this report and it runs per date. It works fine for 4 Jan and 6 Jan but not for 5 Jan. So obviously there is some kind of a data issue. The problem is finding out what. If I preview the report, I get the above error, no indication of where.
The report consists of 4 pages coming from 2 datasets. Both datasets have data (rows) so the obvious answer is not that.
How do I figure out what the object is which is complaining ?
This discussion has been closed.
Comments
take a good look at report script, try catch will help you
Hello!
If a crash occurs within a .frx script or expression, check all expressions where methods are called from a column value (.ToString(), .Substring(...), accessing a property of a nested object without ?), or division/conversion of Report.GetColumnValue(...) values by DBNull (replace with Report.GetColumnValueNullable(...) / IsNull(“Table.Col”)).