If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

create Current year & current month

Started by anilkumar, 14 Nov 2011 04:32:54 AM

Previous topic - Next topic

anilkumar

hi

In Report  YEAR_MONTH Query Item is there , now i want to create CURRENT YEAR MONTH

YEAR_MONTH contains values like this(201101,201102 up to 201110)

now i want  to show CURRENT YEAR MONTH (THIS REPORT RUN EVERYMONTH ONCE)

I dont want prompt, i tried maximum function

please help

Thanks & Regards
Anil K.MARRI

HalfBloodPrince

Try This
creat query calculation 'Sysdate'->SYSDate() then set proper formatting  of column as yyyy/mm/dd .
then create another query calculation as Extract->cast(Extract(year,[Sysdate()]),varchar(10) )+cast(Extract(month,[Sysdate()]),varchar(10))

then set ur filter as
YEAR_MONTH=extract

may required conversion of YEAR_MONTH to varchar(10) if it is a integer.

Thanks,

anilkumar

#2
  Hi HalfBloodPrince

thanks for helping

i got the results but here current month means 201110 not 201111, iam using sybase data



please  help me

Thanks & Regards
Anil K.Marri

HalfBloodPrince

If it is always a 1 month back then change the last part of calculation as

+cast( (Extract(month,sysdate())-1),varchar(10))

Thanks,
HalfBloodPrince