COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: andy_mason_84 on 15 Jun 2012 05:20:32 AM

Title: Triming what is returned using Report Expression ReportName()
Post by: andy_mason_84 on 15 Jun 2012 05:20:32 AM
Hi,

I have a report where I want to the pass the Report Name into the title of the report using ReportName()

However, the Report Name in Cognos Connection is always prefixed with 8 chars and an Underscore eg: -

TEST0001_Invoice Report

What i want to appear in the report when it is ran is Invoice Report.

Can you use substring with ReportName function?  And also i want to use this code for all reports and although the prefix is always the same the length of the report name will differ?

Any help would be appreciated,

Cheers,

Andy
Title: Re: Triming what is returned using Report Expression ReportName()
Post by: blom0344 on 15 Jun 2012 08:10:24 AM
Yes, you can use substring in a report expression. Just make sure that you define a large number for the positions to be shown..