Skip to content

Commit bb1f281

Browse files
authored
Update Report_Snapshots.sql
1 parent eaa1c99 commit bb1f281

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Miscellaneous/Scripts/SQL/Report_Snapshots.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ BEGIN
1212
--EXEC [admin].[report_snapshots] @ReportName = NULL, @ReportFormat = 'PDF' --all snapshots for every report
1313

1414
SELECT
15-
[ReportName] = c.[Name]
15+
[ReportName] = c.[Name]
1616
, [SnaphsotDate] = FORMAT([h].[snapshotdate], 'dd-MMM-yyyy')
1717
, [FileName] = FORMAT([h].[snapshotdate], 'yyyyMMdd')
1818
, [Url_Download] = 'http://' + @@SERVERNAME + '/ReportServer/Pages/ReportViewer.aspx?' + [c].[path] + '&rs:Command=Render&rs:Format=' + @ReportFormat + '&rs:Snapshot=' + FORMAT([h].[snapshotdate], 'yyyy-MM-ddTHH:mm:ss')
@@ -23,11 +23,11 @@ BEGIN
2323
--, [ScheduleName] = [sc].[name]
2424
--, [ScheduleNextRunTime] = [sc].[nextruntime]
2525
FROM
26-
[ReportServer].[dbo].[History] AS [h] (NOLOCK)
27-
INNER JOIN [ReportServer].[dbo].[SnapshotData] AS [s] (NOLOCK) ON [h].[snapshotdataid] = [s].[snapshotdataid]
28-
INNER JOIN [ReportServer].[dbo].[Catalog] AS [c] (NOLOCK) ON [c].[itemid] = [h].[reportid]
29-
INNER JOIN [ReportServer].[dbo].[ReportSchedule] AS [rs] (NOLOCK) ON [rs].[reportid] = [h].[reportid]
30-
INNER JOIN [ReportServer].[dbo].[Schedule] AS [sc] (NOLOCK) ON [sc].[scheduleid] = [rs].[scheduleid]
26+
[dbo].[History] AS [h] (NOLOCK)
27+
INNER JOIN [dbo].[SnapshotData] AS [s] (NOLOCK) ON [h].[snapshotdataid] = [s].[snapshotdataid]
28+
INNER JOIN [dbo].[Catalog] AS [c] (NOLOCK) ON [c].[itemid] = [h].[reportid]
29+
INNER JOIN [dbo].[ReportSchedule] AS [rs] (NOLOCK) ON [rs].[reportid] = [h].[reportid]
30+
INNER JOIN [dbo].[Schedule] AS [sc] (NOLOCK) ON [sc].[scheduleid] = [rs].[scheduleid]
3131
WHERE
3232
1=1
3333
AND [rs].[reportaction] = 2 -- Create schedule

0 commit comments

Comments
 (0)