Reputation: 1
I have report paramerter @Course i have specified available values 1.Java 2.MSBI 3.Oracle 4.SAP 5.Mainframes My Requirement is if i Select SAP single then it should not allow to run. and should ask to select Oracle. If i select all it should work fine. Only validation for SAP. How to do this. Thanks in advance
Upvotes: 0
Views: 1194
Reputation: 4493
I think the best answer would be to hide the resulting report contents and unhide an error message window based on the parameter.
I'll walk you through it. I am using report builder 2016 so the steps might be a little different for older versions:
First go to the Tablix or Chart property that you would normally display in your report by right clicking it and selecting properties. Navigate to the Visibility tab on the left. Select "Show or Hide based on an expression" and click the fX button. Enter the following:
=IIF((Parameters!Course.Label(0) = "SAP" and Parameters!Course.Value.Length = 1), True, False)
What this is doing is checking if the parameter is SAP and only one item is selected. If so, return true which will hide the content. If false, it will show.
Next create a textbox below your content that displays an Error Message of your choosing. Repeat the above steps but switch the positions of the True and False so this box will show only when the other content is hidden.
Viola, you're done.
Upvotes: 1