Search code examples
sql-serverssrs-2008

How to send SSRS Report Path in a parameter to the Stored Procedure?


I have multiple departments that need to access the same report. Each department should see their related data and not other departments data.

to do this I created 4 reports and each one of these reports has internal parameter that sent to the SP so it retrieve only related records.

I think this is un-efficient, So I thought maybe i can send to the SP the path where the report exist in SSRS, like

Home > Management Reports > HR
Home > Management Reports > Finance
Home > Management Reports > Legal

and from this address I can tell the department

Is there any way I can get the current folder in SSRS and send it as parameter?


Solution

  • 1. create a parameter call it department, hide this parameter
    2. accessing the ssrs reports give them the URL with the parameter on it
    
       reporturl&rs:Command=Render&Department=HR
    

    This way you will only use 1 report