8
votes

I have a report that holds two tables, one is for a Detail report and the other a Summary report. I've set it where if the Summary parameter (a boolean) is set to true then you only see the Summary table and vice versa if it's set to false. But I have a text box in the header that reads Report (Detail). I would like this text box to change depending on the same parameter, so if the summary parameter is set to "true" then the textbox will read Report (Summary) and if set to false it will read Report (Detail). How can I write this expression, I've searched but found nothing other than mentions of IIF expressions but I'm new to SSRS and don't know how to write these off the top of my head yet. Sorry if it has been answered I just couldn't find it.

This is how I have the expression for my Details visibility table to show if the Summary parameter is false (I found this out online too):

=IIF(Parameters!IsSummary.Value = 1, True,False)
2
I can't answer my own question because i don't yet have 10 rep so i'll put the answer here in the comment. I'm using this =IIF(Parameters!IsSummary.Value = 1, "Report (Summary)", "Report (Detail)") I got the answer from another identical post I made on another forum to try and get this answered ASAP.Rodney Maspoch

2 Answers

8
votes

I believe you get rep for selecting an answer (I also gave your question an upvote)

=IIF(Parameters!IsSummary.Value = 1, "Report (Summary)", "Report (Detail)")

The basic structure of the Iif is:

Iif(<equality>,<do this when true>, <do this when not true>)
2
votes

this is more compact
beacuse if is boolean, you don't need the equivalence.

=IIF(Parameters!IsSummary.Value, "Report (Summary)", "Report (Detail)")