Create report specific to User and Department

Because you done have the user constraint;

So would I put that at the end of each line or should it be OU since its orders?

It would be OU.
it would be an and after ODI constraint.

(O.User=$1) add that.

Ok Here is what I have then

@{REPORT ORDER DETAILS:O.User,O.ExactTotal.Sum::{0}:,}
[Sales by $1:1, 1, 1]
>{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True)(O.User=$1}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True):2(O.User=$1}}

Sales%20Report4

Get rid of exact total from parameter at top

It’s not that, it’s the portion line, really be needs two @ declarations, one list of users and a list of menu items in order for the menu item by portion style report to work.
@adam100 it it were me I’d drop the portion part and add portion as a column, makes report allot simpler.

1 Like

Actually I’m going to just remove the portion altogether. Since this is in a retail type store, its mostly scanned items anyway.

If you dont use portions then drip the > on first rders report line and remove the seccond one with the ’ '+{O.Portionname] bit.

Also your constraints are still wrong…
it should be (ODI=True) and (O.User=$1)
Your (O.User=$1) is in the wrong place.

1 Like

Ok, I changed the constraint and removed portions. Its back to listing the users with no sales.

@{REPORT ORDER DETAILS:O.User,O.ExactTotal.Sum::{0}:,}
[Sales by $1:1, 1, 1]
>{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc: (ODI=True) and (O.User=$1)}
{REPORT ORDER DETAILS:O.Quantity.Sum.desc,O.ExactTotal.Sum.desc: (ODI=True) and (O.User=$1)}

I am hoping once I get this figured out, that I will be able to easily implement it into a Tobacco Sales report I successfully generated. I can’t for the life of me, figure out what I am doing wrong here.

Ok sorry I told you wrong… you made me look it up lol.

Try this:

@{REPORT ORDER DETAILS:O.User::{0}:,}
[Sales by $1:1, 1, 1]
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (TU=$1)}

It was TU=$1 not O.User=$1

When in doubt visit here:

https://kb.sambapos.com/en/cat/reports/

That did it! Going to try and plug this into my Tobacco Report now and hopefully it will work out.

That will be the user that started the ticket.
Order user is (OU=$1) based on the default work period report. Although if its retail you wont be running table tabs so there would only be one user per ticket/order on that ticket.

I think I have it figured out now. My Tobacco report also work perfectly. Here is what I did:

@{REPORT ORDER DETAILS:O.User::{0}:,}
[Tobacco Sales for $1:3, 1, 1]
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and (TU=$1) and (MG=Tobacco)}

Tobacco%20Report

I Love this and used it to build a few other reports, I didn’t see the section on defining reports by user, however.

There won’t be. It’s a feature called report parameters. It shows how to use the feature.

Quick question, Is there a way to get this report to also include Tax collected by each user? I tried a few different things, with no luck, I want to drop tax in the workperiod report under Settled By each user.

@{REPORT PAYMENT DETAILS:P.User,P.Amount.Sum::{0}:,} 
[Settled by $1:1, 1, 1, 1] 
{REPORT PAYMENT DETAILS:P.Name,P.Amount.Percent,P.Amount.Sum:(PU=$1)} 
>Total Income|{REPORT PAYMENT DETAILS:P.Amount.Sum:(PU=$1)}

So that the accounting office sees the tax collected individually by each user. I tried a few different things and 1 made Samba lock up completely.

If you only have 1 user per ticket you can. But if you use multiple users on each ticket then no you cant. You need to use REPORT TICKET DETAILS tag. Look under reports section of kb.sambapos.com

Ok, So I tried this syntax and it works, kind of. I decided to go with listing tax by terminal instead. It shows every transaction taken with sales tax on the corresponding terminal. How would I get this to total that up. {REPORT TICKET DETAILS:T.Tax:(TE=Till1)}

I found some help here, by the way.
https://sambapos.com/wiki/doku.php/custom_reporting_tags