Create report specific to User and Department

Hello, we are in the process of pushing Sambapos business wide. In addition to the restaurant, we have a retail Deli. All terminals will connect to one database. The deli side will be in a separate department with its own menu. I need a way to track what is done per user, per shift. Running the end work period is not possible since different clerks shifts end at different times and we don’t want to shut down the system during those times. We will have 3 tills connected to the system. I have implimented this for the purpose of tracking the money in the tills. https://forum.sambapos.com/t/tracking-2-till-cash-and-shifts/1256
What I need to accomplish is a way for users to click on a button and when they do, it does 2 things. 1 it runs and prints a report that is specific to their terminal that will show all group sales, items sold, money taken in, and tax collected, 2. I need it to clear that information after that button is pressed for that specific terminal. We want to be able to track the specific users sales. If that’s not possible, could it be on a per user basis instead of terminal basis and be reset when the manager ends the work period at the end of the day?

Resetting like that is probably not posible.
Have you looked at virtual work periods?
Negating resetting inndividual users etc without a work period you know you can print current work period report at any time right?
If you build a report specific to the department you can print a mid period work period report which will show user sales etc.
It is also posible to pass paramiters into report such as CURRENTUSER by using a report widget on an entity screen.

Yea, I figured resetting it was not possible and that’s not to big of an issue. I was hoping to add a report button to the entity screen we have setup for clearing drawer totals. Adding current user to the report would work for the deli side but for the restaurant side, could it be current department? Since we have many waitresses all using the same department, maybe run a report that shows everything the current workperiod report and item sales report shows, but just for the restaurant department, and not the deli department. The accountant would be very unhappy if they have to look through a 5 foot report 2 times per day.:joy:

You can filter by department. I’m going to give you a link to study it will show you how to use the reports feature. One moment.

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

Take the time to study that it will help you solve any reporting issue you may have now and in the future.

It’s a lot of info but custom reports are such a powerful tool it’s worth trying to learn

Thanks, this looks awesome. I’m going to study it now!

1 Like

Hello again. I’ve been hard at work configuring reports and am quite happy with progress so far. I can not, for the life of me, figure out the proper syntax for 1 item, however. I want it to show individual user sales when an item sales report is printed. For example. Joe and Linda worked and I want Joe’s sales and Linda’s sales broken out into separate tables. Like how the work period shows drawer totals. Settled%20Report

I want to group item sales by user like payments in that above group.
Currently they display like this.
Sales ``

Here is the syntax for that report. What would I need to do to get it to group items by user?

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

Refer to default work period for ideas;

Payments are reported with;

@{REPORT PAYMENT DETAILS:P.User,P.Amount.Sum::{0}:,} 
[Settled by $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 based on that this would give you a @ list of users with orders;

@{REPORT ORDER DETAILS:O.User,O.ExactTotal.Sum::{0}:,}

So then reporting orders using constraint similar to user payment report ‘(PU=$1)’ to constrain to each.
If you want separate tables like payments declare the @ before table header line and use $1 in the title.

I think I broke it :joy:

They parameters go above the report header not below

You don’t want the colon in the header after sales. The one after which preceeds column widths is fine but you want something like
[Sales by $1:1, 1, 1] if it’s 3 columns of equal width.

Ok I think I have something that’s on the right track it at least shows user name but not all users. It shows 1 user name and lumps all sales together under that user.

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

sales%20report2

That’s because your using parameter twice. Erase the second one. All your parameters need to be defined in the first one above report header.

Think you read my mind. I took out one line and now I have a report that lists user names but 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.MenuItemName="$1"}
{REPORT ORDER DETAILS:' '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName="$1":2}

sales%20report%203

Copy it to notepad then paste here to remove the formatting.

So the item name is username? Nm I can’t read it due to extra formatting.

@{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.MenuItemName="$1"}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName="$1":2}
1 Like

Your defining menu item name as a username. Remove that last expression. The MenuItemName= one

The menu item hane is because he is using the portioned sales report.
The @ removed was generating the menu item names list for the grouped portions.

@{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)}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True):2}

I removed that and now its back to listing all sales under 1 user name.