Hello everyone,
I'm trying to create a calculated field in the Report Designer, but it's not working as expected.
Could someone please help me?
What I'm trying to achieve is the following:
Depending on the warehouse location (SiteID) and whether the item is accredited (UsrAkkreditiert = True or False), I want to mark the items with different numbers of asterisks (*).
Each warehouse has its own rule:
- For internal warehouses (TESTSHH or TESTSNMS), only non-accredited items should be marked with a single asterisk (*).
- For external warehouses (EXTERNHH or EXTERNNMS), I want to mark:
- Accredited items with two asterisks (**),
- Non-accredited items with three asterisks (***).
- If the conditions don't match any of the above, the field should remain blank.
Any ideas why this expression isn’t working, or suggestions on how I can correct it?
Here is the expression I'm currently using:
=IIf(
[SOLine.SiteID] = 'TESTSHH' Or [SOLine.SiteID] = 'TESTSNMS',
IIf([InventoryItem.UsrAkkreditiert] = False, '*', ''),
IIf(
[SOLine.SiteID] = 'EXTERNHH' Or [SOLine.SiteID] = 'EXTERNNMS',
IIf([InventoryItem.UsrAkkreditiert] = True, '**', '***'),
''
)
)
Thanks a lot for your support!