Skip to content

Commit 2b0e9e0

Browse files
authored
Update Heatmap Calendar.rdl
1 parent b5a7754 commit 2b0e9e0

File tree

1 file changed

+77
-77
lines changed

1 file changed

+77
-77
lines changed

ServerReports/Heatmap Calendar.rdl

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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">
3-
<Description>Campus Booking Calendar Report</Description>
3+
<Description>Execution Log Heatmap Report</Description>
44
<Author>Anthony Duguid</Author>
55
<AutoRefresh>0</AutoRefresh>
66
<DataSources>
77
<DataSource Name="ReportServer">
88
<DataSourceReference>ReportServer</DataSourceReference>
99
<rd:SecurityType>None</rd:SecurityType>
10-
<rd:DataSourceID>cc67775e-6c62-4d4d-bff8-15202ff5f91a</rd:DataSourceID>
10+
<rd:DataSourceID>9c5d5e18-ddee-41b3-ae49-8d83f261caf6</rd:DataSourceID>
1111
</DataSource>
1212
</DataSources>
1313
<DataSets>
@@ -70,9 +70,9 @@ week_list
7070
AS
7171
(
7272
SELECT
73-
week_date = DATEADD(d, 1, DATEADD(wk, wks.[number], DATEADD(yy, DATEDIFF(yy, 0, @StartDate), 0)))
73+
[week_date] = DATEADD(d, 1, DATEADD(wk, wks.[number], DATEADD(yy, DATEDIFF(yy, 0, @StartDate), 0)))
7474
FROM
75-
master.dbo.spt_values AS wks
75+
master.dbo.[spt_values] AS wks
7676
WHERE
7777
1=1 -- used in testing to be able to comment out other clauses below
7878
AND wks.[type] = 'P'
@@ -83,13 +83,13 @@ week_list_format
8383
AS
8484
(
8585
SELECT
86-
front_end_week_number = DATEPART(wk, yw.week_date)
87-
, yw.week_date
86+
[front_end_week_number] = DATEPART(wk, yw.[week_date])
87+
, yw.[week_date]
8888
FROM
8989
week_list AS yw
9090
WHERE
9191
1=1 -- used in testing to be able to comment out other clauses below
92-
AND (yw.week_date BETWEEN @StartDate AND @EndDate)
92+
AND (yw.[week_date] BETWEEN @StartDate AND @EndDate)
9393
)
9494
,
9595
day_list
@@ -109,31 +109,31 @@ AS
109109
report_users
110110
AS
111111
(
112-
SELECT UserID, UserName, SimpleUserName = UPPER(RIGHT(UserName, (LEN(UserName)-CHARINDEX('\',UserName)))) FROM dbo.Users
112+
SELECT [UserID], [UserName], [SimpleUserName] = UPPER(RIGHT([UserName], (LEN([UserName])-CHARINDEX('\', [UserName])))) FROM dbo.[Users]
113113
)
114114
,
115115
report_catalog
116116
AS
117117
(
118118
SELECT
119-
rpt.ItemID
120-
, rpt.CreatedById
121-
, rpt.ModifiedById
119+
rpt.[ItemID]
120+
, rpt.[CreatedById]
121+
, rpt.[ModifiedById]
122122
, rpt.[Type]
123123
, rpt.[Name]
124-
, ReportName = rpt.[Name]
124+
, [ReportName] = rpt.[Name]
125125
, rpt.[Description]
126-
, rpt.Parameter
127-
, CreationDate = CONVERT(DATETIME, CONVERT(VARCHAR(11), rpt.CreationDate, 13))
128-
, ModifiedDate = CONVERT(DATETIME, CONVERT(VARCHAR(11), rpt.ModifiedDate, 13))
129-
, ReportFolder = SUBSTRING(rpt.[Path], 2, Len(rpt.[Path])-Len(rpt.[Name])-2)
126+
, rpt.[Parameter]
127+
, [CreationDate] = CONVERT(DATETIME, CONVERT(VARCHAR(11), rpt.[CreationDate], 13))
128+
, [ModifiedDate] = CONVERT(DATETIME, CONVERT(VARCHAR(11), rpt.[ModifiedDate], 13))
129+
, [ReportFolder] = SUBSTRING(rpt.[Path], 2, Len(rpt.[Path])-Len(rpt.[Name])-2)
130130
, rpt.[Path]
131-
, 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'
132-
, 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]
133-
, ReportDefinition = CONVERT(VARCHAR(MAX), CONVERT(VARBINARY(MAX), rpt.Content))
134-
, HostName = Host_Name()
131+
, [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'
132+
, [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]
133+
, [ReportDefinition] = CONVERT(VARCHAR(MAX), CONVERT(VARBINARY(MAX), rpt.Content))
134+
, [HostName] = Host_Name()
135135
FROM
136-
dbo.Catalog AS rpt
136+
dbo.[Catalog] AS rpt
137137
WHERE
138138
1=1
139139
AND rpt.[Type] = 2
@@ -156,46 +156,46 @@ FROM
156156
WHERE
157157
1=1
158158
AND (@all_value IN(@LogStatus) OR el.[Status] IN(@LogStatus))
159-
AND (@all_value IN (@ReportFolder) OR rpt.ReportFolder IN(@ReportFolder))
160-
AND (@all_value IN(@ReportName) OR rpt.ReportName IN(@ReportName))
161-
AND (@all_value IN(@UserName) OR usr.SimpleUserName IN(@UserName))
162-
AND (@StartDate IS NULL OR CONVERT(DATETIME, CONVERT(VARCHAR(11),el.TimeStart,13)) &gt;= @StartDate)
163-
AND (@EndDate IS NULL OR CONVERT(DATETIME, CONVERT(VARCHAR(11),el.TimeStart,13)) &lt;= @EndDate)
159+
AND (@all_value IN (@ReportFolder) OR rpt.[ReportFolder] IN(@ReportFolder))
160+
AND (@all_value IN(@ReportName) OR rpt.[ReportName] IN(@ReportName))
161+
AND (@all_value IN(@UserName) OR usr.[SimpleUserName] IN(@UserName))
162+
AND (@StartDate IS NULL OR CONVERT(DATETIME, CONVERT(VARCHAR(11), el.[TimeStart], 13)) &gt;= @StartDate)
163+
AND (@EndDate IS NULL OR CONVERT(DATETIME, CONVERT(VARCHAR(11), el.[TimeStart], 13)) &lt;= @EndDate)
164164
)
165165
SELECT
166-
el.ReportName
167-
, el.day_name
168-
, el.day_of_week
169-
, el.front_end_week_number
170-
, el.week_date
171-
, el.day_event_count
166+
el.[ReportName]
167+
, el.[day_name]
168+
, el.[day_of_week]
169+
, el.[front_end_week_number]
170+
, el.[week_date]
171+
, el.[day_event_count]
172172
FROM
173173
execution_log AS el
174174
UNION
175175
SELECT
176-
ReportName = 'Week Date'
177-
, day_name = NULL
178-
, day_of_week = NULL
179-
, wlf.front_end_week_number
180-
, wlf.week_date
181-
, day_event_count = 0
176+
[ReportName] = 'Week Date'
177+
, [day_name] = NULL
178+
, [day_of_week] = NULL
179+
, wlf.[front_end_week_number]
180+
, wlf.[week_date]
181+
, [day_event_count] = 0
182182
FROM
183183
week_list_format AS wlf
184184
, execution_log
185185
UNION
186186
SELECT
187-
ReportName = 'Day Name'
188-
, dl.day_name
189-
, dl.day_of_week
190-
, front_end_week_number = NULL
191-
, week_date = NULL
192-
, day_event_count = 0
187+
[ReportName] = 'Day Name'
188+
, dl.[day_name]
189+
, dl.[day_of_week]
190+
, [front_end_week_number] = NULL
191+
, [week_date] = NULL
192+
, [day_event_count] = 0
193193
FROM
194194
day_list AS dl
195195
, execution_log
196196
WHERE
197197
1=1 -- change to 1=2 to hide the filler records during testing
198-
AND (dl.day_of_week IN (@day_of_week)) </CommandText>
198+
AND (dl.[day_of_week] IN (@day_of_week)) </CommandText>
199199
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
200200
</Query>
201201
<Fields>
@@ -257,15 +257,15 @@ current_year
257257
AS
258258
(
259259
SELECT
260-
year_first_date = DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0)
260+
[year_first_date] = DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0)
261261
)
262262
,
263263
year_end_date
264264
AS
265265
(
266266
SELECT
267-
year_first_date
268-
, year_last_date = DATEADD(yy, DATEDIFF(yy, 0, year_first_date) + 1, -1)
267+
[year_first_date]
268+
, [year_last_date] = DATEADD(yy, DATEDIFF(yy, 0, [year_first_date]) + 1, -1)
269269
FROM
270270
current_year
271271
)
@@ -274,31 +274,31 @@ default_values
274274
AS
275275
(
276276
SELECT
277-
year_first_date
278-
, year_last_date
279-
, year_first_monday = DATEADD(wk, DATEDIFF(wk,0, year_first_date), 0)
280-
, year_last_monday = DATEADD(wk, DATEDIFF(wk,0, year_last_date), 0)
277+
[year_first_date]
278+
, [year_last_date]
279+
, [year_first_monday] = DATEADD(wk, DATEDIFF(wk,0, [year_first_date]), 0)
280+
, [year_last_monday] = DATEADD(wk, DATEDIFF(wk,0, [year_last_date]), 0)
281281
FROM
282282
year_end_date
283283
)
284284
SELECT
285-
year_date = YEAR(year_first_date)
286-
, year_first_date
287-
, year_last_date
288-
, year_first_monday =
285+
[year_date] = YEAR([year_first_date])
286+
, [year_first_date]
287+
, [year_last_date]
288+
, [year_first_monday] =
289289
CASE
290-
WHEN YEAR(year_first_date) != YEAR(year_first_monday) THEN DATEADD(d, 7, year_first_monday)
291-
ELSE year_first_monday
290+
WHEN YEAR([year_first_date]) != YEAR([year_first_monday]) THEN DATEADD(d, 7, [year_first_monday])
291+
ELSE [year_first_monday]
292292
END
293-
, year_last_monday =
293+
, [year_last_monday] =
294294
CASE
295-
WHEN YEAR(year_first_date) != YEAR(year_last_monday) THEN DATEADD(d, -7, year_last_monday)
296-
ELSE year_last_monday
295+
WHEN YEAR([year_first_date]) != YEAR([year_last_monday]) THEN DATEADD(d, -7, [year_last_monday])
296+
ELSE [year_last_monday]
297297
END
298-
, current_week_monday = DATEADD(wk, DATEDIFF(wk,0, GETDATE()), 0)
299-
, null_string = '&lt;Undefined&gt;'
300-
, all_value = '&lt;ALL&gt;'
301-
, no_selection = '&lt;NONE&gt;'
298+
, [current_week_monday] = DATEADD(wk, DATEDIFF(wk,0, GETDATE()), 0)
299+
, [null_string] = '&lt;Undefined&gt;'
300+
, [all_value] = '&lt;ALL&gt;'
301+
, [no_selection] = '&lt;NONE&gt;'
302302
FROM
303303
default_values</CommandText>
304304
</Query>
@@ -375,13 +375,13 @@ AS
375375
, ( 8, 'Shared Dataset')
376376
, ( 9, 'Report Part')
377377
) tbl ([TypeID], [TypeDescription])
378-
WHERE TypeID = 2
378+
WHERE [TypeID] = 2
379379
)
380380
SELECT
381-
Report_Folder = SUBSTRING(c.Path, 2, Len(c.Path)-Len(c.Name)-2)
381+
[Report_Folder] = SUBSTRING(c.[Path], 2, Len(c.[Path])-Len(c.[Name])-2)
382382
FROM
383-
ReportServer.dbo.Catalog AS c WITH (NOLOCK)
384-
INNER JOIN catalog_type_description AS ctd ON ctd.TypeID = c.[Type]
383+
ReportServer.dbo.[Catalog] AS c WITH (NOLOCK)
384+
INNER JOIN catalog_type_description AS ctd ON ctd.[TypeID] = c.[Type]
385385
UNION
386386
SELECT @all_value
387387
ORDER BY 1</CommandText>
@@ -448,13 +448,13 @@ ORDER BY 1</CommandText>
448448
</QueryParameter>
449449
</QueryParameters>
450450
<CommandText>SELECT DISTINCT
451-
UserName = RIGHT(el.UserName,(LEN(el.UserName)-CHARINDEX('\',el.UserName)))
451+
[UserName] = RIGHT(el.[UserName],(LEN(el.[UserName])-CHARINDEX('\',el.[UserName])))
452452
FROM
453-
ReportServer.dbo.ExecutionLog el
454-
INNER JOIN ReportServer.dbo.Catalog c ON el.ReportID = c.ItemID
453+
ReportServer.dbo.[ExecutionLog] el
454+
INNER JOIN ReportServer.dbo.[Catalog] c ON el.[ReportID] = c.[ItemID]
455455
WHERE
456456
c.[TYPE] = 2
457-
AND (@all_value IN (@ReportFolder) OR SUBSTRING(c.Path, 2, Len(c.Path)-Len(c.Name)-2) IN(@ReportFolder))
457+
AND (@all_value IN (@ReportFolder) OR SUBSTRING(c.[Path], 2, Len(c.[Path])-Len(c.[Name])-2) IN(@ReportFolder))
458458
AND (@all_value IN(@ReportName) OR c.Name IN(@ReportName))
459459
UNION SELECT @all_value</CommandText>
460460
</Query>
@@ -474,8 +474,8 @@ UNION SELECT @all_value</CommandText>
474474
</QueryParameter>
475475
</QueryParameters>
476476
<CommandText>SELECT DISTINCT
477-
el.Status
478-
FROM ReportServer.dbo.ExecutionLog el
477+
el.[Status]
478+
FROM ReportServer.dbo.[ExecutionLog] el
479479
UNION SELECT @all_value</CommandText>
480480
</Query>
481481
<Fields>
@@ -1404,4 +1404,4 @@ WlsCs4wga8NhPk8ezRxQXlum4kAHbDYjXkctI7R3PrkhjF4lSTbmMFvQXCf1kiN3Xlq/Cjq+FTuBOagz
14041404
<rd:ReportUnitType>Cm</rd:ReportUnitType>
14051405
<rd:ReportServerUrl>http://pr-mis1/reportserver</rd:ReportServerUrl>
14061406
<rd:ReportID>7e5c8bcf-53be-4d06-a48c-31377cdfacc8</rd:ReportID>
1407-
</Report>
1407+
</Report>

0 commit comments

Comments
 (0)