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)
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>)
this is more compact
beacuse if is boolean, you don't need the equivalence.
=IIF(Parameters!IsSummary.Value, "Report (Summary)", "Report (Detail)")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With