I have several sites with pages with ReportViewer web parts on those pages. All web parts use a central report file (.rdl) in a report document library in a reports site.
I would like these reports to show different data based on which site they are being viewed on.
The sites are :
https://name.company.com/sites/reports https://name.company.com/sites/site01 https://name.company.com/sites/site02 https://name.company.com/sites/site03 etc.
I would like to be able to have the report "know" that it is on site01, site02, site03, etc at run-time and be able use that information to query the appropriate data from SQL Server.
I have been able to store "site01" in a SharePoint list on site01 , "site02" in a SharePoint list on site02, etc, and pass that in as a Parameter to the web part and that works. But I am looking for way for the report itself to determine it's site/context without passing in information as a parameter through connected web parts.
I know SSRS reports can determine the user that is viewing the reports, I just can't seem to find a way to get the Site name/title/URL without passing it in.