using Hidden or Internal Parameters using SSRS 2008

Posted on 2011-04-23
Last Modified: 2012-08-14
Hi Experts,

              I have a requirement to show the drill through report in a new window(using SSRS 2008) . But I have a problem while implementing the Role Based Security. I am using a Parameter @Lan_ID and passing the build in field  value "User!UserID"  (to  capture the UserID of running the report ).
 I am using the above logic to  implement the Role based security.

Question :
 I am creating the parameter (@Lan_ID ) as "Hidden" in both the Main and the Drill through report  and Passing through the Query String URL from the Main Report  to the drill through report. It doesn't work and getting error message below when i click on the drill through column in  main report..

Error message : Parameter @Lan_ID  is missing a value .

When i change the parameter type to "Internal" , I am getting the error message  below.

Error :  Report Parameter is read only and cannot be modified.

Requirement : I want to hide the Lan_ID and pass from the Main report to Drill through report . I am not sure how to exactly achieve this without any error. I will really appreiate your help if you walk me through the steps and provide me a solution.

Kind Regards,

Question by:n_srikanth4
    LVL 22

    Expert Comment

    by:Nico Bontenbal
    If I understand your question correctly, you need the user that is running the report as a parameter in you query so you can filter the data. What I did was
    1. create an Internal parameter Lan_ID
    2. set a default value for this parameter  with the expression: =User!UserID
    Now I could use the @Lan_ID parameter in the Query of my Dataset.
    You could use the same technique on the drill through report and then there is no need to pass the parameter. Or you could make the parameter on the drill through report hidden and pass it from the main report.

    Author Comment

    Hi Nicobo:

          Please correct me if I am wrong  (or) If i do not understand correctly .    
        Step 1:  I should create an Internal parameter Lan_ID in the Main report.  No  need to pass it to the drill through report.
      Ste p 2 : Pass the default value (=User!UserID) for the parameter Lan_ID in the Main report.
      Step 3 : Pass this Lan_ID parameter to the Stored Procedure which is bound to the Data Set of the Main Report. I am using an SP instead of a query.

      Step 4: Create the same Internal parameter Lan_ID  in the drill through report (and repeat Step 1, 2 ,3  for Drill through Report as well). But do not pass it from Main Report.



    LVL 22

    Accepted Solution

    Correct. And for step 2 I mean:

    Author Comment

    HI Nicobo :
            I got you but please clarify whether I need to pass the parameter @Lan_ID from the Main Report to the Drill through report ???????
        I am passing all the parameters including @Lan_ID   through Query String URL from Main Report  to Drill through report  using (expression in Go to URL). Then I am passing this @Lan_ID  as an input parameter to the Stored Procedure  of the Drill through Report.

    From your Comments above , you have mentioned that there is no need to pass the parameter @Lan_ID from Main Report to Drill Through Report.

    If I do not pass this parameter then I would get an error message "@Lan_ID is missing a value" as  the
    Stored Procedure of Drill through Report Expects this parameter.

    So, I do not understand of how to pass this parameter from Main Report to Drill through Report.  
    Please clarify on this and Please provide me a solution ...


    LVL 22

    Expert Comment

    by:Nico Bontenbal
    The user will be the same for the main and the Drill through report right? Which is the user running the report. If you use the technique described in comment 35455247 for both the main and the drill through report both reports will have the parameter @Lan_ID with the username as the value. Then there is no need to pass the parameter from the main to the drill through.
    But I'm afraid we have some misunderstanding here. Can you upload the .rdl files for both the reports (rename them to xml for EE to accept them). That way we can make sure we are both talking about the same thing.

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
    Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now