COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: krishdw85 on 28 Sep 2010 05:17:55 AM

Title: Hi all urgent issue
Post by: krishdw85 on 28 Sep 2010 05:17:55 AM
Based on the current month ...my report should produce only that month report...can i have the solution pls


One more for this current report only last 15 days from the current date???
Title: Re: Hi all urgent issue
Post by: gshilpa24 on 28 Sep 2010 05:34:42 AM
Can u please elaborate ? Are you using the prompts and what data do u have?
Title: Re: Hi all urgent issue
Post by: krishdw85 on 28 Sep 2010 05:47:02 AM
Hi.....having relational DB.

i have to keep a filter condition ......hardcoded
that should run based on the current system month.

for ex system date........in the yyyymmdd format

what should i mention in the filter condition.....

thx for ur post
Title: Re: Hi all urgent issue
Post by: technomorph on 28 Sep 2010 05:57:29 AM
This is still a bit vague.

Maybe this is what you're looking for:

[Date] between _first_of_month (current_date) and _last_of_month (current_date)
Title: Re: Hi all urgent issue
Post by: krishdw85 on 28 Sep 2010 06:39:18 AM
Whenever the user runs the report ........i need a particular current year with the current month data.
EX:Sep 28 2010 if this is a system date i need the information in my report should be sep 2010 report.

I need a hardcoded filter or if not prompt is possible??

thanx for ur patience ........
Title: Re: Hi all urgent issue
Post by: kattaviz on 28 Sep 2010 11:42:55 AM
Hi,

What is the DB column u r filtering on?.

Example:

If you are filtering on Year and Month, you can extract Year and Month from system date and pass the same to your query. Something like ([YEAR]=year(current_date) and [MONTH]=month(current_date)).

HTH
Title: Re: Hi all urgent issue
Post by: cognostechie on 28 Sep 2010 06:17:17 PM
Quote from: krishdw85 on 28 Sep 2010 06:39:18 AM
Whenever the user runs the report ........i need a particular current year with the current month data.
EX:Sep 28 2010 if this is a system date i need the information in my report should be sep 2010 report.

I need a hardcoded filter or if not prompt is possible??

thanx for ur patience ........

I don't know what is the name of your Date field so presuming you Date field name is - 'TR_DATE', try this in the filter condition:

cast(extract(year,TR_DATE),integer) = cast(extract(year,current_date),integer) and
cast(extract(month,TR_DATE),integer) = cast(extract(month,current_date),integer)

Though there is no need to convert the result of an extract function to integer but I don't know what format your TR_DATE is in so just being safe.

Next time your post is not clear and I see that you did not make your efforts in being clear and posted just a verbese language, I will definately not reply.