Hello,
I have a report that has two repeats per section. If there are no records in either of the repeats feeding the section I would like to hide the section and add place holder text that says "No observed species." The issue I am running into is that one repeat may have a record while the other does not. In that case I would only show the one repeat that has the record. Here is my current logic.
${#NPSCSpPresent_1} ${NPSCSp_1} ${/} ${#NPSCSpPresent_2} ${NPSCSp_2} ${OtherNPSC} ${/}
|
NPCS Dominant Species:
${SpDomList_3| appearance:"multiline"}
|
NPCS Notes:
${NPCSNote_3| appearance:"multiline"}
|
${/}
Currently the logic fails to show any questions from either of the repeats. Any ideas on how to hide a section in a report based on if one of the repeats has a record?
Thanks to all that respond.
You already have most of the logic there.
Have you tried something like this yet?
${if (rep1 | getValue:"count")==0 && (rep2 | getValue:"count")==0}No observed species.${/}${if (rep1 | getValue:"count")>0 && (rep2 | getValue:"count")==0}rep1.${/}${if (rep1 | getValue:"count")==0 && (rep2 | getValue:"count")>0}rep2.${/}${if (rep1 | getValue:"count")>0 && (rep2 | getValue:"count")>0}rep1 + rep2.${/}
And in case it isn't immediately obvious, I:
You can put what you need where you need it.
You can also drop logic paths if they aren't needed (e.g., you most likely don't need the Rpt1>0 and Rpt2>0 option).