#### Step 4: Create a Footer

Previous Step

In this step you will create a footer for the template. This footer will also use expressions to show the current date, page numbers, as well as provide an area into which the person viewing the report can type his or her own notes prior to saving or printing the report inside of Datapage+.

1. Click TextBlockControl , and drag it onto the canvas space at the bottom.

2. Temporarily change the background color for TextBlockControl0 to something of your own choice so you can see it against the canvas.

3. With the same control selected, select Copy from the toolbar and then Paste.

4. Again, select Copy and then Paste. You should now have three TextBlockControl objects on the canvas: TextBlockControl0, TextBlockControl1, and TextBlockControl2. These controls will be used to display the page number text.

5. Select the TextBlockControl0 and in the Text property type, "=Page". This will cause the report to display the current page.

6. Select the TextBlockControl1 and in the Text property type, "of".

7. Select the TextBlockControl2 and in the Text property type, "=Pages". This will cause the report to display the total number of pages. Note that when typing expressions you must type them

8. Position these controls so that they line up reading from left to right: =Page of =Pages.

9. Set the temporary background color back to white for these three controls.

10. Set the Width property for each of these to 10. It's alright if the expression text appears cut off. The width only needs to be long enough to fit a three digit number.

11. Click the SelectorControl icon , and drag a box around all three controls to select them.

12. Click the Same Height icon from the main toolbar to make all three controls the same size.

13. Click the Align Top icon from the main toolbar to align the controls' edges.

14. Click the Group icon from the main toolbar to group the objects together. With the items grouped you can now click and drag all three objects together as if they were one. Position them near the right and bottom edge of the canvas.

15. Add a fourth TextBlockControl , and in the Text property type, "DATE:". Use these properties to position it in the near the right edge of the canvas somewhat above and to the left of the =Page of =Pages grouping.

- Left: 670.00

- Top: 1030.00

- Width: 35.00

- Height: 15.00

- FontWeight: Bold

16. Copy and paste TextBoxControl4. TextBoxControl5 is added onto the canvas.

17. Select TextBoxControl5, and in the Text property type the expression, "=DATE". Use these properties to position it to the right of the "DATE:" text.

- Left: 710.00

- Width: 80.00

16. Select both TextBoxControl4 and TextBoxControl5 and align their top edges.

17. Add a final TextBlockControl , and in the Text property type, "NOTES:". Use these properties to position it on the left side of the canvas near the bottom:

- Left: 40.00

- Top: 1030.00

- Width: 40.00

- Height: 20.00

- FontWeight: Bold

18. Click the TextBoxControl icon and drag a box to the right of the "NOTES:" object. Size, position, and format it using these properties:

- Left: 85.00

- Top: 1030.00

- TextWrapping: Wrap

- Width: 520.00

- Height: 85.00

- Background: WhiteSmoke

19. Add a new RectangleControl and set these properties so that it surrounds the objects located in the remaining space at the bottom edge of the template. Use these properties to do this:

- Left of 30.00

- Top of 1027.00

- BorderThickness of 2.00,2.00,2.00,2.00

- BorderBrush of Black

- Width of 763

- Height of 95

17. Save the template.

This finishes the footer and the template. The footer should look something like this:

Finished Footer

Now that you have created the footer, you have learned to copy and paste controls, to align and group them. You've also seen that expressions can work in the TextBlockControl as well as in the GridControl. In the next step you will test the template inside Datapage+.

Next Step