Dynamically Hide Parameters

  • Hi,

    I know you can hide a parameter in the "report parameters" menu. I also know when you're using "jump to URL", you can add a property (&rc: Parameters=false) to hide the parameters (+view report) -section.

    In this case you can predefine which parameters should be invisible or define all parameters (section) should be invisible.

    In my case these possibilites don't offer a solution.

    I have a main report in which all parameters should be visible. I have a couple of links to "other reports" (actually the same report, but it differs). When I open a link to "the other" report, I would like to make my parameters invisible. A certain amount of parameters should stay visible though.

    I haven't been able to find any solutions for this case. Does anyone know if this is possible and how?

    Thanks in advance!

    Gr,

    Houssin

  • Hi,

    I would like to know if you are passing all the parameters from the main report to the linked report.

    I don't see any reason why you are unable to hide the necessary parameters in the linked report wherein you have the capability to do so in the report designer.

    Do you want the linked report to automatically capture parameters/field value from the main report and generate the report ???

    please explain if my understanding is right.

  • Hi,

    Thanks for the reply.

    The main report and the linked report are physically the same report.

    I have included a hyperlink in the main report that opens the same report in a new window, but a certain parameter will define this report as another one (different look and feel).

    The main report must have all it's parameters (8 parameters) shown.

    In the linked report there should be one or two parameters shown.(the other 6 should also be passed through but not shown in the UserInterface).

    I would like to know if you are passing all the parameters from the main report to the linked report.

    Thus, all parameters are passed.

    Do you want the linked report to automatically capture parameters/field value from the main report and generate the report ???

    This is not the issue. This works fine. I'm looking for a possibility to define visibility of a parameter in UI.

    The only way to hide an individual parameter is using the visibility checkbox in development, but as I said, all parameters should be shown in the main report.

    Another option is to hide all parameters at runtime (&rc: Parameters=false). But I still would like to show at least 2 parameters.

    Creating a duplicate report is not an option. We choose to re-use the same reports if the reportdata and structure is practically the same.

    I've done some research and it doesn't seem possible to play with the visibility of individual parameters at runtime.

    I hope this info has made it clearer to you.

    Regards,

    Houssin

  • Not sure if I follow, but you need to define the conditions under which a parameter is to be shown or not.

    Under Properties -> Visibility -> Hidden you can define the visibility of the control (say textbox) displaying your parameter:

    =iif(Parameters!param1.Value <> 0, false, true)

    At run time the report will determine whether to show this or not.

    I'm confused as to what you mean by "show a parameter". You mean "show control containing a certain parameter"?

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • I'v created a simple report and deployed it on the Report Server. I'm not making use of report viewer in ASP or a report as a webpart.

    A report on the Report Server consist of tree parts:

    1. Top frame: this part shows the report path, a search box and tabs with view, Properties, History and subscriptions.

    2. Parameter section: this section shows the reports' parameters (if parameters are set), "View Report" button and right beneath this section you also have a kind of toolbar where you navigate through the pages, find, export and print.

    3. The report section (Content): This section contains the table with data and possible graphs.

    I broke this down just to make sure you understand what the case is. I'm talking about part 2, the parameter section.

    I'm not making use of parameters with textboxes in the report section. (If this was the case, then it wouldn't have been impossible to hide).

    In Development Studio you set the parameters' visibility this way. Report > Report Parameters > "Parameter" --> Check Hidden. There is no possibility to write an expression over there.

  • I see your problem now. Sorry, I have no ideas how to do this.

    It's likely that this is not possible within the current capabilities of SSRS.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • A workaround could be to include all parameters (i.e don't hide any) but use an expression to set the default value to N/A for those parameters you want hidden, this might look akward, but might suffice.

  • Bit old but thought i'd reply.

    I'm not sure you could get around this as the logic wouldn't make sense to RS.

    If you are going back to the same report, then that reports parameters are visible... as you designed it to do so.

    The fact that you want it changed when the user clicks another link is irrevalant. You are still in the same report, with the same user defined parameter list.

    RS isn't an event driven tool - i.e. "onclick" change parameters property isn't available.

    There is definitely a work around for this solution though... Create another report. Make it look exactly like the first, but change the parameter properties to how you need it to look.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply