Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Table of Contents

Intro

Icon

This is Part 2 of a 2-part tutorial series for the Project Propsal scenario. It is recommended that you complete Part 1 - Getting Started with Data Markers before starting this section.

Following the Sample

Icon

There is a downloadable SomeFile.zip with completed templates and code. The completed example of the template is available under templates/part2_template.pptx. The code for this part of the tutorial can be found in Part2.aspx.cs.

This part focuses on taking advantage of PowerPointWriter's repeat slide behavior. It also covers passing between the Template and Application objects and deleting slides if certain conditions are not met.

There are no changes to the code from part 1.

Repeat Behavior

PowerPointWriter offers powerful tools for repeating data across PowerPoint slides. For more information see Fitting Data on to Multiple Slides.

Importing Multiple Rows

We are going to start with the template file as it was at the end of Part 1. Add a new slide with the title 'Team Members'. This slide is going to contain data from the 'Team' data source about the proposed team members for the new project.

In order for multiple rows of data to be imported using a data marker, the data marker must be placed in a list entry or table row. For more information see Importing Multiple Rows of Data

On the 'Team Members' slide, add a new table with 2 rows and 4 columns by going to Insert > Table and choosing the appropriate size. The table will automatically be formatted based on the theme of your presentation.

In the first row of the table, add the headers 'Name', 'Role', 'Joined', and 'Previous Experience'. In the second row, add the corresponding data markers: %%=Team.Name, %%=Team.Role, %%=Team.YearJoined, and %%=Team.Experience. Finally, add the data marker %%=Proposal.ReviewStatus somewhere at the bottom of the slide. Your completed slide should look like the following:

!Slide3Final.png

Fitting Data on to Multiple Slides

If a data source contains too much data

Passing between Template and Application

Delete Slide

Writing the Code

Final Code

Icon

For information on writing this code, see Part 1 - Getting Started.

Downloads

You can download the code for the Basic PowerPointWriter Tutorials as a Visual Studio solution, which includes the Project Proposal.

  • No labels