Skip to content

Commit 281137c

Browse files
author
“Audrey
committed
[IMP] Studio: add a data table using the report editor
task-3698568 closes #7558 Signed-off-by: Audrey Vandromme (auva) <[email protected]>
1 parent 81509af commit 281137c

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

content/applications/productivity/studio/pdf_reports.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,35 @@ fields if needed. Then, specify the default value and press `Enter`.
232232
.. image:: pdf_reports/powerbox-field.png
233233
:alt: Select a related field.
234234

235+
Add a data table
236+
****************
237+
238+
Data tables are used to display :ref:`relational fields <studio/fields/relational-fields>`. To add
239+
a data table, type `/`, select the :guilabel:`Dynamic Table` command, and select the relation to be
240+
displayed in the table.
241+
242+
.. note::
243+
Only relations of type `one2many` or `many2many` can be displayed as data tables.
244+
245+
Once the table has been added, you can add columns using the table tools. Position the cursor on top
246+
of the column, then click the purple rectangle and select an option.
247+
248+
.. image:: pdf_reports/table-add-column.png
249+
:alt: Add a column in a dynamic table.
250+
251+
You can then insert the :ref:`field of your choice
252+
<studio/pdf-reports/add-field>` in the columns. The dialog box that opens shows the source object
253+
for the field (e.g., the *Tag* model) and the list of available fields.
254+
255+
.. image:: pdf_reports/dynamic-table.png
256+
:alt: List of available fields for the Tag model.
257+
258+
.. note::
259+
- The default row automatically iterates over the field's content, generating a row on the report
260+
for each field value (e.g., one row per tag). You can add static content rows above or below
261+
the generated rows using the table tools.
262+
- You can also add data tables by :ref:`modifying the report's XML <studio/pdf-reports/XML-editing>`.
263+
235264
Formatting
236265
**********
237266

5.79 KB
Loading
4.12 KB
Loading

0 commit comments

Comments
 (0)