Skip to content

Commit c790509

Browse files
authored
Update Execution Log.rdl
1 parent 7fe1024 commit c790509

File tree

1 file changed

+77
-40
lines changed

1 file changed

+77
-40
lines changed

ServerReports/Execution Log.rdl

Lines changed: 77 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
33
<Description>An event list of reporting services reports and their status</Description>
44
<Author>Anthony Duguid</Author>
@@ -11,7 +11,7 @@
1111
</DataSource>
1212
</DataSources>
1313
<DataSets>
14-
<DataSet Name="DataSet">
14+
<DataSet Name="ExecutionLogs">
1515
<Query>
1616
<DataSourceName>ReportServer</DataSourceName>
1717
<QueryParameters>
@@ -55,7 +55,7 @@ DECLARE @EndDate AS DATETIME
5555

5656
SET @all_value = '&lt;ALL&gt;'
5757
SET @LogStatus = '&lt;ALL&gt;'
58-
SET @ReportFolder = '&lt;ALL&gt;'
58+
SET @ReportFolder = 'System'
5959
SET @ReportName = '&lt;ALL&gt;'
6060
SET @UserName = '&lt;ALL&gt;'
6161
SET @GroupByColumn = 'Report Folder'
@@ -69,29 +69,28 @@ SET @EndDate = NULL
6969
report_users
7070
AS
7171
(
72-
SELECT UserID, UserName, SimpleUserName = UPPER(RIGHT(UserName, (LEN(UserName)-CHARINDEX('\',UserName)))) FROM dbo.Users
72+
SELECT [UserID], [UserName], [SimpleUserName] = UPPER(RIGHT([UserName], (LEN([UserName])-CHARINDEX('\', [UserName])))) FROM dbo.[Users]
7373
)
7474
,
7575
report_catalog
7676
AS
7777
(
7878
SELECT
79-
rpt.ItemID
80-
, rpt.CreatedById
81-
, rpt.ModifiedById
79+
rpt.[ItemID]
80+
, rpt.[CreatedById]
81+
, rpt.[ModifiedById]
8282
, rpt.[Type]
8383
, rpt.[Name]
84-
, ReportName = rpt.[Name]
84+
, [ReportName] = rpt.[Name]
8585
, rpt.[Description]
86-
, rpt.Parameter
87-
, CreationDate = CONVERT(DATETIME, CONVERT(VARCHAR(11), rpt.CreationDate, 13))
88-
, ModifiedDate = CONVERT(DATETIME, CONVERT(VARCHAR(11), rpt.ModifiedDate, 13))
89-
, ReportFolder = SUBSTRING(rpt.[Path], 2, Len(rpt.[Path])-Len(rpt.[Name])-2)
86+
, rpt.[Parameter]
87+
, [CreationDate] = CONVERT(DATETIME, CONVERT(VARCHAR(11), rpt.[CreationDate], 13))
88+
, [ModifiedDate] = CONVERT(DATETIME, CONVERT(VARCHAR(11), rpt.[ModifiedDate], 13))
89+
, [ReportFolder] = SUBSTRING(rpt.[Path], 2, Len(rpt.[Path])-Len(rpt.[Name])-2)
9090
, rpt.[Path]
91-
, URL_ReportFolder = 'http://' + Host_Name() + '/Reports/Pages/Report.aspx?ItemPath=%2f' + SUBSTRING(rpt.[Path], 2, Len(rpt.[Path])-Len(rpt.[Name])-2) + '&amp;ViewMode=List'
92-
, URL_Report = 'http://' + Host_Name() + '/Reports/Pages/Report.aspx?ItemPath=%2f' + SUBSTRING(rpt.[Path], 2, Len(rpt.[Path])-Len(rpt.[Name])-2) + '%2f' + rpt.[Name]
93-
, ReportDefinition = CONVERT(VARCHAR(MAX), CONVERT(VARBINARY(MAX), rpt.Content))
94-
, HostName = Host_Name()
91+
, [URL_ReportFolder] = 'http://' + Host_Name() + '/Reports/Pages/Report.aspx?ItemPath=%2f' + SUBSTRING(rpt.[Path], 2, Len(rpt.[Path])-Len(rpt.[Name])-2) + '&amp;ViewMode=List'
92+
, [URL_Report] = 'http://' + Host_Name() + '/Reports/Pages/Report.aspx?ItemPath=%2f' + SUBSTRING(rpt.[Path], 2, Len(rpt.[Path])-Len(rpt.[Name])-2) + '%2f' + rpt.[Name]
93+
, [ReportDefinition] = CONVERT(VARCHAR(MAX), CONVERT(VARBINARY(MAX), rpt.Content))
9594
FROM
9695
dbo.Catalog AS rpt
9796
WHERE
@@ -101,41 +100,41 @@ AS
101100
SELECT
102101
GroupBy1 =
103102
CASE
104-
WHEN @GroupByColumn = 'Report Name' THEN rpt.ReportName
105-
WHEN @GroupByColumn = 'Report Folder' THEN rpt.ReportFolder
106-
WHEN @GroupByColumn = 'User Id' THEN usr.SimpleUserName
103+
WHEN @GroupByColumn = 'Report Name' THEN rpt.[ReportName]
104+
WHEN @GroupByColumn = 'Report Folder' THEN rpt.[ReportFolder]
105+
WHEN @GroupByColumn = 'User Id' THEN usr.[SimpleUserName]
107106
ELSE '&lt;N/A&gt;'
108107
END
109108
, rpt.[Path]
110-
, rpt.ReportFolder
109+
, rpt.[ReportFolder]
111110
, rpt.[Name]
112-
, rpt.URL_ReportFolder
113-
, rpt.URL_Report
114-
, URL_Report_Filtered = rpt.URL_Report + '&amp;rs:Command=Render&amp;' + CONVERT(VARCHAR(2000), el.[Parameters])
115-
, UserName = usr.SimpleUserName
111+
, rpt.[URL_ReportFolder]
112+
, rpt.[URL_Report]
113+
, [URL_Report_Filtered] = rpt.URL_Report + '&amp;rs:Command=Render&amp;' + CONVERT(VARCHAR(2000), el.[Parameters])
114+
, [UserName] = usr.[SimpleUserName]
116115
, el.[Status]
117116
, el.TimeStart
118117
, el.[RowCount]
119-
, el.ByteCount
118+
, el.[ByteCount]
120119
, el.[Format]
121120
, el.[Parameters]
122-
, TotalSeconds = CONVERT(CHAR(8),DATEADD(ms,(el.TimeDataRetrieval + el.TimeProcessing + el.TimeRendering),0),108)
123-
, TimeDataRetrieval = CONVERT(CHAR(8),DATEADD(ms,el.TimeDataRetrieval,0),108)
124-
, TimeProcessing = CONVERT(CHAR(8),DATEADD(ms,el.TimeProcessing,0),108)
125-
, TimeRendering = CONVERT(CHAR(8),DATEADD(ms,el.TimeRendering,0),108)
126-
, OrderbyDate = CAST(TimeStart AS DATETIME)
121+
, [TotalSeconds] = CONVERT(CHAR(8),DATEADD(ms, (el.[TimeDataRetrieval] + el.[TimeProcessing] + el.[TimeRendering]), 0), 108)
122+
, [TimeDataRetrieval] = CONVERT(CHAR(8),DATEADD(ms, el.[TimeDataRetrieval], 0), 108)
123+
, [TimeProcessing] = CONVERT(CHAR(8),DATEADD(ms, el.[TimeProcessing], 0), 108)
124+
, [TimeRendering] = CONVERT(CHAR(8),DATEADD(ms, el.[TimeRendering], 0), 108)
125+
, [OrderbyDate] = CAST([TimeStart] AS DATETIME)
127126
FROM
128127
report_catalog AS rpt
129-
LEFT JOIN dbo.ExecutionLog AS el ON el.ReportID = rpt.ItemID
130-
LEFT JOIN report_users AS usr ON el.UserName = usr.UserName
128+
LEFT JOIN dbo.[ExecutionLog] AS el ON el.[ReportID] = rpt.[ItemID]
129+
LEFT JOIN report_users AS usr ON el.[UserName] = usr.[UserName]
131130
WHERE
132131
1=1
133132
AND (@all_value IN(@LogStatus) OR el.[Status] IN(@LogStatus))
134-
AND (@all_value IN (@ReportFolder) OR rpt.ReportFolder IN(@ReportFolder))
135-
AND (@all_value IN(@ReportName) OR rpt.ReportName IN(@ReportName))
136-
AND (@all_value IN(@UserName) OR usr.SimpleUserName IN(@UserName))
137-
AND (@StartDate IS NULL OR CONVERT(DATETIME, CONVERT(VARCHAR(11),el.TimeStart,13)) &gt;= @StartDate)
138-
AND (@EndDate IS NULL OR CONVERT(DATETIME, CONVERT(VARCHAR(11),el.TimeStart,13)) &lt;= @EndDate)</CommandText>
133+
AND (@all_value IN (@ReportFolder) OR rpt.[ReportFolder] IN(@ReportFolder))
134+
AND (@all_value IN(@ReportName) OR rpt.[ReportName] IN(@ReportName))
135+
AND (@all_value IN(@UserName) OR usr.[SimpleUserName] IN(@UserName))
136+
AND (@StartDate IS NULL OR CONVERT(DATETIME, CONVERT(VARCHAR(11), el.[TimeStart], 13)) &gt;= @StartDate)
137+
AND (@EndDate IS NULL OR CONVERT(DATETIME, CONVERT(VARCHAR(11), el.[TimeStart], 13)) &lt;= @EndDate)</CommandText>
139138
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
140139
</Query>
141140
<Fields>
@@ -449,7 +448,9 @@ WHERE
449448
<Style>
450449
<FontFamily>Tahoma</FontFamily>
451450
<FontSize>8pt</FontSize>
451+
<FontWeight>Medium</FontWeight>
452452
<Format>#,#.00</Format>
453+
<Color>#5b5b5b</Color>
453454
</Style>
454455
</TextRun>
455456
</TextRuns>
@@ -507,7 +508,9 @@ WHERE
507508
<Style>
508509
<FontFamily>Tahoma</FontFamily>
509510
<FontSize>8pt</FontSize>
511+
<FontWeight>Medium</FontWeight>
510512
<Format>#,#.00</Format>
513+
<Color>#5b5b5b</Color>
511514
</Style>
512515
</TextRun>
513516
</TextRuns>
@@ -560,7 +563,9 @@ WHERE
560563
<Style>
561564
<FontFamily>Tahoma</FontFamily>
562565
<FontSize>8pt</FontSize>
566+
<FontWeight>Medium</FontWeight>
563567
<Format>#,#.00</Format>
568+
<Color>#5b5b5b</Color>
564569
</Style>
565570
</TextRun>
566571
</TextRuns>
@@ -618,7 +623,9 @@ WHERE
618623
<Style>
619624
<FontFamily>Tahoma</FontFamily>
620625
<FontSize>8pt</FontSize>
626+
<FontWeight>Medium</FontWeight>
621627
<Format>#,#.00</Format>
628+
<Color>#5b5b5b</Color>
622629
</Style>
623630
</TextRun>
624631
</TextRuns>
@@ -676,7 +683,9 @@ WHERE
676683
<Style>
677684
<FontFamily>Tahoma</FontFamily>
678685
<FontSize>8pt</FontSize>
686+
<FontWeight>Medium</FontWeight>
679687
<Format>#,#.00</Format>
688+
<Color>#5b5b5b</Color>
680689
</Style>
681690
</TextRun>
682691
</TextRuns>
@@ -726,7 +735,9 @@ WHERE
726735
<Style>
727736
<FontFamily>Tahoma</FontFamily>
728737
<FontSize>8pt</FontSize>
738+
<FontWeight>Medium</FontWeight>
729739
<Format>#,#.00</Format>
740+
<Color>#5b5b5b</Color>
730741
</Style>
731742
</TextRun>
732743
</TextRuns>
@@ -776,7 +787,9 @@ WHERE
776787
<Style>
777788
<FontFamily>Tahoma</FontFamily>
778789
<FontSize>8pt</FontSize>
790+
<FontWeight>Medium</FontWeight>
779791
<Format>#,#.00</Format>
792+
<Color>#5b5b5b</Color>
780793
</Style>
781794
</TextRun>
782795
</TextRuns>
@@ -826,7 +839,9 @@ WHERE
826839
<Style>
827840
<FontFamily>Tahoma</FontFamily>
828841
<FontSize>8pt</FontSize>
842+
<FontWeight>Medium</FontWeight>
829843
<Format>#,#.00</Format>
844+
<Color>#5b5b5b</Color>
830845
</Style>
831846
</TextRun>
832847
</TextRuns>
@@ -876,7 +891,9 @@ WHERE
876891
<Style>
877892
<FontFamily>Tahoma</FontFamily>
878893
<FontSize>8pt</FontSize>
894+
<FontWeight>Medium</FontWeight>
879895
<Format>#,#.00</Format>
896+
<Color>#5b5b5b</Color>
880897
</Style>
881898
</TextRun>
882899
</TextRuns>
@@ -926,7 +943,9 @@ WHERE
926943
<Style>
927944
<FontFamily>Tahoma</FontFamily>
928945
<FontSize>8pt</FontSize>
946+
<FontWeight>Medium</FontWeight>
929947
<Format>#,#.00</Format>
948+
<Color>#5b5b5b</Color>
930949
</Style>
931950
</TextRun>
932951
</TextRuns>
@@ -976,7 +995,9 @@ WHERE
976995
<Style>
977996
<FontFamily>Tahoma</FontFamily>
978997
<FontSize>8pt</FontSize>
998+
<FontWeight>Medium</FontWeight>
979999
<Format>#,#.00</Format>
1000+
<Color>#5b5b5b</Color>
9801001
</Style>
9811002
</TextRun>
9821003
</TextRuns>
@@ -1026,7 +1047,9 @@ WHERE
10261047
<Style>
10271048
<FontFamily>Tahoma</FontFamily>
10281049
<FontSize>8pt</FontSize>
1050+
<FontWeight>Medium</FontWeight>
10291051
<Format>#,#.00</Format>
1052+
<Color>#5b5b5b</Color>
10301053
</Style>
10311054
</TextRun>
10321055
</TextRuns>
@@ -1076,7 +1099,9 @@ WHERE
10761099
<Style>
10771100
<FontFamily>Tahoma</FontFamily>
10781101
<FontSize>8pt</FontSize>
1102+
<FontWeight>Medium</FontWeight>
10791103
<Format>#,#.00</Format>
1104+
<Color>#5b5b5b</Color>
10801105
</Style>
10811106
</TextRun>
10821107
</TextRuns>
@@ -1126,7 +1151,9 @@ WHERE
11261151
<Style>
11271152
<FontFamily>Tahoma</FontFamily>
11281153
<FontSize>8pt</FontSize>
1154+
<FontWeight>Medium</FontWeight>
11291155
<Format>#,#.00</Format>
1156+
<Color>#5b5b5b</Color>
11301157
</Style>
11311158
</TextRun>
11321159
</TextRuns>
@@ -1176,7 +1203,9 @@ WHERE
11761203
<Style>
11771204
<FontFamily>Tahoma</FontFamily>
11781205
<FontSize>8pt</FontSize>
1206+
<FontWeight>Medium</FontWeight>
11791207
<Format>#,#.00</Format>
1208+
<Color>#5b5b5b</Color>
11801209
</Style>
11811210
</TextRun>
11821211
</TextRuns>
@@ -1226,7 +1255,9 @@ WHERE
12261255
<Style>
12271256
<FontFamily>Tahoma</FontFamily>
12281257
<FontSize>8pt</FontSize>
1258+
<FontWeight>Medium</FontWeight>
12291259
<Format>#,#.00</Format>
1260+
<Color>#5b5b5b</Color>
12301261
</Style>
12311262
</TextRun>
12321263
</TextRuns>
@@ -2393,7 +2424,7 @@ WHERE
23932424
</TablixMember>
23942425
</TablixMembers>
23952426
</TablixRowHierarchy>
2396-
<DataSetName>DataSet</DataSetName>
2427+
<DataSetName>ExecutionLogs</DataSetName>
23972428
<PageBreak>
23982429
<BreakLocation>Start</BreakLocation>
23992430
</PageBreak>
@@ -2797,8 +2828,14 @@ WHERE
27972828
</EmbeddedImages>
27982829
<Language>en-US</Language>
27992830
<Variables>
2831+
<Variable Name="ColorCandyStripeEvenRow">
2832+
<Value>#FFFFFF</Value>
2833+
</Variable>
2834+
<Variable Name="ColorCandyStripeOddRow">
2835+
<Value>WhiteSmoke</Value>
2836+
</Variable>
28002837
<Variable Name="ColorTableHeader">
2801-
<Value>Gainsboro</Value>
2838+
<Value>WhiteSmoke</Value>
28022839
</Variable>
28032840
<Variable Name="FormatDate">
28042841
<Value>dd-MMM-yyyy</Value>
@@ -2840,4 +2877,4 @@ WHERE
28402877
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
28412878
<rd:ReportUnitType>Cm</rd:ReportUnitType>
28422879
<rd:ReportID>83036679-a77a-400c-bce9-3fbcfe4dca09</rd:ReportID>
2843-
</Report>
2880+
</Report>

0 commit comments

Comments
 (0)