> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pba-report-designer/create-report-design-wizard-templates-cp/dynamic-element-positioning-in-templates.md).

# Dynamic element positioning in templates

Use the following methods to accommodate for multiple page sizes in reports:

## Percentages

Express the height, width, x position, and y position in percentages.

## Block, inline, or row

Switch the band’s layout mode from canvas to either block, inline or row:

| layout-mode | value                                                                                                                                                       |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Canvas      | Uses the x and y position to place the element in the band.                                                                                                 |
| Block       | Stacks elements vertically according to the layer order in a band; width is set to 100%.                                                                    |
| Inline      | Stacks elements horizontally according to the layer order in a band; width is determined by the length of the text in the field, and wraps within the band. |
| Row         | Stacks elements horizontally in one row according to the layer order in the band.                                                                           |

## Dynamic height message elements

Set `dynamic-height=true` on message elements. This will allow the element size to grow according to line height. Also, setting the following Reporting engine configuration option will allow the element size to grow according to the font size used:

```
org.pentaho.reporting.engine.classic.core.layout.​fontrenderer.UseMaxCharBounds = true
```

## Proportional column widths

To support varying window sizes in a Web browser, enable the use of proportional column widths so that the resulting table will have a width of 100% and the columns will have the proportional equivalent of their static widths as width. The relevant Reporting engine option to set this globally is:

```
org.pentaho.reporting.engine.classic.core.modules.​output.table.html.ProportionalColumnWidths = true
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/pba-report-designer/create-report-design-wizard-templates-cp/dynamic-element-positioning-in-templates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
