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

[Solved]Need only month and year in prompt

Started by pali, 27 Jan 2006 12:41:44 AM

Previous topic - Next topic

pali

hi all
In a report i just want user to select a month and year.
So please guide me to create a prompt page in which user can select a month name from a value prompt and a year from different prompt.
Is there any other way through which i can achieve it.
thanks in advance.Ã, 

JoeBass

You could create a lookup table to query values to fill your Month and Year prompts or create static choices.

pali

hi
thanks for reply.
Its ok that i can take collection for month but for year creating a collection is not vailable as the value of year can be from very long range.


bdybldr

#3
pali, try this..

create a new query (ie. DatePrompt) with two data items.
1) month - defined as "extract(month, [date])"Ã, 
2) year - defined as "extract(year, [date])"

Then add to value prompts to your prompt page.Ã,  For example, month prompt.
Set the query for the prompt to "DatePrompt"
Set the "use value" and "display value" to [month]
Set the parameter value to "parmMonth"

Do the same for the year prompt.

Then, create your filter as...

extract(month, [date]) = ?parmMonth? and extract(year, [date]) = ?parmYear?

Hope this helps...let me know if you have any questions.

pali

thanks for reply.
its working and i got another solution also by using java script for the prompt page and to set values in value prompt using script only.

bdybldr

Pali, please provide the details of your solution so everyone can learn from it.  Thanks.

pali

This was the script that i used for my report ,SO i can't copy report xml but i am attching script so for that u need to create two value prompt in prompt page.And then use this java script code in HTML item.

bdybldr

Pali, thanks for the solution...very helpful.

One suggestion, it's spelled "February" not "Fabuary".  I'm sure someone will eventually bring that to your attention.

Thanks again.