So you have a date parameter set up to allow multiple values? Create a formula like this:
whileprintingrecords;
stringvar x;
numbervar i;
numbervar j := ubound({?date});
for i := 1 to j do(
x := x + totext({?date},"MM/dd/yyyy")+", "
);
left(x,len(x)-2)
No. Please explain how you have your date parameter set up--are you allowing multiple range and discrete values? There is an faq that might help, also: faq767-5684.
What I'm trying to accomplish is to let the user decide on either a single date or range of dates. Through the setup of the parameter, the user has the option to enter either a discrete value or a range value. Granted, the user could add both, but I don't think they will ever do that.
What I would like to do is display this date (discrete or range) as part of the parameter display at the top of the report. Thanks again!
So you are allowing multiple values that can be range or discrete? Use:
whileprintingrecords;
stringvar x;
numbervar i;
numbervar j := ubound({?date});
for i := 1 to j do(
if minimum({?date}) = maximum({?date}) then
x := x + totext(minimum({?date}),"MM/dd/yyyy")+ ", " else
x := x + totext(minimum({?date}),"MM/dd/yyyy") + " to " + totext(maximum({?date}),"MM/dd/yyyy") + ", "
);
left(x,len(x)-2)
If you want to, you can replace the comma with chr(13), and change the last line to -1 instead of -2, and format the formula to "can grow." This would create a return after each parm value.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.