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

Dynamic number of days data

Started by barrysaab, 03 Apr 2011 03:58:09 AM

Previous topic - Next topic

barrysaab

How could i give option to user to choose data for dynamic number of days,such as if user choose the data for 35 days or42 days etc.The data for that number of days should be displayed.Thanks
Boy! Cognos getting on to me!!!

karthikeya

hi barrysaab,
will you please post your requirement clearly,
with out start date and end date how could the database retrive data if you simply give 30 days or 40 days as your input.
there should be an interval prompt that too the user should give the start date and end date.

barrysaab

Thanks,karthikeya.You are quite right,i will go with your suggestion.
Boy! Cognos getting on to me!!!

cognostechie

Quote from: barrysaab on 03 Apr 2011 03:58:09 AM
How could i give option to user to choose data for dynamic number of days,such as if user choose the data for 35 days or42 days etc.The data for that number of days should be displayed.Thanks

Here's one way -

Create a Text Box prompt and name the parameter pDate.
While creation, check out the box that says 'Create Parameterised filter'.
Make sure to allow only numeric values in the prompt (it's a property of the Prompt).
Add a filter to the query and use this kind of expression:

[Date] >= _add_days(current_date,0 - ?pDate?) and
[Date] <= _add_days(current_date,0)