The function GetProjectNodeInfoFromReportFolder() is typically used to identify where the top data node is for an SSRS report.
- So the project GUID and/or the collection GUID.
The table that has this data in it is DimTeamProject found in the TFS warehouse.
Using this table given a ‘report path’ an appropriate Team Project can be identified.
DimTeamProject is what GetProjectNodeInfoFromReportFolder() uses to get the project node info for a path.
Here are a few notes around the use of GetProjectNodeInfoFromReportFolder().
Collecting the report path from the SSRS Built-in Field called ReportFolder.
A report path is required as a parameter to GetProjectNodeInfoFromReportFolder(). We need to get this from somewhere and set this path into a parameter (@vReportPath in this example) to use in the call.
Conveniently SSRS provides us with a way to do this using one of its Built-in-Fields; ReportFolder.
Note that in this example the report author has provided an alternative through the ExplicitProject parameter which is used to supply the report path if the reporting service Built-in Field called ReportFolder has no value; this will be the case when working on a report locally.
The call to GetProjectNodeInfoFromReportFolder() with report path parameter.
This call is made after the parameter has been been set; @vReportPath in this example. ProjectGuid, ProjectNodeName and ParentNodeSK (which usefully is the SK of the collection) are returned. These returned values can then be used to update SSRS parameters for use in subsequent SQL queries for a report.
The DimTeamProject table.
Whenever a Team Project is created it is allocated a named folder in Reporting Service; the ReportPath.
Reporting Services makes this available to a running report as the global Built-in Field called ReportFolder.
The Report Folder.
The value for the SSRS global Built-in Field called ReportFolder is the path/location of the uploaded rdl files as below in Reporting Services.