COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => COGNOS 8 Administration => Topic started by: fn4029 on 23 Feb 2012 09:44:16 AM

Title: finding all reports with certain column name
Post by: fn4029 on 23 Feb 2012 09:44:16 AM
Hello,

is there a way to find all reports that use a certain column name?  We need to change a calculation for all reports that use column "abc", don't want to open every single report and look in generated sql. 

Thanks!
fn4029
Title: Re: finding all reports with certain column name
Post by: Lynn on 23 Feb 2012 09:56:42 AM
The tools menu in Framework Manager has an option to find report dependencies. Select the column in question and then use that tool to find reports referencing it.
Title: Re: finding all reports with certain column name
Post by: MFGF on 23 Feb 2012 10:53:05 AM
The other option is if you have GO! Search, which has the ability to allow searching based on metadata or even data.
Title: Re: finding all reports with certain column name
Post by: Grim on 23 Feb 2012 11:32:35 AM
SDK can do this as well.

Not exactly what your looking for but the code could be modified from this base sample.
https://www-304.ibm.com/support/docview.wss?uid=swg21374788

I could have sworn I came across a sample that did what you are looking for. I'll edit my post if I find it.

Edit:
Could probably use the column code from thsi one to modify the original sample I posted.
https://www-304.ibm.com/support/docview.wss?uid=swg21373027
Title: Re: finding all reports with certain column name
Post by: fn4029 on 23 Feb 2012 11:50:16 AM
Thanks guys! Really appreciate the answers!  I will investigate all 3 methods. 

fn4029
Title: Re: finding all reports with certain column name
Post by: PRIT AMRIT on 12 Mar 2012 03:53:15 AM
I think you can search the columns in 'Package.xml' file as well.
Title: Re: finding all reports with certain column name
Post by: wyconian on 12 Mar 2012 04:31:55 AM
Hi

Another way of doing this is to search through the obj tables in the content store.  I think CMOBJPROPS7 has a field called spec which si the full xml spec of all reports.  You can search this for a particular string (i.e. column name). You will need to join this to CMOBJNAMES on cmid to get the name of the report.  I haven't found a way of getting the location of the report but when you have a list of the reports that have the column you're looking for you can search in the portal.

I think this only looks at public folders, anything in a users 'My Folders' won't be covered.  Obviously as this is searching the xml spec it isn't very fast but I think it is more accurate than the report dependencies function in FM (unless that has been improved in C10)