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

Generate Date Range prompt with Macros

Started by david.stachon, 29 Apr 2009 06:04:46 PM

Previous topic - Next topic

david.stachon

Hi,

There must be a way to generate a proper date range prompt with macros...

This "works"

[My Date]  between
  #prompt ( 'p start My  Date','date')#
AND 
  #prompt ( 'p end My Date','date')#


...however, this generates two date prompts (i.e. one for each parameter).

Is there a way to leverage "in_range" ...and one parameter that contains the date range (thus generating a nice date range prompt).

..There must be! ....I just can't figure it out.

thanks,
david.

CognosPaul

Try:

[My Date] in_range ?P_Date_Range?

david.stachon

yes, that generates the prompt; however, I need to do so with a macro so I can set default values.

CognosPaul

I don't think there is a way to get prompt macros to work correctly with in range. The best I've managed to do is an extremely ugly:

[date] IN_RANGE { #substitute(',',':',promptmany('date','date','2007-04-01,2007-05-01'))# }

The default doesn't appear in the prompt, but it still works. If you can find a better way, I'd be very interested in seeing it.