Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass only month name and year as parameter ?

Status
Not open for further replies.

Devaki

Programmer
May 23, 2001
58
US
Hi,

I have a report in crystal8.5 with start date and end date as input parameter.The datatype is date and it shows the calender whenever it prompts for input parameter. Now i want to show the date with month and year instead of a calender. Can it be done with the existing set up or i have to create the month as string field and year as number field and do it?

Please help

Thanks
devaki
 
You can leave your paramter fields as full data fields, place them on your report and format them to show month and year only. Is this what you want? Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Hi,

I want the parameter field to show only the month
example Jan 01,Feb 01...
I don't want to show the complete calender and then format the parameter field after that.
Is there a way to do this?
Thanks
Devaki
 
Not with a drop down calendar. You can create a default values list for the parameter(s) as a text field, then convert them to a date for use in record selection formulas. Does that help?. Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Hi ,

Do i need to create 2 Default value list . one for the month another for the Year.
Thanks for the help
Devaki
 
No, just create one list as a text value. For instance, if the default value selected is "Jan 2002", the following record selection formula will pick all records with any date in Jan 2002.

year({datefield}} = value(right({?Parmfield},4) and
monthname(month({Datefield}),true) = Left({?parm},3)
//True returns a 3 character month abbreviation

Please let me know if you have any questions.


Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top