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}
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.
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
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.
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.
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.