BuildReport throws NullPointerException with Option REMOVE_EMPTY_PARAGRAPHS using Java

Hi, i’m using Aspose Words JAVA since 10 year now.
I tried to migrate from version 20.8 to 21.3 and all the reports which were generated with linq report engine with previous version don’t work anymore with new one.

I tried to investigate and found that using option REMOVE_EMPTY_PARAGRAPHS in conjunction with “foreach” in the template on a property of the main object causes this runtime error:
Exception in thread “main” java.lang.NullPointerException
at com.aspose.words.zzYV9.zzX(Unknown Source)
at com.aspose.words.internal.zzA7.zzZ(Unknown Source)

If i don’t add the option REMOVE_EMPTY_PARAGRAPHS everything works ok.
Same problem happens with vesion 20.11 and higher too…

Please provide a correction as soon as possible !!
thanks
I’ve attached a simple application reproducing the error

testPdf.zip (689.6 KB)

@simone.padovan

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22025. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Thank u very much for the quick answer.

It’s not the first time that errors like this appear in new versions of the product.
Maybe you could improve the prepdoduction tests planned for the java versions.

@simone.padovan

Thanks for sharing your concerns. We will fix this issue and inform you via this forum thread.

@simone.padovan

We suggest you please read the following article.
Working with Table-Row Data Bands

Please add the greedy switch as shown in attached image to fix this issue.
greedy.png (31.2 KB)

Hi Tahir,

i cannot use this workaround.
If i understood well, you are going to solve this issue in a new versione, right ?

So i’ll wait the new version whith the correction.
Thanks

@simone.padovan

Yes, your issue has been resolved and its fix will be available in the next version of Aspose.Wrods i.e. 21.4. We will inform you via this forum thread once new version of Aspose.Words is released.

The issues you have found earlier (filed as WORDSNET-22025) have been fixed in this Aspose.Words for .NET 21.4 update and this Aspose.Words for Java 21.4 update.