Skip to main content
Question

Multiple Visual Expressions


Forum|alt.badge.img

Has anyone been able to have multiple visible expressions at once? I cannot get mine to work.

 

I have two I want to combine on the details section of a report: 

     1) Color coding every other line: =[$LineNbr] % 2 = 0  or in the second detail section it would be =[$LineNbr] % 2 = 1

  1. I have a Note section. It should only show if there is a note. If not then do not show:  = ([LineNote.NoteText]<>Null And [LineNote.NoteText]<>'')

 

How can I combine the two to make it work where it will color code if there is a note line, else the line does not show at all.

 

 

 

3 replies

bwhite49
Semi-Pro III
Forum|alt.badge.img
  • Semi-Pro III
  • 75 replies
  • March 16, 2025

You can use IIF formulas in visibility, so you could try something like this with multiple IIF statements...

= IIF(([LineNote.NoteText]<>Null And [LineNote.NoteText]<>''), IIF([$LineNbr] % 2 = 0, TRUE, FALSE), FALSE)


Forum|alt.badge.img+2
  • Semi-Pro III
  • 56 replies
  • March 17, 2025

Unfortunately this will break your color coding though. Just because it isn’t visible, doesn’t mean it doesn’t calculate your LineNbr variable. You’ll have to attach some sort of logic to your LineNbr variable, like so:

= IIF(([LineNote.NoteText]<>Null And [LineNote.NoteText]<>''), $LineNbr +1, $LineNbr)

This way it will keep the variable the same if it is not printing that section, making sure your colors alternate properly.

Edit: Do this on top of what ​@bwhite49 said to do for the visible expression


Forum|alt.badge.img

Hi ​@JReppard,

Use =IIf([LineNote.NoteText] <> Null And [LineNote.NoteText] <> '', IIf([$LineNbr] % 2 = 0, 'Color1', 'Color2'), 'Hide') in the visibility or formatting expression.

Hope this helps.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings