Custom Report Ticket Tag

Hello,
I did not find a lot of information about the ticket tags in a custom report. I have 2 different ticket tags. Is it possible to only display one of them in the report?
I use one ticket tag to count customers, this one should be displayed.
Another ticket tag is used to record the time when the last “next course” command was sent to the kitchen. This information is not useful in my report and I do not want to display it here.

Thank you

When your reporting ticket details add the ticket tag field expression, will be something like TT.TagName, not at PC to check exact expression

You mean

{REPORT TICKET TAGS:(TT.Nombre de personnes)}

Doesn’t work :frowning:

It doesn’t work because it’s invalid syntax. One moment I’ll get a link to custom report wiki

https://sambapos.com/wiki/doku.php/custom_reporting_tags

The problem is what I already told in post #1… I cannot find any explanation about the {REPORT TICKET TAGS} Tag.

Because you can’t use that tag. You must use report ticket details as JTR explained.

That tag is hard coded and you can’t use expression in it.

Hey :slight_smile: Thanks for the tips!!
I think I nearly arrived, I only have one little problem where I am stuck at… he only starts in the 3rd column and doesn’t seem to accept the variable at position 2 and 3.

@{REPORT TICKET DETAILS:TT.Nombre de personnes:(TT=Nombre de personnes)}
[Nombre de personnes:2, 1, 2]
$1|{REPORT TICKET COUNT:(TT.Nombre de personnes=$1)}|{REPORT TICKET TOTAL:(TT.Nombre de personnes=$1)}
Total personnes:|{REPORT TICKET DETAILS:TT.Nombre de personnes.Sum:(TT=Nombre de personnes)}
Consommation moyenne par personne:|[=F(TN(‘{REPORT TICKET TOTAL}’)/TN(‘{REPORT TICKET DETAILS:TT.Nombre de personnes.Sum:(TT=Nombre de personnes)}’))]

the picture is the outcome when i use this code :

@{REPORT TICKET DETAILS:TT.Nombre de personnes:(TT=Nombre de personnes)}
[Nombre de personnes:2, 1, 2]
$1|{REPORT TICKET COUNT:(TT.Nombre de personnes=2)}|{REPORT TICKET TOTAL:(TT.Nombre de personnes=2)}
Total personnes:|{REPORT TICKET DETAILS:TT.Nombre de personnes.Sum:(TT=Nombre de personnes)}
Consommation moyenne par personne:|[=F(TN(‘{REPORT TICKET TOTAL}’)/TN(‘{REPORT TICKET DETAILS:TT.Nombre de personnes.Sum:(TT=Nombre de personnes)}’))]

which tells me that he doesn’t recognize the variable but no clue why.

Thanks

Got it working by adding ::{0}:, on the first row.

@{REPORT TICKET DETAILS:TT.Nombre de personnes:(TT=Nombre de personnes)::{0}:,}
[Nombre de personnes:2, 1, 2]
$1|{REPORT TICKET COUNT:(TT.Nombre de personnes=$1)}|{REPORT TICKET TOTAL:(TT.Nombre de personnes=$1)}
Total personnes:|{REPORT TICKET DETAILS:TT.Nombre de personnes.Sum:(TT=Nombre de personnes)}
Consommation moyenne par personne:|[=F(TN(‘{REPORT TICKET TOTAL}’)/TN(‘{REPORT TICKET DETAILS:TT.Nombre de personnes.Sum:(TT=Nombre de personnes)}’))]

Thats great! but I have no idea what I am doing here, can someone explain me what ::{0}:, stands for?

Between the first 2 colons is a filter/constraint for the Report Tag. In your case, you have no filter.

The {0} means field/column 0 from the field selector list (the part after the first colon after the Report Tag), in essence: TT.Nombre de personnes which is useful if your field selector list contains more than 1 element, in case you want to use another field like {1}. This helps to specify which field to use mostly in cases where you have more than one field for purposes of aggregate (ie. sum, count, etc).

The last part , is a list separator, meaning make a list of {0} (or TT.Nombre de personnes) for each Ticket, separated boy commas, which is fed as the $1 value into the rest of the Report. In some cases, you might want the separator to be something else like a pipe | which is why you have an option to set the separator.

BTW, the @ that prefixes the Report Tag means make a list of values that are used by the rest of the Report, but that means you must specify the separator.

In your case, since you only have 1 field, this probably would work too:

@{REPORT TICKET DETAILS:TT.Nombre de personnes:(TT=Nombre de personnes):::,}

or

@{REPORT TICKET DETAILS:TT.Nombre de personnes:(TT=Nombre de personnes)::,}

What I mean by this is that the separator is always last after fields and filters, so in many cases you can omit the {0} portion when you only have 1 field because it is “assumed” you want to use that only field.

3 Likes

How can I report open tickets(this report for all tickets. i want to see current open tickets)…i wanna see how many customers are currently in restaurant.

I encourage you to look at the reports section of kb.sambapos.com

i can not find anything:( [Adisyon Etiketleri Toplam:1, 1, 1]
{REPORT TICKET TAGS:(TS.Status=Ödenmedi)} this is not working @emre

Is that your state ? Default it would be TS.Status=Unpaid did you rename states?

Using turkish version. it is ‘ödenmedi’

Thank you @emre
{REPORT TICKET DETAILS:TT.Kişi Sayısı.Sum:‘RemainingAmount > 0’}