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 >A list of the data sources and the reports that relate to them</Description >
44 <Author >Anthony Duguid</Author >
1111 </DataSource >
1212 </DataSources >
1313 <DataSets >
14- <DataSet Name =" DataSet " >
14+ <DataSet Name =" DataSources " >
1515 <Query >
1616 <DataSourceName >ReportServer</DataSourceName >
1717 <CommandText >/*'-------------------------------------------------------------------------
@@ -32,40 +32,42 @@ shared_datasource
3232AS
3333(
3434 SELECT
35- DsnSharedName = sds.[Name]
36- , DsnPath = sds.[Path]
37- , DEF = CONVERT(xml, CONVERT(varbinary(max), content ))
35+ [ DsnSharedName] = sds.[Name]
36+ , [ DsnPath] = sds.[Path]
37+ , [ DEF] = CONVERT(xml, CONVERT(varbinary(max), sds.[Content] ))
3838 FROM
3939 dbo.[Catalog] AS sds
40- WHERE sds.[Type] = 5) --> 5 = Shared Datasource
40+ WHERE sds.[Type] = 5 --> 5 = Shared Datasource
41+ )
4142,
42- data_source_name (DsnPath, DsnSharedName, DsnConnString)
43+ data_source_name ([ DsnPath], [ DsnSharedName], [ DsnConnString] )
4344AS
4445(
4546 SELECT
46- cn.DsnPath
47- , cn.DsnSharedName
48- , cn.DsnConnString
47+ cn.[ DsnPath]
48+ , cn.[ DsnSharedName]
49+ , cn.[ DsnConnString]
4950 FROM
5051 (SELECT
51- sd.DsnPath
52- , sd.DsnSharedName
53- , DsnConnString = dsn.value('ConnectString[1]', 'varchar(150)')
52+ sd.[ DsnPath]
53+ , sd.[ DsnSharedName]
54+ , [ DsnConnString] = dsn.value('ConnectString[1]', 'varchar(150)')
5455 FROM
5556 shared_datasource AS sd
5657 CROSS APPLY sd.DEF.nodes('/DataSourceDefinition') AS R(dsn)
5758 ) AS cn
5859)
5960SELECT
60- DataSource = lk.[Name]
61- , dsn.DsnPath
62- , dsn.DsnConnString
63- , ReportName = c.[Name]
61+ [DataSource] = lk.[Name]
62+ , dsn.[DsnPath]
63+ , dsn.[DsnConnString]
64+ , [ReportName] = c.[Name]
65+ , [FolderUrl] = 'http://' + Host_Name() + '/Reports/manage/catalogitem/properties/Data%20Sources/' + lk.[Name]
6466FROM
6567 dbo.[Catalog] c
66- INNER JOIN dbo.DataSource ds ON c.ItemID = ds.ItemID
67- INNER JOIN dbo.[Catalog] lk ON ds.Link = lk.ItemID
68- INNER JOIN data_source_name dsn ON dsn.DsnSharedName = lk.[Name]
68+ INNER JOIN dbo.[ DataSource] ds ON c.[ ItemID] = ds.[ ItemID]
69+ INNER JOIN dbo.[Catalog] lk ON ds.[ Link] = lk.[ ItemID]
70+ INNER JOIN data_source_name dsn ON dsn.[ DsnSharedName] = lk.[Name]
6971WHERE
7072 c.[Type] = 2 --> 2 = Reports
7173 --AND dsn.DsnConnString LIKE '%Initial Catalog%=%DatabaseNameHere%' </CommandText >
8890 <DataField >DsnConnString</DataField >
8991 <rd : TypeName >System.String</rd : TypeName >
9092 </Field >
93+ <Field Name =" FolderUrl" >
94+ <DataField >FolderUrl</DataField >
95+ <rd : TypeName >System.String</rd : TypeName >
96+ </Field >
9197 </Fields >
9298 </DataSet >
9399 </DataSets >
@@ -131,7 +137,9 @@ WHERE
131137 <Style >
132138 <FontFamily >Tahoma</FontFamily >
133139 <FontSize >8pt</FontSize >
140+ <FontWeight >Medium</FontWeight >
134141 <Format >#,#.00</Format >
142+ <Color >#5b5b5b</Color >
135143 </Style >
136144 </TextRun >
137145 </TextRuns >
@@ -187,7 +195,9 @@ WHERE
187195 <Style >
188196 <FontFamily >Tahoma</FontFamily >
189197 <FontSize >8pt</FontSize >
198+ <FontWeight >Medium</FontWeight >
190199 <Format >#,#.00</Format >
200+ <Color >#5b5b5b</Color >
191201 </Style >
192202 </TextRun >
193203 </TextRuns >
@@ -240,7 +250,9 @@ WHERE
240250 <Style >
241251 <FontFamily >Tahoma</FontFamily >
242252 <FontSize >8pt</FontSize >
253+ <FontWeight >Medium</FontWeight >
243254 <Format >#,#.00</Format >
255+ <Color >#5b5b5b</Color >
244256 </Style >
245257 </TextRun >
246258 </TextRuns >
@@ -287,11 +299,19 @@ WHERE
287299 <TablixCells >
288300 <TablixCell >
289301 <CellContents >
290- <Image Name =" image8 " >
302+ <Image Name =" imgDataSource " >
291303 <Source >Embedded</Source >
292304 <Value >datasource</Value >
293305 <Sizing >Clip</Sizing >
306+ <ActionInfo >
307+ <Actions >
308+ <Action >
309+ <Hyperlink >="javascript:void(window.open('"+ Fields!FolderUrl.Value + "','_blank'))"</Hyperlink >
310+ </Action >
311+ </Actions >
312+ </ActionInfo >
294313 <ZIndex >15</ZIndex >
314+ <ToolTip >Go to the datasource</ToolTip >
295315 <Style >
296316 <Border >
297317 <Width >0.5pt</Width >
@@ -478,7 +498,7 @@ WHERE
478498 </TablixCell >
479499 <TablixCell >
480500 <CellContents >
481- <Image Name =" image9 " >
501+ <Image Name =" imgReport " >
482502 <Source >Embedded</Source >
483503 <Value >report</Value >
484504 <Sizing >Clip</Sizing >
@@ -503,6 +523,7 @@ WHERE
503523 <PaddingTop >1.5pt</PaddingTop >
504524 </Style >
505525 </Image >
526+ <rd : Selected >true</rd : Selected >
506527 </CellContents >
507528 </TablixCell >
508529 <TablixCell >
@@ -663,7 +684,7 @@ WHERE
663684 </TablixMembers >
664685 </TablixRowHierarchy >
665686 <KeepTogether >true</KeepTogether >
666- <DataSetName >DataSet </DataSetName >
687+ <DataSetName >DataSources </DataSetName >
667688 <Height >2.17354cm</Height >
668689 <Width >24.95098cm</Width >
669690 <Style >
@@ -788,8 +809,14 @@ dQAAAABJRU5ErkJggg==</ImageData>
788809 </EmbeddedImages >
789810 <Language >en-US</Language >
790811 <Variables >
812+ <Variable Name =" ColorCandyStripeEvenRow" >
813+ <Value >#FFFFFF</Value >
814+ </Variable >
815+ <Variable Name =" ColorCandyStripeOddRow" >
816+ <Value >WhiteSmoke</Value >
817+ </Variable >
791818 <Variable Name =" ColorTableHeader" >
792- <Value >Gainsboro </Value >
819+ <Value >WhiteSmoke </Value >
793820 </Variable >
794821 <Variable Name =" FormatDate" >
795822 <Value >dd-MMM-yyyy</Value >
@@ -817,4 +844,4 @@ dQAAAABJRU5ErkJggg==</ImageData>
817844 <ConsumeContainerWhitespace >true</ConsumeContainerWhitespace >
818845 <rd : ReportUnitType >Cm</rd : ReportUnitType >
819846 <rd : ReportID >83036679-a77a-400c-bce9-3fbcfe4dca09</rd : ReportID >
820- </Report >
847+ </Report >
0 commit comments