none
Can't change Internal Parameter to hidden RRS feed

  • Question

  • I have a parameter for the User credentials and have the default value to the built in field User!UserID or [&UserID]. I want to utilize the drill through features of these reports and often times, pass in a user id that is not necessarily the same as the current user. However, if no user is passed in I want it to default to the built in current user field. When I go to drill into my report it says 'The report parameter 'UserID' is read-only and cannot be modified.' I assume this is because the parameter is internal but when I go to change it to hidden and save the report it switches right back to internal no error or anything it just switches back. 
    Wednesday, July 17, 2019 6:10 PM

Answers

  • In the drill-down report, you may want to create a parameter named pRunAsUserID. Set its Default Value to the internal [&UserID].

    In your first report, whenever the current user clicks on a name to drill-down to the report, pass the UserID that is clicked on as a parameter to the drill-down report.  For example, if the user clicks on "John Doe", pass John Doe's UserID as the value for @pRunAsUserID.

    This way, in the drill-down report, you will have access to 2 userIDs:

    1. pActualUserID set to [&UserID]:  Built-in User ID based on the person who is actually running the report.

    2. pRunAsUserID that you will need to pass in for whoever the user wants to drill to.  Having the default set to [&UserID] will run it as the actual user.  However, if there is another ID that is passed in, it'll have that userID instead.

    Hopefully this helps!

    Wednesday, July 17, 2019 7:21 PM

All replies

  • In the drill-down report, you may want to create a parameter named pRunAsUserID. Set its Default Value to the internal [&UserID].

    In your first report, whenever the current user clicks on a name to drill-down to the report, pass the UserID that is clicked on as a parameter to the drill-down report.  For example, if the user clicks on "John Doe", pass John Doe's UserID as the value for @pRunAsUserID.

    This way, in the drill-down report, you will have access to 2 userIDs:

    1. pActualUserID set to [&UserID]:  Built-in User ID based on the person who is actually running the report.

    2. pRunAsUserID that you will need to pass in for whoever the user wants to drill to.  Having the default set to [&UserID] will run it as the actual user.  However, if there is another ID that is passed in, it'll have that userID instead.

    Hopefully this helps!

    Wednesday, July 17, 2019 7:21 PM
  • That's a good workaround. thank you

    Thursday, July 18, 2019 3:17 PM