Free Support Forum - aspose.com

Add context to NullReferenceException in reports with LINQ Reporting Engine

If you have a NullReferenceException when building a report with LINQ Reporting Engine, you get no context of the error, so you have no idea of where the error is in the document, while with other errors you place a piece of the document in the error message.

If possible, it would be very useful to have some context information to identify where the NullReferenceException occurred in the template document (as you already do with other error messages).

This is the error you get when building the report with ReportingEngine.BuildReport():

Object reference not set to an instance of an object.

Also using the option “ReportBuildOptions.InlineErrorMessages” you get the same exception in the running code (instead of being written in the document).

Example:
Aspose.Words - NullReferenceException.zip (30.6 KB)

Note:
I made this post to split case 1 of post 202522:

@agarberi

We have logged this feature request as WORDSNET-19381 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.