Thats the first method I tried and it didn’t work. It looks like it may not be possible.
Have you tried scripting? Something like: MG.indexOf('Other') < 0
Just guessing but I found I could use .contains('astring')
to get around stuff like !=
.
Try M.GroupCode != "Other"
This isn’t working for me. Trying to constraint by O.Portion Name
{REPORT ORDER DETAILS:T.Time,O.ItemGroup,O.PortionName:(TEN.Employee={SETTING:CURRENTUSER}) AND (O.PortionName != “Normal”)}
{REPORT ORDER DETAILS:T.Time,O.ItemGroup,O.PortionName:(TEN.Employee={SETTING:CURRENTUSER})}
produces:
J
Take the brackets off, M.GroupCode isn’t a normal report expression as its a field
Look at his example, your using it wrong.
{REPORT ORDER DETAILS:T.Time,O.ItemGroup,O.PortionName:(TEN.Employee={SETTING:CURRENTUSER}) AND (O.PortionName!=Normal)}
Doesn’t work, nothing shows.
J
The brackets are still there??!??
{REPORT ORDER DETAILS:T.Time,O.ItemGroup,O.PortionName:(TEN.Employee={SETTING:CURRENTUSER}) AND O.PortionName!=Normal}
I’m confused:
() = Parenthesis
{} = Brackets
Why would parenthesis have produce errors, does it just serve to group terms?
J
O.PortionName is not a report Parenthesis.
Its a field.
Same as if you use SQL script or the SQL report you would use $1= without brackets.
If you dont believe me look at the default item sales report, it uses that exact expression O.PortionName!=Normal without brackets
Thanks I’ll try this in a minute.
J
It should be
O.PortionName!="Normal"
Im also stuck in the same position.
This works:
@{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" and (MG=Promotion)}
But this fails:
@{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" and (MG!=Promotion)}
Easiest solution to solve this…
Make an order added rule which sets a new order state if group=promotion
If you make the State Name = Promotion and the State = True or False depending on group by adding two actions with constraints for == and !=
THen change the report to be OS.Promotion=True and OS.Promotion=False
This would not be backdateable unfortunatly but should do the job going forward.
Try MenuItem.GroupCode != "Promotion"
also…
Change menu item name expression as O.MenuItemName == "$1"
Thank Emre! that did work!
one final thing to bother you guys over now… got to do with grouping and adding rows.
Using the codes discussed above i have this little table:
[Items Sold under Promotion:2, 1]
@{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc:(ODI=True):{0}:,}
{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum;#:(ODI=True) AND O.MenuItemName="$1" and (OS.GStatus=Free)}
It works almost fine.
But it is printing each order in a new line instead of a sum result.
Example:
Pizza 1
Salad 1
Coke 1
Pizza 1
Salad 1
but it should print:
Pizza 2
Salad 2
Coke 1
What’s the ;# ?
The .sum sould cumulate the products on qty…
Also don’t think you need the @ line.
Your saying list orders where ODI= True the using that list reporting orders where ODI= True names =$1 and gift…
You should just report using the second line, your doubling your query and adding extra constraints on second round…
Co./Last Name,First Name,Card ID,Addr 1, - Line 1,- Line 2, - Line 3,- City,- Country,Phone,Email,Terms - Payment is Due,- Discount Days,- Balance Due Days,
{REPORT ENTITY DETAILS:
EC.LastName,E.Name,EC.MemberId,EC.MemberType,EC.Floor,EC.Building,EC.Road,EC.Area,EC.Country,EC.Phone,EC.Email,“5”,“31”,“31”:(EC.MemberType!=FM)
:{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13}}
Bold Part Not Working.
“5”,“31”,“31” I want to display these values to all fields And exclude only one category member.
I Tried using OR but not getting there
I Tried Another Method. Not Able to get target result.
[Customer NOT Purchased LD embedded:4,1,1,1, 2]
>>Name|Phone|VIP|Business|LastDate
{REPORT SQL DETAILS:
SELECT ent.[Name] as [EntityName], ent.[CustomData] as [Cd]
FROM [Entities] ent – give your tables a short alias like ent or tkt
WHERE ent.[EntityTypeId] =1
ORDER BY Cd(Name=MemberType)Value
:F.EntityName
,F.Cd(Name=Phone)Value
,F.Cd(Name=MemberType)Value
,F.Cd(Name=LastName)Value
,F.LastDate
}
There is no shorthand syntax for “Not Equals”. You can use method syntax for that. Also you need to use “=” to add static values.
[REPORT:1,1,1,1,1]
{REPORT ENTITY DETAILS:E.Name,EC.MemberType,="5",="31":(ET=Customers) && E.GetCustomData("MemberType") != "FM"}