O.PortionName in <Expression> in REPORT ORDER DETAILS Tag?

Is there any way to use the O.PortionName in an expression?

I would like to show how many portions of a pizza have been sold…

so I would use something like:

{REPORT ORDER DETAILS:O.ItemGroup.Count:((MG=Pizza) AND (OP=Familia)) AND (ODI=True)}

{REPORT ORDER DETAILS:O.ItemGroup.Count:((MG=Pizza) AND (OP=Grande)) AND (ODI=True)}

Is that possible?

Thanks!!!

G.

@gerlandog try and use it as is without brackets.
I used this in one of my ‘Grouped Item Sales Report’

(ODI=True) and O.MenuItemName="$2" and (MG=$1) and O.PortionName!="Normal"

1 Like

I tired:

{REPORT ORDER DETAILS:O.ItemGroup.Count:(MG=Pizza) AND (O.PortionName="Familia") AND (ODI=True)}

with no luck, it just returns a blank…

but as you sayed:

{REPORT ORDER DETAILS:O.ItemGroup.Count:(MG=Pizza) AND O.PortionName="Familia" AND (ODI=True)}

this works great… strange…

Thanks!!!

G.

O.PortionName is a field not an expression but while I was working on that I found that some fields also work as expressions but not all, I tried after noticing O.MenuItemName in the default item sales report.
Although what I didnt try was cross referencing that the field was used inside the report or not, perhaps that is the key, BUT then again yours doesnt have O.PortionName

Thanks!!! now… I am surprissed…

I have two reports that should show the same info: (or at least that is what I think)

[Detalles:2, 1]
Pizza Familia|{REPORT ORDER DETAILS:O.ItemGroup.Count:(MG=Pizza) AND O.PortionName="Familia"}
Pizza Grande|{REPORT ORDER DETAILS:O.ItemGroup.Count:(MG=Pizza) AND O.PortionName="Grande"}
Calzone|{REPORT ORDER DETAILS:O.ItemGroup.Count:(MG=Calzone)}
Açai|{REPORT ORDER DETAILS:O.ItemGroup.Count:(MG=AÇAI)}
Bebidas|{REPORT ORDER DETAILS:O.ItemGroup.Count:(MG=Refris)}


[Item Sales:2, 2, 1, 2]
{REPORT ORDER DETAILS:O.ItemGroup,O.PortionName,O.Quantity.Sum,O.ExactTotal.Sum}
>Total|||{REPORT ORDER DETAILS:O.ExactTotal.Sum}

but they are not!!!

BEBIDAS = REFRIS

strange

Thanks!!!

G.

One is ItemGroup.Count and the other is Quantity.Sum…

Quantity.Sum is what I think you were expecting right?
Guessing count would be unique values

Guessing 2 Acia, Calzone and Pizza Familia were identical Product and Portion?

exactly… they should be the… no… good point… there may be some tickets with quantity 2 that itemgroup.count will not count…

Thanks JTRTech… with your help made it work as I wanted!!!

Thanks!!

G.

Is there any way to sort the order of the resulting report?

Thanks!!!

G.

.desc is descending, can never remember ascending… .asce?

{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}

Take a look at some of the default reports :stuck_out_tongue:

EDIT
Its just .asc for ascending :wink:

Those would either be alphabetically or numerically I believe depending on the field obviously

1 Like

thnaks, now it´s looking great!!!

G.

I want show my Order Tag = Misc Item Description

{REPORT ORDER TAG DETAILS:T.Value,T.Quantity,T.Price}
already tried
T.Value:(T = Misc Item Description)
T.Value:T:Misc Item Description
T.Value:T.Name