0

I have an unknown number of reports that use a specific piece of custom code and I would like to be able to identify all reports that call this code.

The code looks like:

dim Counter as integer=0
Public function getCounter() as Integer
Counter=Counter+1
return Counter
end function

And I can look in the report code to see where this pieces resides:

<Code>dim Counter as integer=0
Public function getCounter() as Integer
Counter=Counter+1
return Counter
end function</Code>

But with hundreds of reports, I do not wish to go through them individually. Is there a way to search the ReportServer database to find this information?

Thanks,

MISNole
  • 992
  • 1
  • 22
  • 48

1 Answers1

1

The content column of the catalog table has the .rdl source. You can search it like this:

SELECT  name,Path       
FROM ReportServer.dbo.Catalog 
WHERE CAST(CAST(content AS varbinary(max)) AS varchar(max)) like '%dim Counter as integer%'
Wouter
  • 2,881
  • 2
  • 9
  • 22