We have just recently upgrade to the latest version of Aspose, which changes the behavior of the IF Mail Merge condition so that both the "true" and "false" portions process the mail merge fields. This is something that we really need to have fixed but we have a problems with the way this was implemented. I have attached a sample application that shows the problem and I will describe it below...
We implemented a custom data source using IMailMergeDataSource. This data source may contain a child list so we added code to the GetChildDataSource. There seems to be now way to know identify the current record we assume the GetChildDataSource is called once per record and so we increment a value by 1 every time the GetChildDataSource is called.
This is now a problem if we have the child TableStart/TableEnd statements in both the "true" and "false" portions of the IF statement because now the GetChildDataSource is being called twice per record. Since our customer defines the Mail Merge document we have no way of knowing whether there are one or two TableStarts per row.
Is there any way within Aspose we can determine whether the current row has changed between the GetChildDataSource calls?
Any other suggestion you could provide where there is some Aspose functionality that would help us resolve this issue?
On another note: personally I believe you have implemented the IF statement incorrectly. You should still only process the MERGEFIElDS within the "true" portion of the statement, and then just automatically delete all the MERGEFIELDS in the "false" portion of the statement.