Having an IIF Statement inside JoinColumnContent??

Stimulsoft Reports.JS discussion
Post Reply
ericp
Posts: 41
Joined: Mon Aug 21, 2023 9:22 pm

Having an IIF Statement inside JoinColumnContent??

Post by ericp »

Hello, I was wondering if it's possible to have an IIF statement generate more than 1 response and be comma separated?

Currently I have a field called LocationType, and this column is showing multiple values using the JoinColumnContent expression. My question is for my ProjectLimits column, I wanted to create an IIF statement that says IIF a LocationType is X, then a Y sentence will appear - however, I want it to show multiple sentences if there are multiple LocationTypes...

Example in Row 5 of the screenshot:
Location Type = Hwy Segment, Intersection, Point Location, Bridge
ProjectLimits (desired outcome) = This project runs through the highway, This project has an intersection, This project is not near a road, This project is near a pedestrian bridge

The sentences above would be created using the IIF statement expression:

Code: Select all

{IIF(Projects_CurrentProjectRevision_LocationDetails.LocationType == "Hwy Segment", "This project runs through the highway", 
IIF(Projects_CurrentProjectRevision_LocationDetails.LocationType == "Intersection", "This project has an intersection", 
IIF(Projects_CurrentProjectRevision_LocationDetails.LocationType == "Point Location", "This project is not near a road", 
IIF(Projects_CurrentProjectRevision_LocationDetails.LocationType == "Bridge", "This project is near a pedestrian bridge", "N/A")} 
but I'm not sure how I can get the ProjectLimits column to show this IIF statement AND be comma separated (using the JoinColumnContent expression)
Attachments
Screen Shot 2024-04-13 at 11.45.30 PM.png
Screen Shot 2024-04-13 at 11.45.30 PM.png (213.57 KiB) Viewed 107 times
Last edited by ericp on Sun Apr 14, 2024 6:52 am, edited 2 times in total.
ericp
Posts: 41
Joined: Mon Aug 21, 2023 9:22 pm

Re: Having an IIF Statement inside JoinColumnContent??

Post by ericp »

Here is my sample report for testing if desired:
Attachments
Test.mrt
(95.54 KiB) Downloaded 19 times
Lech Kulikowski
Posts: 6291
Joined: Tue Mar 20, 2018 5:34 am

Re: Having an IIF Statement inside JoinColumnContent??

Post by Lech Kulikowski »

Hello,

You can join values in the additional variable on the detail band.

Thank you.
Attachments
Test_modified.mrt
(109.36 KiB) Downloaded 17 times
Post Reply