# Adding deliverers to sales and items report

**URL:** <https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204>\
**Category:** V5 Question\
**Created:** [May 21, 2020, 5:56pm UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204 "2020-05-21T17:56:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcorp8310](https://forum.sambapos.com/user_avatar/forum.sambapos.com/tcorp8310/32/55762_2.png) [@tcorp8310](https://forum.sambapos.com/u/tcorp8310)\
**Post date:** [May 21, 2020, 5:56pm UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204/1 "2020-05-21T17:56:23Z")

</div>

Hi guys, I’m trying to add deliverers to sales/item report i.e ![Capture](https://forum.sambapos.com/uploads/default/original/3X/6/9/6990c34c163e579e26fa8dcbe6c4841cbb104dfe.png)  
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? - #3 by emre](https://forum.sambapos.com/t/custom-report-how-to-ticket-seperated-item-sales-report-by-ticket-type/8946/3)

and this one [https://www.sambapos.com/wiki/doku.php/custom\_reporting\_tags\_for\_v5](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](https://forum.sambapos.com/uploads/default/original/3X/5/f/5f4611dcdf0a0dc9ea44f7fce46195a0feedb9d3.png)

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](https://www.sambapos.com/wiki/doku.php/custom_reporting_tags_for_v5)  
I have this so far  
 ![d2](https://forum.sambapos.com/uploads/default/original/3X/3/2/321aef1391f453ff1194289c604c50e5016f7d69.png)

Thanking you in advance.

---

<div class="post-metadata">

**Author:** ![Bob\_be](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@Bob\_be](https://forum.sambapos.com/u/Bob_be)\
**Post date:** [May 22, 2020, 2:03am UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204/2 "2020-05-22T02:03:30Z")

</div>

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/9-1-3-custom-reporting-tags/)  
&  
[https://kb.sambapos.com/en/cat/reports/](https://kb.sambapos.com/en/cat/reports/)

---

<div class="post-metadata">

**Author:** ![tcorp8310](https://forum.sambapos.com/user_avatar/forum.sambapos.com/tcorp8310/32/55762_2.png) [@tcorp8310](https://forum.sambapos.com/u/tcorp8310)\
**Post date:** [May 23, 2020, 12:15pm UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204/3 "2020-05-23T12:15:48Z")

</div>

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

 ![Rep](https://forum.sambapos.com/uploads/default/original/3X/a/c/acf8072b52ca038c6f55c2b9e0efc41eb3df7ec8.png)  
On the picture it should be showing Driver names instead of department.

I can photoshop how it supposed to look hehe.

---

<div class="post-metadata">

**Author:** ![Bob\_be](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@Bob\_be](https://forum.sambapos.com/u/Bob_be)\
**Post date:** [May 23, 2020, 5:01pm UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204/4 "2020-05-23T17:01:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tcorp8310](https://forum.sambapos.com/user_avatar/forum.sambapos.com/tcorp8310/32/55762_2.png) [@tcorp8310](https://forum.sambapos.com/u/tcorp8310)\
**Post date:** [June 3, 2020, 5:52pm UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204/5 "2020-06-03T17:52:57Z")

</div>

Thanks Bob you are a genius. Sorry for the late reply. I purchased a bixolon dx420 labeller and setup this as a printer so that I can print the kitchen order on the label so that I can stick it on the pizza box when completed so that the driver can deliver.

Can sambapos print to a labeller?

---

<div class="post-metadata">

**Author:** ![Bob\_be](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@Bob\_be](https://forum.sambapos.com/u/Bob_be)\
**Post date:** [June 3, 2020, 8:05pm UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204/6 "2020-06-03T20:05:24Z")

</div>

Thank you for the kind words, however there are many members here that know alot more than me.

I don’t have experience with label printers. I have read some posts that it is possible, alot of trial and error, but it is possible.

Here is a link to one post if found:

> [@How to print to Label Printer](https://forum.sambapos.com/t/how-to-print-to-label-printer/9528/2):
>
> Setting SambaPOS to print to a label printer is just the same as any receipt printer (printer, printer template, etc.). However most label printers I have used don’t use the same ESC/POS command language (try first though - if it does accept ESC/POS commands your life will be far easier!), so you may have to read the command manual for your printer and send the correct commands to create the layout you need. Make sure you use the Raw Printer type if sending your own commands. For example, her…

---

<div class="post-metadata">

**Author:** ![tcorp8310](https://forum.sambapos.com/user_avatar/forum.sambapos.com/tcorp8310/32/55762_2.png) [@tcorp8310](https://forum.sambapos.com/u/tcorp8310)\
**Post date:** [June 7, 2020, 3:04pm UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204/7 "2020-06-07T15:04:41Z")

</div>

Thanks a million stay safe under the circumstances.

---

<div class="post-metadata">

**Author:** ![tcorp8310](https://forum.sambapos.com/user_avatar/forum.sambapos.com/tcorp8310/32/55762_2.png) [@tcorp8310](https://forum.sambapos.com/u/tcorp8310)\
**Post date:** [June 11, 2020, 12:36pm UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204/8 "2020-06-11T12:36:39Z")

</div>

I have managed to figure out something else regarding this. I went into tickets then selected all tickets then selected deliverers then in the filter section the drivers name and voila it populates. However nothing can be printed from that screen. It’s really great that you can drill down this way.

---

<div class="post-metadata">

**Author:** ![Bob\_be](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@Bob\_be](https://forum.sambapos.com/u/Bob_be)\
**Post date:** [June 11, 2020, 4:51pm UTC](https://forum.sambapos.com/t/adding-deliverers-to-sales-and-items-report/22204/9 "2020-06-11T16:51:59Z")

</div>

I posted a Customer Purchase History tutorial a few months ago. You could change the Customers part to Deliverers and use that.

Here is a link to that tutorial:

> [@Customer Purchase History with Display/Print Ticket](https://forum.sambapos.com/t/customer-purchase-history-with-display-print-ticket/22016):
>
> This tutorial written to help new users get a familiar with some of the configuration that are available within SambaPOS. It also shows a little into how development process of a creating a system. I’ll post a condensed version in a separate post below. [Click here](https://forum.sambapos.com/t/customer-purchase-history-with-display-print-ticket/22016/3) Before you start, I recommend that you think and write down what fields you want to display. I hope to provide enough information for anyone to be able to add/replace fields for their needs. But first l…
