COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: naveen.odi@gmail.com on 24 Sep 2015 11:11:32 PM

Title: Recent dates in prompt
Post by: naveen.odi@gmail.com on 24 Sep 2015 11:11:32 PM
Hi All, i want to show the most recent dates as default selection in prompt without Html is it possible?
Title: Re: Recent dates in prompt
Post by: colt on 25 Sep 2015 04:30:47 AM
Your info is very short: What do you want to do ? Is Report relational ?
You write most recent Dates - is it a Multi select prompt ?
If you simply want to run relational Report with e.g. last day, then use #prompt macro with calculated date as Default value.
For cube based reports I achieved this by adding a separate field to database/cube which contains only the actual date.
Then this value can be linked with linkmember to time Dimension.
Title: Re: Recent dates in prompt
Post by: naveen.odi@gmail.com on 25 Sep 2015 04:38:11 AM
Relational

In Dates column i have 25/9/2015, 22/9/2015, 20/9/2015. If i run it should display 25/9/2015 as default date.
Title: Re: Recent dates in prompt
Post by: colt on 25 Sep 2015 07:42:54 AM
Then I'll propose to make the prompt optional. Then create DATAITEM [MAXDATE] which holds the Maximum value of prompt.
Then filter by macroprompt with Default value #prompt('promptdate';'date';'[MAXDATE]')#

In this case the user can leave the prompt empty and if he does, then automatically the latest date is taken.