XLCubed is table used

quick script to see if a table is used in a xlcubed report:


IF OBJECT_ID('tempdb..#ReportData') IS NOT NULL DROP TABLE #ReportData

SELECT
--DISTINCT
   fp.cPath  as ReportPath
 , r.[cName]  as ReportName
 , convert(varchar(8000),f.oData) as ReportData
into #ReportData
FROM [XLCubedWeb].[dbo].[XL3Reports] r
inner join [XLCubedWeb].[dbo].[XL3ReportFiles] rf
on r.nReportId = rf.nReportID
inner join [XLCubedWeb].[dbo].[XL3File] f
on  rf.nFileId = f.nFileID
inner join [XLCubedWeb].[dbo].[XL3FoldersWithPath] fp
on r.nFolderId = fp.nFolderID
where f.cName = 'workbook.xl3xml'

select ReportPath,ReportName from  #ReportData
where  ReportData like '%<<enter table_name>>%'

Comments

Post a Comment

Popular posts from this blog

XLCubed Show Hide Columns with button

XLCubed XL3ExecuteSQLProc error

XLCubed to which Cube or Database is a report connecting?