COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: danielwinston on 12 Dec 2018 02:40:21 AM

Title: List of LCRs pointing to a report
Post by: danielwinston on 12 Dec 2018 02:40:21 AM
I have a report which is used in the Layout Component Reference of multiple reports in a server. Is there a way I can find out all the reports containing a reference to the report?
Title: Re: List of LCRs pointing to a report
Post by: CognosPaul on 12 Dec 2018 09:20:53 AM
the only way I can think of would be to use a third party tool like metamanager or motio. Find the XML snippet and do a search for that.

An example snippet:

<layoutComponentRef refLayoutElement="Header"><reportPath path="/content/folder[@name='ReferenceLibrary']/report[@name='Sales Components Library']"><XMLAttributes><XMLAttribute xml:space="preserve" output="no" name="ReportName" value="Sales Components Library"/><XMLAttribute xml:space="preserve" output="no" name="ref_iid" value="i3669"/></XMLAttributes></reportPath></layoutComponentRef>
Title: Re: List of LCRs pointing to a report
Post by: Andrei I on 19 Dec 2018 03:15:35 PM
In theory you can export all reports into Export package (ZIP file).
Then Unzip the content of that package .
You should get file like following:
folder data
content.xml
exportRecord.xml
package1.xml

Open file package1.xml in editor (e.g. Notepad++) and look for all strings 'refLayoutElement=' 

You should be able to figure out how to get Report name from this :-)

If you are dealing with MANY reports (hundreds or thousands) then of course this will not work.
For these cases I am writing XSLT scripts to parse XML ....