How to create a "group by" look in pdf Generation?

Hello, I want to create this look as a template so I can create a pdf that looks like this:
random9_0-1699289866637.png

How can I...

...group products (certain shirts) by their parent category and have all the products with the same parent category displayed under this category?

...create the sum price of each category?

My database has products and each product has a certain parent category as a field.

Thank you for your help ๐Ÿ™‚

Solved Solved
0 1 1,066
  • UX
1 ACCEPTED SOLUTION

For a typical Order - Order Details, Parent - Child tables

TeeSee1_2-1699361014319.png

This template

TeeSee1_3-1699361810659.png

gives you this output.

TeeSee1_1-1699360960125.png

The trick is -> <<Start:SELECT(item_categories[id],IN([id],SELECT(order_details[item_category],[order_id]=[_THISROW].[order_id])),TRUE)>>

You first have to extract a list of unique categories associated with the given order - order details. Then you can iterate through the list to display those items having each of the categories. 

[EDITED]

For grand total, just add at the end

TeeSee1_5-1699362124043.png

for

TeeSee1_0-1699363774457.png

View solution in original post

1 REPLY 1

For a typical Order - Order Details, Parent - Child tables

TeeSee1_2-1699361014319.png

This template

TeeSee1_3-1699361810659.png

gives you this output.

TeeSee1_1-1699360960125.png

The trick is -> <<Start:SELECT(item_categories[id],IN([id],SELECT(order_details[item_category],[order_id]=[_THISROW].[order_id])),TRUE)>>

You first have to extract a list of unique categories associated with the given order - order details. Then you can iterate through the list to display those items having each of the categories. 

[EDITED]

For grand total, just add at the end

TeeSee1_5-1699362124043.png

for

TeeSee1_0-1699363774457.png

Top Labels in this Space