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

Semi monthly data in report

Started by kbasha2004, 22 Apr 2008 04:25:21 PM

Previous topic - Next topic

kbasha2004

Hi Friends,

I need to create a report that pull the data for the semi-monthly when it is run on the next day of semi-month.

example
Jan 1 - Jan 15 data when run on Jan 16.......till Jan 29th

Jan 16- Jan 31 data when run on Feb 1.......till Feb 14th

Feb 1 - Feb 14 data when run on Feb 15.......till Feb 28th

keeping in the mind leap year and also Month with 30 days and 31 days.

friends please help me with reportnet function /logic that will pull the data.

Thanks

kbasha2004

almeids

I think what you really need is a function to tell your employers they're nuts.
Seriously, I don't think there's anything you're going to be able to do to handle leap year within Report Studio.  Given the static nature of the rule, your best bet may be to add a database table to drive this, 366 records with Run date, Start Range Date, End Range Date.  You can use real dates and replace the year in RS, or partial date (month and day) strings and construct the date in RS.
If that's not an option, what database are you on?  You're going to need a way to determine the number of days in the month and vendor-specific functions may help.

GovGuy

You can use the mod function to determine if a given year is a leap year.  It would look something like this:


IF (
MOD(current_date,400)=0 OR ( MOD(current_date,4)=0 AND MOD(current_date,100)<>0 )
)
Then
('Leap Year')
Else
('Not a Leap Year')