I have another problem with Linq reporting engine using dataSet.readXml.
When i reference an attribute (in my case named value) in the template (
if [value == “true”] ok /if )
which is not present in the xml i’m passing, comes this error:
java.lang.IllegalStateException: An error has been encountered at the end of expression 'value == '. Can not get the value of member ‘value’ on type ‘class com.aspose.words.net.System.Data.DataRow’.
The xml is not always the same, sometimes has this attribute and sometimes not. If there isn’t linq reporting shouldn’t return an error but silently proceed with null value (or simply bypass it). So did mail merging with XmlDataSource.
Hi Simone,
This issue has been logged into our issue tracking system as WORDSNET-12380. We will keep you updated on this issue in this thread.
Best Regards,
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.
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,
*…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,
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:
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,