I am trying to write a presentation that will generate a report that displays all the elements in my inventory system, and provide a summary at a certain point. By the way, this report is just an HTML template.
In my case, each item is part of the order. An order can have several elements, and I want them to display a CV based on SUM after the end of each order.
Thus, the report view is as follows:
Order #25 <Qty> <Qty Sold> <Cost> <Cost Value>
Some Item 2 1 29.99 29.99
Another Item 4 0 10.00 40.00
<Subtotal Line> 6 1 39.99 69.99
Order #26 <Qty> <Qty Sold> <Cost> <Cost Value>
... Etc, you get the point
Now I’m quite capable of displaying all the values and already have a report showing all the elements, but I have no idea how to place the subtopics marked in the report without making alot of queries. The Quantity, Qty Sold, and Cost fields are part of the Item model, and Cost Value is just a simple function of the model.
Any help would be greatly appreciated. Thank you in advance: -)
source
share