Print Page | Close Window

Month Range Values

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=15323
Printed Date: 04 May 2024 at 2:02pm


Topic: Month Range Values
Posted By: DarioLopes
Subject: Month Range Values
Date Posted: 09 Jan 2012 at 9:54pm
Hi Guys,

I have a parameter by the name of Month.

It is setup as number type, and valid values are 1 through to 12.

The report works fine, although for the following example:

If it is for example November, I want to run the report from November to March next year.
When I select month 11 as start of range, and month 4 as end of range, I get an error saying that its not valid values.

I am guessing because the range that the user puts in has to be sequential that is 1,2,3... etc.

Does anyone have an idea on how this can be done?

Thanks



Replies:
Posted By: rkrowland
Date Posted: 10 Jan 2012 at 1:39am

2 options;

1 - Convert your month parameter to a date parameter, users can secify a range between years. ie 2011-11-01 to 2012-04-01.
 
2 - Set static values of 1-12 in parameter settings and set "Allow Multiple Values" to true - users will then be able to individually select 11,12,1,2,3 & 4.
 
I can guide you through either in more detail if you decide which you'd prefer to do.
 
Regards,
Ryan.


Posted By: DBlank
Date Posted: 10 Jan 2012 at 4:01am
or create 2 params rather than one that allows a range


Posted By: DarioLopes
Date Posted: 10 Jan 2012 at 7:32pm
Hi Ryan,

I went with option 1, and it works perfectly!

Thanks for your help,
Have a good day...

Thanks
Regards
Dario



Print Page | Close Window