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

 

What Date function needs to use to show future date in the report studio report

Started by cognoshelp@ymail.com, 26 Oct 2008 02:32:14 AM

Previous topic - Next topic

cognoshelp@ymail.com

Hello to all Cog gurus here,

Please share your idea, I need to show next week dates which I dont have in DB.
e.g report run date today=Oct 26,2008 (Sysdate) but in report I need to show whole this week i.e. Oct 27,2008,Oct 28 , Oct 29, Oct 30.....Nov 1 I need to show advance week before only.
My question here is will there be any function which I can use to show whole week by using sysdate?
its a cross tap report here columns is dates .

blom0344

_add_days(current_date,7)   _add_days(current_date,14)   etc

Then take the week part out of this set of future days

Did you bother to check which Cognos dates functions are available  ?

cognoshelp@ymail.com

Blom thanks for quick reply
i know this function but this will add 7 days to the current_date i.e it will add 7 days to the current day but I need continuous days. 26,27,28,29,30,31...... hope now its clear

Quote from: blom0344 on 26 Oct 2008 01:51:47 PM
_add_days(current_date,7)   _add_days(current_date,14)   etc

Then take the week part out of this set of future days

Did you bother to check which Cognos dates functions are available  ?

blom0344

You can define any increment you like, mine was just an example. The question is, what data will you want to associate with the future dates? If no data relates to the future dates, then you cannot enforce it in the crosstab.
To enable working with continous crosstabs (where columns are also shown for intersections with no data) we either define outer joins or ensure all combinations are in the dataset through a mix of cross-join and union.

cognoshelp@ymail.com

blom could you please help me by writing the code and what steps do I need to follow also. I am new to cognos please help me in this regard!!
Quote from: blom0344 on 27 Oct 2008 02:28:20 AM
You can define any increment you like, mine was just an example. The question is, what data will you want to associate with the future dates? If no data relates to the future dates, then you cannot enforce it in the crosstab.
To enable working with continous crosstabs (where columns are also shown for intersections with no data) we either define outer joins or ensure all combinations are in the dataset through a mix of cross-join and union.