COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: coghost on 25 Mar 2008 06:26:50 AM

Title: 1 yr prior data
Post by: coghost on 25 Mar 2008 06:26:50 AM
Hi,

I have a list report with PO Date col. The purpose is, the user should select a date.Based on this selected date all data for PO Date between (1 yr prior to date selected by user )and (date selected by user shud be displayed).
Eg- if the date selected by user is 20071024(yyyymmdd) , then data for PO Date between 20061024 and 20071024 shud be displayed.
Try1- i have a value propmt with parameter p_date on PO Date. I have added a data item with calc in expression editor as  _add_years((cast(?p_date?),date),-1) .
If I select date as 20070124, it is displaying data where PO Date is 20060124 only.
TRY2-I also tried adding filter on PO Date as PO DATE between_add_years((cast(?p_date?),date),-1) and ?(p_date?).But report is not getting validated..
How do i get all 12 months prior data according to the date selected by the user?