COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: gvpreddy on 09 Jun 2010 04:26:22 AM

Title: working on prompts
Post by: gvpreddy on 09 Jun 2010 04:26:22 AM
i have a requirement that when i enter the 1 in prompt i should get the last one year data , enter 2 should get the last 2 years data, enter 3 should get the last 3 years data.... there is any way to do this ,,,,,.......... pls post the answer ........... thanks
Title: Re: working on prompts
Post by: colt on 09 Jun 2010 06:58:20 AM
Assuming you have a dataitem for Actual year, you can use prompt value as parameter in parallelPeriod function to get the first year to be used.
With help of [Fistyear], [ActualYear] - Dataitems and the functions periodstodate and except, it should be possible to define a dataitem as needed.

Colt