Page tree

Versions Compared

Key

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

...

PowerPointTemplate has a single method for binding data to the data markers that are located in the template: {{[PowerPointTemplate.BindData]}}. Depending on the data source type and the number of rows in the data source, PowerPointWriter will either import a single row of data or [import multiple rows|Importing Multiple Rows of Data].

There are several ways to import a single row of data into a presentation:

  1. Use a single dimensional array
  2.  Use a multi-dimensional data source AND
    1. The data source only has one row of data
    2.  {{[DataBindingProperties.MaxRowsToImport]}} is set to 1

Single Dimensional Arrays

...

If a multi-dimensional data source has only one row of data, the automatic repeating behavior will not occur. This is consistent for any of the multi-dimensional data sources supported by [BindData|PowerPointTemplate.BindData]:

  •  Jagged and multi-dimensional arrays 
  •  Custom objects (IEnumerable<T>) 
  •  System.IDataReader and System.DataTable

...

MaxRowsToImport is a property on the [DataBindingProperties] object  object that can be used to limit the number of rows that are imported, regardless of how many rows are actually in the data source.

...