Printing a custom recepit

Printing a custom recepit

Hello, i have a custom made app in zoho creator. here is a view of the report that i want to work on

Report : Orders, it has the following items

Order ID
Customer Name
Customer Phone Number
Product Code
Product Size
Product Price

every order has the same info, i want to create a function that would print all order for a certain customer .
the receipt would look like

Customer Name
Customer Phone Number
Products ordered: Product Code 1 , Product Code 2....etc
Products Sizes: Product 1 Size, Product 2 Size....etc
Total Price: sum of all products prices.

i'm not sure how to do this, i tried using "Record Templates" but it only allows me to use data from one record and not search all records that has the customer name and do the sum of all his orders.

so is there anyway to do this?