The DataBindingProperties allows customization of how data is imported by PowerPointTemplate.
The DataBindingProperties object controls how data is bound when the BindData method is called. DataBindingProperties can control the max rows of data per slide, the max total rows of data imported, and the slide to which the data is bound. The BindData method requires a DataBindingProperties object as a parameter. Use the following line of code to create a new DataBindingProperties object.
DataBindingProperties dataProps = pptt.CreateDataBindingProperties();
MaxRowsPerSlide controls how many of rows of data should be imported onto each slide.
//Setting MaxRowsPerSlide dataProps.MaxRowsPerSlide = 5;
When this property is set, PowerPointWriter will stop importing data when the limit is reached. In order to import all the data in a data source to your presentation, MaxRowsPerSlide should be used with the _Continue_ modifier. The default value is -1 which indicates that all the data in the data source should be imported to a single slide. For more information see Importing Multiple Rows of Data and Fitting Data on to Multiple Slides.
MaxRowsToImport determines how many total rows of data to import into a presentation. PowerPointWriter will stop importing data from the data source when this limit is reached. The default value is -1 which indicates that data will continue to be imported until the end of the data source is reached.
//Setting MaxRowsToImport dataProps.MaxRowstoImport = 10;
Setting MaxRowsToImport = 1 will import a single row of data from a data set with multiple rows. For more information see Importing a Single Row of Data.
Slide controls which slide in a presentation a given data source should be imported into. Slide can be set to the 0-based index of the slide you wish to import data to. The default value is -1 which indicates that the data is not scoped to a particular slide.
dataProps.Slide = 2;
Slide allows for data markers across the presentation to have the same name but import from different data sources. When used with the PowerPointApplication method, Slides.CopySlide(PowerPointWriter.Slide, Int), it is easy to programmatically create and populate multiple slides with the same layout.
See the CopySlide sample for an example of using the Slide DataBindingProperty with Slides.CopySlide.