We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Word nested null

Hello, I use Nested Mail merge for group.

Wen a group is null I get the following message: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')

Example: If one CultureAdvice has no DosageApplication error occurs

Query

var CultureVisit = await _repositoryCultureVisit.Entities.Where(cv => cv.Id == query.Id)
.Include(ca => ca.CultureAdvices).ThenInclude(p => p.Product).ThenInclude(s => s.SaleUnit)
.Include(ca => ca.CultureAdvices).ThenInclude(da => da.DosageApplication)

Word

«TableStart:CultureAdvices»«Advice»
«TableStart:DosageApplication»«Target»«TableEnd:DosageApplication»
«TableStart:Product»«Name»«TableEnd:Product»
«TableEnd:CultureAdvices»
....

document.MailMerge.RemoveEmptyGroup = true;
            document.MailMerge.RemoveEmptyParagraphs = true;




3 Replies

SB Suriya Balamurugan Syncfusion Team December 29, 2022 01:39 PM UTC

We have confirmed that the reported issue with “ArgumentOutOfRangeException throws while calling ExecuteNestedGroup() method” is a defect and we have logged a defect report. We will include the fix for this defect in our weekly NuGet release, which is estimated to be available on three weeks. We will let you know once the fix is included in the weekly release.

The status of this bug can be tracked through the below link:
https://www.syncfusion.com/feedback/40112/argumentoutofrangeexception-throws-while-calling-executenestedgroup-method

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.



SB Suriya Balamurugan Syncfusion Team January 18, 2023 03:26 PM UTC

Jean, As promised earlier, we have included the fix for the reported issue with “ArgumentOutOfRangeException throws while calling ExecuteNestedGroup() method” in our latest weekly NuGet release (v20.4.0.44).

Please use the below link to download our latest weekly NuGet:
https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core/20.4.0.44

The status of this bug task can be tracked through the below link:
https://www.syncfusion.com/feedback/40112/argumentoutofrangeexception-throws-while-calling-executenestedgroup-method

Note: We will include this fix in our 2022 Volume 4 Service Pack release which will be available in end of January 2023.



JH Jean-François Hermans January 18, 2023 05:23 PM UTC

Perfect timing, got the latest weekly NuGet and I confirm that it is resolved. Thank you.


Loader.
Live Chat Icon For mobile
Up arrow icon