<<if [listInfoPojo != null]>>
<<foreach [infoP in listInfoPojo]>>
<<[infoP.info]>>
Firma Disclaimer <<[infoP.numberOf()]>> <<[infoP.numberOf()]>>
<</foreach>>
<</if> !! end tags here !!!
When the list is not empty works perfectly. When listInfoPojo is null, it gives this error:
Can not get the value of member ‘info’ on type ‘class com.aspose.words.net.System.Data.DataRow’.
I have also tried infoP?.info and it doesn’t work either. If I delete <<[infoP.info]>> from the template, it works.
Also, is there any method for checking is the list or array is empty?
It seems like you use either JsonDataSource or XmlDataSource. In this case, if an XML or JSON node/property representing a complex object is null, there is no information on members of the object. By default, the engine throws an exception when it encounters a missing member. However, for scenarios like yours, the ReportBuildOptions.ALLOW_MISSING_MEMBERS option can be applied as follows.
ReportingEngine engine = new ReportingEngine();
engine.setOptions(ReportBuildOptions.ALLOW_MISSING_MEMBERS);
engine.buildReport(...);
Thanks for your response Ivan,
Unfortunately, I have already used engine.setOptions(ReportBuildOptions.ALLOW_MISSING_MEMBERS); and it doen’t work for my case.
Thanks for the information. Could you please share your sample code, data, and template then, so we could reproduce the issue at our end and properly address your issue?
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.