Linq + xml

When will this issue be resolved ? thanks

Simone

Hi Simone,

Thanks for your inquiry. This issue has been resolved in next Aspose.Words 15.9.0 version which will be released by the end of current week.

We have added ReportingEngine.Options property in Aspose.Words 15.9.0. Please set ReportingEngine.Options to ReportBuildOptions.AllowMissingDataFields to meet this requirement with Aspose.Words 15.9.0.

Best regards,

The issues you have found earlier (filed as WORDSNET-12380) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Sorry, nothing has changed with new versione 15.9.0…

Hi Simone,
We are in communication with our product team on this issue and will update you soon.
Best Regards,

Hi Simone,
You need to set ReportBuildOptions.ALLOW_MISSING_DATA_FIELDS option before calling engine.buildReport to get it working e.g.
ReportingEngine engine = new ReportingEngine();
engine.setOptions(ReportBuildOptions.ALLOW_MISSING_DATA_FIELDS);
Please note that this option will work with DataTable rows only. In your case, you are building a DataSet from XML so it will work in your case but you need to set above mentioned option.
Best Regards,

Hi Muhammad, thanks it works.

…but an error occours when i use first() on a missing field.
example:

istanza.first().descrizione

Can you fix it too ?

Thanks

Simone

and of course it should bypass foreach tags if missing This lines

<<foreach [in malattie]>><<[descrizioneIt]>><</foreach>><</if>>

should not fire an exception if “malattie” field is missing…

Thanks

Hi Simone,

*…but an error occours when i use first() on a missing field.
example:

istanza.first().descrizione

Can you fix it too ?*

Can you please share more details about the issue? It would be better if you please share your updated template, a screenshot and a simple console application to reproduce the issue.
Best Regards,

Hi Muhammad,

i attach a simple application. Please look at method PdfAgentTest.testMerge(); As you can see in the template (estate-ragazzi.rtf) i try to reference a missing object in two ways:

  1. <<[missingObject.first().id]>>
  2. <<foreach [in missingObject]>><<[id]>><</foreach>>

and even if a set ALLOW_MISSING_DATA_FIELDS, an error occours.

Thanks

Hi Simone,
Thanks for the details. We are investigating both issues and will update you soon.
Best Regards,

This issue is a show stopper for us from using Aspose for our next solution. Can we get an update on when this might be addressed?

Hi Simone,
First and second issues reported in your last post have been logged into our issue tracking system as WORDSNET-12561 and WORDSNET-12562 respectively. We will keep you updated on these issues in this thread.
Best Regards,

Hi Mark,
The issues have recently been logged and we will be able to share more details after the issues have been analyzed by our product team. We will keep you updated.
Best Regards,

Has it been solved in 15.10.0 ?? thanks

Hi Simone,
These issues have been fixed however fixes are not the part of 15.10.0 release. These fixes will be included in 15.11.0.
Best Regards,

The issues you have found earlier (filed as WORDSNET-12561;WORDSNET-12562) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi Simone,

It is to update you that the ReportBuildOptions.AllowMissingDataFields property is now renamed to ReportBuildOptions.AllowMissingMembers.

ReportBuildOptions.AllowMissingDataFields affected only fields of DataRow and IDataRecord instances. The option was introduced per WORDSNET-12380 for a single customer. Then, the customer returned complaining that he also needs master-detail relationships and extension methods to be affected. Thus, the option’s purpose had to be changed. That is why, the option was renamed as follows:

/// 
/// Specifies that missing object members should be treated as null literals by the engine. This option
/// affects only access to instance (that is, non-static) object members and extension methods. If this<br>/// option is not set, the engine throws an exception when encounters a missing object member.
/// AllowMissingMembers = 1

We decided simply to rename the option instead of introducing a new one, thus bringing a breaking change to the public API. We apologize for your inconvenience.

Best regards,

Thank you very much. It works as expected.

Simone