To provide an example is a bit complicated because of the actual data used. But maybe I can it explain like that:
What I'm wondering is how a dataset has to be structured when the template contains sections. Based on the sample in
https://www.e-iceblue.com/Tutorials/Spi ... eport.html let's assume I add region breaks above and below the customer table, so that my template document has three regions. When I do that in my document I get an exception on ExecuteWithNestedRegion:
- Code: Select all
at System.Collections.Generic.Stack`1.ThrowForEmptyStack()
at Spire.Doc.Reporting.MailMerge.ᜀ.ᜀ(ICompositeObject A_0, Stack`1 A_1)
at Spire.Doc.Reporting.MailMerge.ᜀ.ᜀ(ICompositeObject A_0, Stack`1 A_1)
at Spire.Doc.Reporting.MailMerge.ᜀ.ᜀ(ICompositeObject A_0)
at Spire.Doc.Reporting.MailMerge.ᜀ.ᜀ(Body A_0, IRowsEnumerator A_1)
at Spire.Doc.Reporting.MailMerge.ᜀ(Section A_0, IRowsEnumerator A_1)
at Spire.Doc.Reporting.MailMerge.ᜉ(String A_0)
at Spire.Doc.Reporting.MailMerge.ExecuteWidthNestedRegion(DataSet dataSet, List`1 commands)
at ...
So it seems to me that the regions in the document, as the name of the method ExecuteWithNestedRegions somehow suggests. and the data structure in the DataSet have some inter dependency.