By using this website, you agree to our Terms of Use (click here)
Hey guys. I'm new to Report Designer & need a little help. What I'm trying to do seems as though it would be simple.
I have a shipping confirmation report, and on that report, I want to populate a Details line with all appropriate info IF [SOShipLine.ShippedQty] is greater than 0. If a qty of zero was shipped, the Details line for that item doesn't need to be populated at all.
I'm trying to use the following iif statement to achieve this first in the "Item Name" field on my report:
IIf([SOShipLine.ShippedQty]<>0, [SOShipLine.TranDesc])
I'm using this statement here on the designer:
On the resulting report, the error I'm getting is:
I DO know that the following iif statement works properly in the report, so I'm trying to use its syntax while building my iif statement:
=IIf([SOShipLine.InventoryID]<>Null, Format( '{0}: {1}', [SOShipLine.InventoryID],[SOShipLine.TranDesc]),[SOShipLine.TranDesc])
(Here's where that statement is):
Lastly, and this is really important to me, what I truly want to do is leave the entire line empty if qt shipped is zero. Is there a relatively quick way to do this, or will I have to use iif statements in every field along that line in Details?
Thanks very much in advance for your help, guys!
Adam
Hey guys. I played with it a little more, and I think I've gotten it worked out.
Instead of: =IIf([SOShipLine.ShippedQty]<>0, [SOShipLine.TranDesc])
I'm now using: =IIf([SOShipLine.ShippedQty]<>0,[SOShipLine.TranDesc],'')
I removed a space before my "value if true", and added ' ' "value if negative". Seems to be working, and I applied this syntax to all the other fields' iif statements on that line & they appear to be working as well. Here's to learning.
note: non-quoted leading or trailing spaces are ignored within any expression. and the falsepart is mandatory.
Full ARM function reference available here: https://help-2018r2.acumatica.com/Help?ScreenId=ShowWiki&pageid=00a69dbb-c06b-4ce4-8b29-e86ee0e8ed47
Regarding the part about leaving the entire line empty, you might want to investigate the VisibleExpr property on the section:
When you put a formula in the VisibleExpr field that evaluates to either true or false, the section will only print when the formula is true.