COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: pooja on 22 Oct 2008 01:46:59 PM

Title: selecting date range
Post by: pooja on 22 Oct 2008 01:46:59 PM
I am trying to get some product IDs like 500,501,502,503 and504 from date range.But
If we select just a month(any like from Jan1 to Jan 31o or any) then we need  only 500 and 501 AND from the same report if we select date for year like any 12 months then we need all 500,5001,502,503 and 504. So far I amgetting only one value either Yearly or either manth.
Could you please give me some pop-up wayout .

pj
Title: Re: selecting date range
Post by: Suraj on 22 Oct 2008 05:57:11 PM
when you filter data with a date range, data will be filtered automatically.
Title: Re: selecting date range
Post by: pooja on 22 Oct 2008 08:57:46 PM
thank you surj

but i need only 2 codes when we select month and need 5 codes when we select a year.thats the difficulties i am facing that how to get those.
thank you

pj
Title: Re: selecting date range
Post by: SSN on 23 Oct 2008 12:48:19 AM
Be more specific on your prompts.
Do you have Date prompt for Range or you have value prompts for Month and year?
are Product IDs are hard coded vlues?

SSN
Title: Re: selecting date range
Post by: pooja on 23 Oct 2008 07:41:48 AM
hello SSN, thank you

here is my details.

We have date range (from-to) prompt on prompt page. we are using this same report for annual version and as well as monthly version too.
and here are condition i wrote for yearly.........but if we want monthly then we dont need code 101.so how we can achieve both the version from same report.please



IF([Reverse_Mortgage].[transactions].[IDSTRANSACTIONCODE]in(101,102,40,41,42,43,44,45,46,47,48,49,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99) and [Reverse_Mortgage].[transactions].[DTMEFFECTIVEDATE]=[Reverse_Mortgage].[transactions].[DTMEFFECTIVEDATE])THEN
([Reverse_Mortgage].[transactions].[DTMEFFECTIVEDATE])
ELSE
(null)

thank you


Title: Re: selecting date range
Post by: Suraj on 23 Oct 2008 09:39:24 AM
use a case statement in your filter that takes care of month prompt if it is selected otherwise takes year prompt.
Title: Re: selecting date range
Post by: pooja on 23 Oct 2008 11:16:31 AM
its not about filter
I am talking about the data item. the expression are from data item.....we have just the date range in prompt page..............