Need to compare 2 database fields on filter
I am having trouble in my Report Designer Report where I want to compare the InventoryItem.BaseUnit and the InventoryItem.SalesUnit and if they are not equal, select for the report. What I have tried to do is use the an iif statement in the Data Field Formula screen (see attached) and compare a value. When I run it, the report bombs out. Hope I am just missing something. Maybe there is a different way to accomplish this as well. Thanks for any help.
Here is the trace:
Looks like your formula has a rogue single quote after the <> in your formula.
There are a few options to accomplish what you're looking to do. My suggestion would be to use "=[InventoryItem.BaseUnit]<>[InventoryItem.SalesUnit]" as the visible expression in the details section to hide any records that do match.