using licensed version 2.1.5.0
using .Net 1.1
when creating a single document by appending multiple documents it doesnt appear to add the doc’s in the specified order
we have a grid on the page that contains 4 records, we loop through the grid, creating a document for each record then appending this to a destination document. we want the document to be ordered the same way as the grid but this doesnt happen and cant figure out why?
the function we use to append the doc is as follows:-
Private Sub AppendDoc(ByVal dstDoc As Document, ByVal srcDoc As Document)
Try
While srcDoc.Sections.Count > 0
Dim section As Section = srcDoc.Sections(0)
'The section must first be removed before it can be inserted into a document.
srcDoc.Sections.RemoveAt(0)
dstDoc.Sections.Add(section)
End While
Catch ex As Exception
Throw ex
End Try
End Sub
in the grid the records appear in the following order
Record ID
15727
15728
15729
15730
but when the document is displayed, they come out in the following order:-
15729
15730
15727
15728
i have even tried changing the AppendDoc function to use Insert instead of Add but this made no difference either.
any idea as to why this would happen
Cheers,
Craig