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

Date Range and Prompt macro

Started by bluecarbon, 27 Sep 2012 12:46:23 PM

Previous topic - Next topic

bluecarbon

Hi,
I have a Date range macro which supplies the To Date and From Date. Now I m planning to use the values from this macro into my SQL which is hardcoded into a Query. Please let me know how can i get the From Date(Value1) and To Date(Value2) from the Date Range prompt and use it SQL using prompt macro.
Appreciate your help on this.

Momin

Hi,

As of my understanding ur requirement is

u have two prompts from date and todate ,  which user selects and depending upon the user selection the data has to be filtered for that period.

Suppose, if user selects  1-jan-2012 in from prompt and 27-sep-2012 in to prompt the data has to filtered for 1-jan-2012 to 27-sep-2012.If this is ur requirement the please read the following.

Take three queries Query1 for from prompt,Query2 for to prompt and Query 3 for ur actual data in whcih data has to be filtered.

take two prompts in report page.in first value prompt if u want to fix ed values to visible then use static choice.similarly for second to prompt.

and now go back to query 3.and drag a filter in filter pane.and edit defintion as follows.

date between ?parameter1?  to  ?parameter2?  .

where ?paramter1? is ur from prompt paramter value.and ?parameter2? is ur to prompt paramter value.

when user select 20-jan-2012 in from prompt this will be pased on to query 3 as ?parametr1? and  user select 20-feb-2012 in to prompt this will be pased on to query 3 as ?parametr2? and query will be fired against database to fetch that period dta.

let me know if any concerns.

Regards,
Momin.