Non-static method requires a target exception when using Report Engine

I have a tag in a word template <<[WorkEntity.SignoffStaff.Name]>>

In the data model, SignoffStaff is null. When using Report Engine to build the report, an exception is thrown: Non-static method requires a target

I have specified the AllowMissingMembers option.
engine.Options = ReportBuildOptions.AllowMissingMembers;

Is there a way to avoid this exception when a member is null?

I’m using Aspose Word .Net Core 18.7

Please help.

Thanks

@mailzhengli

We suggest you please use the latest version of Aspose.Words for .NET 20.1. Hope this helps you.

If you still face problem, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Hi Tahir,

I have tried v20.1 and the problem still exists. Accessing member of a null object will throw exception [Non-static method requires a target exception]

@mailzhengli

Please share the requested resources here for testing purpose. We will investigate the issue and provide you more information on it.