Create report specific to User and Department


#21

Because you done have the user constraint;


#22

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


#23

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


#24

(O.User=$1) add that.


#25

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


#26

Get rid of exact total from parameter at top


#27

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.


#28

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


#29

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


#30

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


#31

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.


#32

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/


#33

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


#34

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.


#35

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


#36

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


#37

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


#38

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.


#39

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


#40

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