Custom Report: Group by product tag

Hi,

After reading the tutorials for the last 2 hours and a few forum searches i’m still completely stuck.

I am trying to create a custom report to show a breakdown of all drinks sold. The default samba one has food and drink mixed.

I created product tags (called Kitchen) and then tag’d each item, don’t know how to get this to filter on the report just to show certain product tags, or a breakdown by each tag. Would be grateful for any help. Thanks

Tried this syntax
[Sales by Product Tags:1, 1] {REPORT ORDER DETAILS:MT.Type,O.ExactTotal.Sum} Total|{REPORT ORDER DETAILS:O.ExactTotal.Sum}

Which Shows…

`

Relevant settings shown below (tried both custom tag and default product tag)

UPDATE:

Got this far…

[Sale Groups:2, 1, 1]
@{REPORT ORDER DETAILS:MT.Kitchen,O.Quantity.Sum::{0}:,}
>>$1
{REPORT ORDER DETAILS:M.GroupCode,O.Quantity.Sum,O.ExactTotal.Sum:(MT.Kitchen=$1)}
>Total:||{REPORT ORDER DETAILS:O.ExactTotal.Sum:(MT.Kitchen=$1)}

This isn’t showing the breakdown of the items though, it’s showing the Group Code.

Finally got it working :slightly_smiling:

[Sale Groups:2, 1, 1]
@{REPORT ORDER DETAILS:MT.Kitchen,O.Quantity.Sum::{0}:,}
>>$1
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum,O.ExactTotal.Sum:(MT.Kitchen=$1)}
>Total:||{REPORT ORDER DETAILS:O.ExactTotal.Sum:(MT.Kitchen=$1)}
3 Likes

Persistence and trial and error are great tools. Just in case you didnt know here is a great resource for custom reports.

https://www.sambapos.com/wiki/doku.php/custom_reporting

1 Like

Dear Friends

I followed that example… works great for me!! Thank you so much :grinning: I REALLY LOVE SAMBA V5!!! :heart_eyes:

I added 2 Tag (Kitchen and Bar) and can now run nicely separated Reports on my 2 main business…:yum:, the only thing I missing is a GRAND TOTAL, to sum up the Sub-Totals of each Group

Because I am too lazy use calculater, lol :blush:

Can you please help me to add that code in my Report!??

Thank you so much in advance!!!:slight_smile:

The Factory 47

You can try appending REPORT ORDER DETAILS line at the end of the template without (MT.Kitchen=$1) expression.

ALMOST GOOD ;-), but is miss calculating the subtotals, always too much in the Total-total

My report template now looks like this

Did I mistype(copy anything)?

…is logical, because I have TWO Product Tags… Kitchen and Bar


and if I delete one out of the Total, he sums both Kitchen and Bar… have together Grand Total 1.310 (Bar=385+Kitchen=925, sums 1310)

SO I still have to filter for specific Product Tag, but sum it somehow, lol