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!

Passing Parameters

Status
Not open for further replies.

pashu

Programmer
Sep 14, 2003
24
IN

Hello Freinds,

I've passed the parameters for the report it is working fine but when i give the parameters such as from month 03 and year 03 and to month 02 and year 04,it gives the error "The minimum cannot be greater than maximum',i have understood the problem but is there any other way to pass the parameters by coding in crystal reports ,if yes please send me the sample coding if possible.

Thanks & Regards,
Pashu.
 
Is this a range parameter? What data type? Are you passing a range where the From value is below the To value? If so, why?

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Share the data types used.

It sounds like you're using a month range and a year range, which won't work.

Try creating independent month fields (start and end), or date ranges.

If using independent month and year fields, and the database has dates, use formulas to create dates from the month and year parameters, and then pass the date to the database.

If the database is using strings for the months and years, then you should pass those strings.

-k
 
It sounds like you have a range parameter for year and a range parameter for month. You are getting the error when the "from" month is greater than the "to" month. You should either use 4 seperate prompts for the "from" and "to" values or combine the year and month promts with ranges (from YYMM and to YYMM). Then the "to" value of the range should never be greater than the "from" value.

MrBill
 
Oops,
In my last message I meant to end with... Then the "from" value of the range should never be greater than the "to" value.
MrBill
 
Because you're stating that they are a range, by definition the first value must be lower than the last, hence you must use 2 different parameters as the month 10 is greater than the month 2, even though the year 2 may be for the next year, Crystal doesn't know that as they are different parameters.

Alternatives are to combine the month and year into one year/month parameter, or use a date range itself, and then use formulas to parse it and pass to the database.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top