2016-11-25 08:08 AM
I m trying to build a report with a date prompt feature.
my sql table is something like that
for each date, I have for each object a list of kpi
a select object,date from table can give that
I 'd like to have by default the report to use the latest date ( max(date) ) and the ability to use the dateprompt to select on specific date.
I guess I have to use a parameter to the query, and set this parameter at the latest date by default ...
but I don't know how.
Thanks a lot for your help
2016-11-29 03:50 AM
I haven't tried it myself, but hopefully it gets you on your way.
2016-12-14 06:44 PM
Sorry for the late reply.
This turns out to be a bit of a big question. I will try to steer you toward breaking it into some pieces.
I would create a query just to collect the latest date in the part of the DWH you're using. Note that in dwh_performance, this will probably be one day earlier than in dwh_capacity so you will want to verify that the date that comes back does have the data you need. Because I habitually use SQL, I'd do something like "select max(fulldate) from date_dimension where latest=1".
Once you have that query, you can use its output as the default value in your date prompt.
The other reply will provide some guidance on how to get the prompt put together. That's a bit of a process. Haven't used that how-to myself. Googling around for date prompt in Cognos should help. If you can get Cognos to understand that your'e prompting for a date, it should provide a calendar interface for the selection.