COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: rhythmz on 15 Jun 2017 02:24:17 PM

Title: Returning various parts of the same string
Post by: rhythmz on 15 Jun 2017 02:24:17 PM

I am developing an audit report in which I want to obtain the folder path to a report. However, the best result set that I can get to is something similar to:

/content/folder[@name='Credit Group']/folder[@name='Account Management']/folder[@name='Loan Officer Portfolios']/report[@name='Credit Line Approvals']

I greatly desire to achieve an output like:

Credit Group/Account Management/Loan Officer Portfolios/Credit Line Approvals

However, I am literally  :-\ brain dead :-\ on how to accomplish this...SUBSTR comes to mind, however, the length of the string and occurrences of "']/folder[@name='" can vary according to the actual folder path. I am trying to determine those reports in my catalog that are NOT getting used regularly to archive....I can see 'last run date' but cannot determine the frequency of use with the current given RS parameters. BTW, I have no admin panel access.

Thank so much for any help provided,
Dennis
Title: Re: Returning various parts of the same string
Post by: New_Guy on 15 Jun 2017 08:34:07 PM
Hi,
You can try using position and substring get the desired output. I will find the actual sql that I got it to work.
Good luck
New guy


Sent from my iPhone using Tapatalk
Title: Re: Returning various parts of the same string
Post by: Lynn on 16 Jun 2017 01:58:13 AM
Quote from: rhythmz on 15 Jun 2017 02:24:17 PM
I am developing an audit report in which I want to obtain the folder path to a report. However, the best result set that I can get to is something similar to:

/content/folder[@name='Credit Group']/folder[@name='Account Management']/folder[@name='Loan Officer Portfolios']/report[@name='Credit Line Approvals']

I greatly desire to achieve an output like:

Credit Group/Account Management/Loan Officer Portfolios/Credit Line Approvals

However, I am literally  :-\ brain dead :-\ on how to accomplish this...SUBSTR comes to mind, however, the length of the string and occurrences of "']/folder[@name='" can vary according to the actual folder path. I am trying to determine those reports in my catalog that are NOT getting used regularly to archive....I can see 'last run date' but cannot determine the frequency of use with the current given RS parameters. BTW, I have no admin panel access.

Thank so much for any help provided,
Dennis

This post is a duplicate of this post (http://www.cognoise.com/index.php/topic,33183.0.html). I provided an answer already in the other post.
Title: Re: Returning various parts of the same string
Post by: rhythmz on 16 Jun 2017 08:33:35 AM
Honestly, I was looking for a previous post before I posted mine :o ....I swear... ;D

Thank you immensely for directing me to it!!!

Dennis