Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

WordWriter provides two methods for binding merge fields to a data source: SetDataSource and SetRepeatBlock. SetDataSource sets a data source for merge fields in the main document. SetRepeatBlock sets data sources for merge fields within repeat blocks.

Excerpt

The main document may include multiples sets of merge fields, where each set of fields binds to a different data source. A SetDataSource call is required for each set of main document merge fields. Only one row of data can be imported to each set of main document merge fields. When you include more than one set of merge fields in the main document, use any of the following SetDataSource methods to set data sources:

Code Block
c#
c#
titleC#

SetDataSource(object[] data, string[] fieldNames, string name)
SetDataSource(DataSet ds, string name)
SetDataSource(DataTable dt, string name)
SetDataSource(IDataReader dr, string name)
Code Block
vb.net
vb.net
titleVB.NET

SetDataSource(data() As Object, fieldNames() As String, name As String)
SetDataSource(ds As DataSet, name As String)
SetDataSource(dt As DataTable, name As String)
SetDataSource(dt As IDataReader, name As String)

...