COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: JoOne on 08 May 2009 07:34:28 AM

Title: Expression definition for selection of a text string
Post by: JoOne on 08 May 2009 07:34:28 AM
Hello,

I need some help or useful input for an expression definition in order to make a report look better.
When I run my report the REPORT NAME column gives me, for example:
"report[@name='Basis_for_Invoicing_xxx_or_yyy_or_zzz']"

What I want to capture is the "Basis_for_Invoicing_xxx_or_yyy_or_zzz" string. But there´s also other report names that are both longer and shorter than this example.

What should I use for functions? Be aware that I´m pretty "green"  in the Cognos environment ;), but all feedback is appreciated.

Best regards,
Johan
Title: Re: Expression definition for selection of a text string
Post by: jayani on 08 May 2009 10:05:29 AM
Johan,

When I used the function ReportName() (I am in 8.2 environment),
I am getting the exact report name( i.e. Basis_for_Invoicing_xxx_or_yyy_or_zzz).

But when I use ReportPath() , I am getting something similar to that you have mentioned like
CAMID("BSCCustomAuth:u:n=2235951")/folder[@name='My Folders']/folder[@name='Default Queing']/report[@name='Basis_for_Invoicing_xxx_or_yyy_or_zzz']

So you can get the exact output when u use ReportName() function in Layout Calculation.

~ Jayani
Title: Re: Expression definition for selection of a text string
Post by: JoOne on 09 May 2009 08:49:13 AM
Hi,

Thanks, I will try that when I get back to work on monday. It was my collegue who made the report in the first place, so she might have done it differently.

Best regards,
Johan