If statement with or to show different strings?

I’ve created a new SSRS and DSP file to fill in my info needed for my template. So far I’ve been able to do everything I want to do.

I have 3 lines being returned.
First line is Item
Second line is Labour
Third line is Charges

I was able to group my table and show all the correct information. One field I had a hard time with was because if it’s Item, I want to show the item field in column 2, but if it’s labour, I want to show the oprnum field in the same spot. I used an IIF statement on that field and show oprnum if it’s Labour, else I show the item field.

The part I’m having a hard time with is the heading of this field. If it’s item, I want it to say Item Number. If it’s Labour I want it to say Operation Number. If it’s Charges I want it to be blank. Now I can type Item Number and put an If tag on it, but this is just a boolean so it either shows or it doesn’t. I tried typing Item NumberOperation Number and only highlighting Item Number to put an If tag on that, which worked, but then when I highlighted Operation Number and tried to put an If tag on that, it didn’t work.

I’m not sure what the correct procedure is to accomplish what I need. Can someone please help?

Hi Andrew,
Yes, we can help definitely. Could you please send us your template and DDSP file, so it would be easier to understand your question?

Regards,
Marija

Marija, my DDSP file will have information from our system so I’m not super comfortable sending that.

image

Here is a screen shot of my word doc. The column to the left of Description. I want that to say Item Number is a particular field = “Item”. If that same field = “Labour” I want the column to be titled Operation Number and if the field = “Charges” then I want it to be blank. Does this help?

Andrew,
I just want to put the solution also here.
After some help from our support your final expression was:
iif(@docentricdg:Key = ‘Item’,‘Item Number’,iif(@docentricdg:Key = ‘Labour’, ‘Operation Number’, ‘’))

Yes! Thanks so much for your help :slight_smile: