Solved

Need help formatting VisibleExpr for Report Designer

  • 22 May 2023
  • 6 replies
  • 108 views

Userlevel 5
Badge

Hi all,

I need a visible expression that if an item is active (“AC”) then the font is normal (black), if it’s active with a pop up note print it blue, and if it’s inactive (<>”AC”) print it red. I’m messing up my expr somewhere:

 

=[InventoryItem.ItemStatus] = "AC" and [InventoryItem.Note] is not null, "Blue", [InventoryItem.ItemStatus] <> "AC", "Red", "Black"

 

icon

Best answer by lauraj46 22 May 2023, 18:37

View original

6 replies

Userlevel 7
Badge +7

Hi @swartzfeger ,

The only way that I know of to accomplish conditional formatting is with overlapping controls.  Use the VisibleExpr field to make visible only the version of the control that has the desired formatting based on the criteria.

Hope this helps!

Laura

Userlevel 5
Badge

Hi @swartzfeger ,

The only way that I know of to accomplish conditional formatting is with overlapping controls.  Use the VisibleExpr field to make visible only the version of the control that has the desired formatting based on the criteria.

Hope this helps!

Laura

I’m trying that but also failing, lol -- this is what I have -- 3 different text boxes to each display black, blue or red:

 

=[InventoryItem.ItemStatus]=’AC’ AND [InventoryItem.NoteText]=0

=[InventoryItem.ItemStatus]=’AC’ AND [InventoryItem.NoteText]<>NULL

=[InventoryItem.ItemStatus]<>’AC’

It’s the first one that is causing problems… I can get the BLUE and RED to print, but the first expression is wrong.

 

=[InventoryItem.ItemStatus]=’AC’ AND [InventoryItem.NoteText]=0

 

I need to say “and inventory note is empty”, and =0 seems to make it error. Is “[InventoryItem.NoteText] Is Null” correct?

Userlevel 7
Badge +7

Hi @swartzfeger ,

For black the formula would be

=[InventoryItem.ItemStatus] = "AC" and [InventoryItem.Note] = null

It’s different form the SQL syntax :)

Laura

 

Userlevel 5
Badge

Hi @swartzfeger ,

For black the formula would be

=[InventoryItem.ItemStatus] = "AC" and [InventoryItem.Note] = null

It’s different form the SQL syntax :)

 

Thanks Laura, it’s appreciated. It seems to work but the BLUE expr

=[InventoryItem.ItemStatus]=’AC’ AND [InventoryItem.NoteText]<>NULL

seems to be overriding the BLACK expr

=[InventoryItem.ItemStatus]=’AC’ AND [InventoryItem.NoteText]=NULL

 

Maybe I need to point to something else and not .NoteText

Userlevel 7
Badge +7

Hi @swartzfeger ,

Try looking for an empty string:

=[InventoryItem.ItemStatus] = "AC" and [InventoryItem.NoteText] = ''

I tested this and it worked for me.

Hope this helps!

Laura

Userlevel 5
Badge

Hi @swartzfeger ,

Try looking for an empty string:

=[InventoryItem.ItemStatus] = "AC" and [InventoryItem.NoteText] = ''

I tested this and it worked for me.

Hope this helps!

Laura

Thanks Laura, that did the trick! I also had to change <>NULL to <>’’

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved