Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
h2. Intro

In order to ensure that data sets with multiple rows fit neatly in a PowerPoint presentation, PowerPointWriter allows for customization of the way data is imported. {excerpt}This guide will explain how to use the various PowerPointWriter options for fitting data on to multiple slides.{excerpt} This guide assumes a basic knowledge of [data markers|How to use Data Markers] and [importing multiple rows of data|Importing Multiple Rows of Data] into a presentation.

|| {center} Jump to: {center} ||
| {toc:minLevel=2|maxLevel=4} |

h2. MaxRowsPerSlide

The [MaxRowsPerSlide|DataBindingProperties.MaxRowsPerSlide] property allows the user to control how many rows of data are imported into any slide.  Note that when importing multiple row of data, the data marker must be placed in a list entry or table row.  For more information see [Importing Multiple Rows of Data].

{code:csharp|title=Setting the MaxRowsPerSlide Property}
DataBindingProperties DataProps = pptt.DataBindingProperties();
DataProps.MaxRowsPerSlide = 5;
{code}

When used by itself, MaxRowsPerSlide will stop importing data when the initial row limit has been reached, and no more data from that data set will be imported into the presentation.  For example, if your data set has 12 rows of data, but MaxRowsPerSlide is set to 5, PowerPointWriter will import 5 rows of data initially. To import all of the data in a data set, MaxRowsPerSlide must be used with the {{Continue}} modifier or {{RepeatSlide}} marker.

h2. The Continue Modifier

The {{Continue}} modifier allows data from a single data source to be imported across multiple slides.  When data is being imported into a data source, and the MaxRowsPerSlide limit is reached, PowerPointWriter will look in the presentation for the next copy of the same data marker, but with the {{Continue}} modifier.  It will then begin importing data at the new location, starting with the next row of data in the data source.

The {{Continue}} modifier should be placed in parentheses at the end of a data marker: {{%%=DataSource.DataCol(continue)}}. The data marker with the {{Continue}} modifier must also be placed in a list or table to enable PowerPointWriter's automatic repeating behavior. If it is not in a list or table, only 1 additional row of data will be imported.

!ContinueModifier2.PNG!

If a presentation contains multiple appearances of the same data marker and the {{Continue}} modifier is not used, PowerPointWriter will begin importing data from the first row in the data source for each instance of the data marker.

The continue modifier can also be used to import multiple batches of data onto a single slide:


!ContinueModifierA.PNG!

!ContinueModifierB.PNG!

PowerPointWriter will attempt to import all the data, but there must be enough data markers with {{Continue}} modifiers to accommodate all the data, or data rows will be lost. For example, if you have 12 rows of data and MaxRowsPerSlide is set to 5, then you need the original data marker and two additional data markers with the {{Continue}} modifier to import all 12 rows (5 rows, 5 rows, 2 rows).

If you are unsure of how many rows to import, we recommend that you use the {{RepeatSlide}} marker.


h2. RepeatSlide

PowerPoint's RepeatSlide marker makes it easy to import data onto multiple slides with the same layout.  With RepeatSlide it is not necessary to know the size of the data set you are importing.

On a slide marked with the RepeatSlide marker, PowerPointWriter will import data onto the slide until the MaxRowsPerSlide limit is reached.  Next, PowerPointWriter will create a copy of the slide and insert the copy into the presentation in place. All of the data markers on the copied slide are treated as though they have the {{Continue}} modifier applied.

Then using the regular {{Continue}} modifier behavior, PowerPointWriter will search for the next instance of the data marker with the {{Continue}} modifier. This will of course be the copied slide that was just created and PowerPointWriter will continue to import data onto the new slide. This behavior will continue until all the data has been imported.

To use RepeatSlide:
# Make sure that MaxRowsPerSlide is set to avoid importing all the data at once
# Place the marker {{*%%RepeatSlide{*}}} as the first item in the notes section of the slide you wish to see repeated. There must be a space between the RepeatSlide marker and the rest of the text in the notes section, but you can have additional text in the notes section.

h2. Special Cases

h3. Repeating an entire slide for each row of data

To achieve mail merge-like behavior:
# Make sure that MaxRowsPerSlide is set to 1
# Add %%RepeatSlide to the slide you want to repeat
# Add data markers: the data markers do not need to be in a list entry or table row.

!RepeatSlide.PNG!

h3. Repeating a slide that already has the continue modifier

PowerPointWriter will always attempt to import data at the next available data marker with the {{Continue}} modifier.

When the {{RepeatSlide}} behavior is engaged, it makes a copy of the repeating slide and sets all the data markers to use the {{Continue}} modifier. If you are importing multiple times on the same slide, this behavior will continue for each repeated slide:

!RepeatContinue1.PNG|width=300!

Output file:
!RepeatContinue2.PNG!

You can also start by importing data on a non-repeating slide and then continue on a slide that is set to repeat:

First slide (not set to repeat)
!ContinuedSlide1.PNG|width=300!

Second slide (set to repeat):
!ContinuedSlide2.PNG|width=300!