COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Cognos Administration => Topic started by: joseph123 on 05 Dec 2013 07:02:26 PM

Title: How to Remove ]/report@name=' from REPORTS]/report[@name='Cognos sample Report'
Post by: joseph123 on 05 Dec 2013 07:02:26 PM
Hi,

I am working on some Cognos Audit reports to find out report usage and I found Report search path as REPORTS]/report[@name='Cognos sample Report'].
I need to remove ]/report@name=' from the path so that the column displays as Reports/Cognos sample Report.
I used REPLACE and TRANSLATE functions to remove the special characters but it says "UDA-SQL-0219 The function "replace" is being used for local processing but is not available as a built-in function, or at least one of its parameters is not supported."
Using Cognos 10.2 and Oracle DB.

Please help.

Thanks,
Joseph
Title: Re: How to Remove ]/report@name=' from REPORTS]/report[@name='Cognos sample Report'
Post by: Jiayue.lin on 05 Dec 2013 09:26:22 PM
Hi Joseph,

I think  you can use Report name instead of Report search path, just add 'Report/' before Report name.

Regards,
Lin
Title: Re: How to Remove ]/report@name=' from REPORTS]/report[@name='Cognos sample Report'
Post by: Brentnik on 04 Feb 2016 04:09:37 PM
I think this is what you want.  8)

You must create a separate data item, and use [COGIPF_RUNREPORT].[REPORT PATH] instead of [Report search path].

replace(replace(replace(replace(replace([COGIPF_RUNREPORT].[REPORT PATH]  ,'folder[@name=''') ,'report[@name='''),'reportView[@name='''),'query[@name='''),''']')


That handles most of the cases; there may be others you might want to add such as for CAMID cases.