Adding deliverers to sales and items report

Hi guys, I’m trying to add deliverers to sales/item report i.e Capture
Driver 1
Coke 5 = 50.00
Steaks 2 = 30.00
Sub Total = 80.00

Driver2
Fanta 3 = 30.00
Sausage 10 = 100.00
Rolls 2 = 10.00
Sub Total = 140.00

Total = 220.00

I’m using this guide from @emre Custom Report - How to ticket seperated Item Sales Report by Ticket Type?

and this one https://www.sambapos.com/wiki/doku.php/custom_reporting_tags_for_v5

Blockquote
[Item Sales By:5, 2, 2,1]
@{TICKET TYPE LIST}
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}

Department : $1
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (TY=$1) and O.MenuItemName="$2"}
{REPORT ORDER DETAILS:’ '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (TY=$1) and O.MenuItemName="$2":2}
Sub Total||{REPORT ORDER DETAILS:O.ExactTotal.Sum.desc.sum:(ODI=True) and (TY=$1)}

Total Sales||{REPORT ORDER DETAILS:O.ExactTotal.Sum.desc.sum}

Blockquote

How do I set the Deliverers D

E.id Deliverers or E.id MD

Reading this Doc that you guys have

https://www.sambapos.com/wiki/doku.php/custom_reporting_tags_for_v5
I have this so far
d2

Thanking you in advance.

When I try building a report that has grouping, I start out by first building the list report. The @{TICKET TYPE LIST}, in your above report is that list. However, when I first build the report I omit the @ sign, so that I can see the results.

It looks like your using Entities for the Deliverers. First inclination would be to use an Entity report. However, a Ticket Report also contains Entities fields. If you try {REPORT TICKET DETAILS:EN.Deliverers:(TCET=Deliverers):,}. This report is using the report field Entity type, Deliverers (EN.Deliverers) and the expression, or filter, of Entity containing an Entity Type equals Deliverers (TCET=Deliverers). The last part :,is separating each result with a deliminator, in this case a comma.

Try replacing the `@{TICKET TYPE LIST} with the above report and see if that is what you are looking for.

Here is another link for more reports information:
https://kb.sambapos.com/en/9-1-3-custom-reporting-tags/
&
https://kb.sambapos.com/en/cat/reports/

Hi @Bob_be this is exactly what I am looking for, however it is splitting it by departments and not drivers. I’m still playing around trying to figure this out.

This is what I am trying to achieve on the report:

Blockquote
Driver 1
Coke 5 = 50.00
Steaks 2 = 30.00
Sub Total = 80.00

Driver2
Fanta 3 = 30.00
Sausage 10 = 100.00
Rolls 2 = 10.00
Sub Total = 140.00

Total = 220.00

Blockquote


On the picture it should be showing Driver names instead of department.

I can photoshop how it supposed to look hehe.

Put an @ sign in front of first report.

You will also want to change the line from Department : $1 to Driver : $1

Anywhere you see (TY=$1) you will want to change to (TEN.Deliverers=$1). This is in what is called the expression part of the report. When I see expression I think of a filter. The TY stands for Ticket Type, since we changed the report from {TICKET TYPE LIST} to an entity list ( {REPORT TICKET DETAILS:EN.Deliverers:(TCET=Deliverers):,} ), that expression (filter) will not work any more. TEN is “Ticket Entity Name Equals”. However, since there maybe multiple type of entities (tables, customers, etc), we need to filter it down to the type ( or group) of entities we are using. In this case it Deliverers. That’s why we use TEN.Deliverers. The $1 is the invisible list that get generated with the first @ report. What happens (I think, anyways) is the list gets generated, then picks the first item on the list and runs the rest of the report, replacing $1 with the first item. When it gets to the end of the report, it grabs the 2nd item on the list and runs the rest of the report again. It keeps doing that until it reaches the end of the list. The second @ sign you see, is another list. To access that list you would use $2. Since we didn’t change anything on that line, we will not have to change anything further down the report.

You may also want to label the columns. To do this, under the table name start with > then label the columns, separating the columns names with a pipe character ( | ).

The start of your report could/may look something like this:

[Item Sales by Driver:5, 2, 2]
>Menu Name|Quantity|Total
@{REPORT TICKET DETAILS:EN.Deliverers:(TCET=Deliverers):,}
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}

I hope this helps you going in the right direction.