Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id1351504743
Content column
id1351504745
Content block
id1351504741

On this page

Table of Contents
maxLevel3

Content block
id1351504744

To

...

create a template for an OpenDocument Presentation (ODP) or Microsoft PowerPoint presentation (PPTX)


  1. Open OpenOffice.org Impress or Microsoft PowerPoint.
  2. Add the code to the template file.
  3. Save the template file.
  4. Add the template to Report Wizard.

A presentation document is a special document template that does not contain a content order. It uses a text box to insert text as the content of the document. A text box is an image structure (an image structure keeps the position of each image in x, y coordinates). You can change the position of a text box, or place it in the same position as others.

Writing VTL in a Text Box in OpenOffice.org ImpressImage Modified

Writing VTL in a text box

...

in OpenOffice.org Impress

...

.

The following are the rules that you need to follow when using the #if, #elseif#else, #foreach, #forpage, and #macro directives in *.odp and .pptx documents:

 

  • Statement

...

  • VTL

...

  • statements that maintain a sequence order, such as #if and #foreach, must begin and end the statements inside the same text box.

    Valid Usage of a Multi-line Statement in ODPImage Modified

     Valid use of multi-line statement in ODP

...

  • .

    Do not split the statements into several text boxes, as this will cause an error.

    Invalid Usage of a Multi-line Statement in ODPImage Modified

    Invalid use of a multi-line statement in ODP.

...

  • #macro statement

    A #macro statement must be declared in the same text box.

...

  • Valid Usage of Macro Statement in ODPImage Modified

    Valid use of macro statement in ODP

...

  • .
  • #forpage statement

    The #forpage statement is different from the others, as it does not contain any order. It can begin and end the statement in different text boxes.  Its value can also be used in different text boxes.

    Image Modified

    Valid use of the #forpage statement in ODP

...

  • .

    To use a structured statement such as #if#macro, or #foreach with the #forpage statement, ensure that the statement is in the same text box.

    Image Modified

    Valid use of #if and #foreach with #forpage statement

...

  • .

    Using an example from the previous figure, the generated result will be as follows: 

    The Generated OutputImage Modified

    The end result of using #if and #foreach with #forpage statement.
Panel
titleOn this page

Table of Contents

Glossary

...

 

...

  • VTL
    The 
    Velocity Template Language (VTL) is meant to provide an easy, simple, and clean way to incorporate dynamic content in a web page. A VTL statement begins with the 
    # character and contains a directive: set.

...


More information about working with Velocity Template Language (VTL)

To learn more about working with Velocity Template Language (VTL), visit the following pages:

Velocity template language

Velocity variable

Velocity Directives

...