23

There is an option to create "Internal" parameters in SSRS:

  1. In what context are they used?
  2. What are the general rules for using internal parameters?
BIReportGuy
  • 799
  • 3
  • 13
  • 36
whytheq
  • 34,466
  • 65
  • 172
  • 267

3 Answers3

35

Internal Parameters in SSRS are parameters that are not configurable by the end-user at run-time.

This varies from a Hidden Parameter, which the user is not prompted to provide, but can still be configured through the URL to the report server.

Please see "Creating Report Parameters" on MSDN for more information.

One possible usage of them is in conjunction with the Report Viewer control. An ASP.Net page can contain the report viewer control, and use internal parameters in the code-behind to provide values to the report that the end-user should not be able to control, such as a UserID.

This can prevent the user from providing a different user's ID in order to see data that they shouldn't be allowed to view.

However, if you use an internal parameter in a report but want it to remain functional outside of the report viewer control, you'll want to specify an appropriate default value. Otherwise the report will be unusable from the Report Manager or Report Server.

Michael Fredrickson
  • 36,839
  • 5
  • 92
  • 109
  • 1
    I'm playing around with ways of using UserId, for reports rendered via the Report Server, to filter information in the report dependent on who's viewing it. The examples I've found so far are not using hidden parameters. Would this be a good situation to use a hidden parameter? ...Yes, but I need to provide a default?...The default could be the UserID variable? – whytheq Mar 24 '12 at 16:35
  • 2
    @Whytheq if you use a "hidden" parameter it would still be possible for a User to impersonate another user by editing the URL. – TomG Jun 10 '14 at 12:34
  • @TomG thanks - so basically a rule of thumb is if the user never needs to know the value of a parameter then make them internal? – whytheq Jun 10 '14 at 12:42
  • @whytheq I'm new to this so would hesitate to give general advice. So far the only use I have found for "Internal" is to pass a UserID securely from one report to another. For other behind-the-scenes parameters I have tended to use "Hidden" parameters which I can set via the URL. – TomG Jun 11 '14 at 13:28
  • Is it just me, but I can't set an internal parameter on a Report Viewer control's server report? Does this work for local processing only? – dotjoe Aug 27 '15 at 20:49
  • @dotjoe It shouldn't be limited to local processing... I've never run into the issues you're seeing, so you might consider asking a new question with the code you're using. – Michael Fredrickson Aug 29 '15 at 02:41
  • Ok, I tried it again and I found that when I deployed a report with an internal parameter, The report server parameter definition had to be updated to have "hide" checked. Idk if this makes it a hidden parameter on the server and an internal parameter in the report? – dotjoe Aug 31 '15 at 12:17
  • @dotjoe Try to create the subscription and see if you (user) can set that parameter. My guess is user should not be able to set that parameter. – Anup Agrawal Aug 31 '15 at 14:06
3

If you set a parameter to Internal, it is not exposed in any way except in the report definition(dataset query or stored procedure). In other words Internal Parameter is a parameter that cannot be changed at runtime. An end user of a published report will never see this as a parameter.But a publisher can change parameter value any time in the manage options of the report. You can find the functionality of internal parameter with example in this link : https://sqlserverreportingservices.wordpress.com/2012/11/16/using-internal-parameters-to-filter-data-without-user-intervention/

Alias Varghese
  • 2,104
  • 3
  • 24
  • 52
2

If you set a parameter to Hidden, it will be visible when the user makes subscriptions on the Report Server but if you set a parameter to Internal, the user with a Browser role cannot see and change it.

Jonathan Porter
  • 1,365
  • 7
  • 34
  • 62
Sanja
  • 21
  • 5