Orders, SOLD, GIFT, VOID Report

I was trying to re-write the SOLD ITEMS report, with has three parts:


I was trying to change the SQL sentence to a REPORT TAG sentence and I found 3 obstacles:

  1. I could not find the way to sum Quantity in a NON Pivot table (this report is too simple to be a pivot report)
  2. It cannot be sorted by Quantity (if its not a pivot table…
  3. I cannot filter by CalculatePrice and DecreaseInventory

The Report Tags I tried are:

{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity:(O.CalculatePrice=0)} This throws an error

{REPORT ORDER COUNT:O.MenuItemName,O.Quantity:(O.CalculatePrice=0)} This works but does not sort by Quantity, and as soon as I put the expression part starts throwing an error.



@gerlandog DETAILS tags are useful to list items. It won’t summarize or group values. For such cases using a pivot table will be a better idea.

You can try filtering them by order states.

If you really need to filter something by a database table column value you can try writing expression as.

Order.CalculatePrice == 0

so it should work.

{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity:Order.CalculatePrice == 0}

For comparisons you can also use same feature. For example for ticket related tags you can do something like that…

Ticket.TotalAmount > 100

@gerlandog, we also just got tag {REPORT ORDER QUANTITY TOTAL:<expression>} for Sum of Quantity - @emre just added this tag in v4.1.68.

This will sum GRAND TOTAL, I need a Quantity sum for each MenuItemName… does not seem to be one… unless using pivot tables… and ther is the order issue…

I think that for this case, its simplier to have a SQL sentence…

another question: Where can we read the GIFT and VOID reasons?