Nonono, don't use ="javascript:void(window.open(
.
First, it breaks PDF & Excel reports,
and second, it doesn't work in IE11 and possible also < 11.
Tested it, worked only in Chrome for me.
And third, it's a mess to put it together.
There's a far easier & better solution:
Add &rc:LinkTarget=_blank
to your report access URL, like:
https://your-domain.com/ReportServer/Pages/ReportViewer.aspx?%2fJPD%2fPO_Dashboard%2fJuvenile_Profile&rs:Command=Render&rc:LinkTarget=_blank
and it will open in a new window tab.
Edit:
If you want to make your own display page:
This is how you get all reports:
USE [ReportServer$MSSQL_2008_R2]
SELECT
[ItemID]
,[Path]
,[Name]
,[ParentID]
FROM [Catalog]
WHERE Type = 2
And this is how you can display all folders/reports at level x
;WITH CTE AS
(
SELECT
[ItemID]
,[Path]
,[Name]
,[ParentID]
,0 AS lvl
,CAST([Name] AS nvarchar(MAX)) AS RecursivePath
FROM [Catalog]
WHERE [ParentID] IS NULL
UNION ALL
SELECT
[Catalog].[ItemID]
,[Catalog].[Path]
,[Catalog].[Name]
,[Catalog].[ParentID]
,cte.lvl +1 AS lvl
,CAST(cte.RecursivePath + '/' + [Catalog].[Name] AS nvarchar(MAX)) AS RecursivePath
FROM CTE
INNER JOIN [Catalog]
ON [Catalog].ParentID = CTE.ItemID
)
SELECT * FROM CTE
WHERE lvl = 1
ORDER BY lvl, Path
If you only want the folders:
WHERE Type = 1
If you only want the data-sources:
WHERE Type = 5