AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Report De...
Seemingly Simple ii...
 
Notifications
Clear all

Questions Seemingly Simple iif Statements

 
Acumatica Report Designer
Last Post by Tim Rodman 6 years ago
4 Posts
3 Users
0 Reactions
6,169 Views
RSS
Posts: 2
 Adam Parr
Topic starter
October 21, 2019 12:06 pm
(@adam-parr)
Member
Joined: 6 years ago

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


3 Replies
Posts: 2
 Adam Parr
Topic starter
October 21, 2019 12:51 pm
(@adam-parr)
Member
Joined: 6 years ago

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.


Reply
Royce Lithgo
Posts: 557
 Royce Lithgo
October 21, 2019 11:12 pm
(@roycelithgo)
Honorable Member
Joined: 6 years ago

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


Reply
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
December 4, 2019 10:19 pm
(@timrodman)
Famed Member
Joined: 10 years ago

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.


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 51 Online
  • 2,389 Members
Our newest member: Dan Hunting
Latest Post: Generic Inquiry Screenid changes to ScreenId=00000000
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×