- In my coffee shop, we sale cigarette. So in Items Sale Report, the item group of cigarette appear and be sum in total sale. But i would like to void the sale number of cigarette. I have try to use Custom Tag to create a Custom Report but can not. How can i do that?
I use this:
{REPORT ORDER DETAILS:O.Date,=[O.Quantity.Sum:(ODI=True)]-[O.Quantity.Sum:(ODI=True) AND (MG=Cigarette)]}
but it not work
The report i want will show like this:
Date Amount sale
01/07/2017 50
02/07/2017 55
03/07/2017 45
I do not know what ODI in the syntax mean? - One more question. I would like to learn SQL language to create Custom Report for more flexible. But how can i know the structure of Database, table in database, field in the table. So i can refer the field in SQL query statement.
Thank you alot!
ODI = Order Decrease Inventory, meaning a Product that is part of your Menu.
MG = Menu Group, meaning the Product Group Code
These are filters or constraints can only be used in the filter/constraint section.
{REPORT TAG:FieldList:FiltersConstraints}
That means you cannot put the filters where you tried to put them (in the FieldList)… they are not valid there. Read the WiKi …
https://sambapos.com/wiki/doku.php/custom_reporting_tags
Try one of these:
{REPORT ORDER DETAILS:O.Date,O.Quantity.Sum:(ODI=True) AND (MG!=Cigarette)}
{REPORT ORDER DETAILS:O.Date,O.Quantity.Sum:(ODI=True) AND (MG<>Cigarette)}
{REPORT ORDER DETAILS:O.Date,O.Total.Sum:(ODI=True) AND (MG!=Cigarette)}
{REPORT ORDER DETAILS:O.Date,O.Total.Sum:(ODI=True) AND (MG<>Cigarette)}
Download and install SQL Server Management Studio (SSMS) to see the Database and test SQL Queries.
Thank for your response
{REPORT ORDER DETAILS:O.Date,O.Quantity.Sum:(ODI=True) AND (MG!=Cigarette)}
{REPORT ORDER DETAILS:O.Date,O.Quantity.Sum:(ODI=True) AND (MG<>Cigarette)}
It not work @@. Only “=” work, can not use != or <>