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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick question on displaying parameter range fields 1

Status
Not open for further replies.

jadepatel

Technical User
Sep 4, 2002
35
0
0
GB
Hi,

Just a quick question. Does anyone know how i can display the date that is selected in a parameter field.

i.e i have created a date-range parameter and i want to display the range that the user selects on my report.
for example.

The date this report is for is ?DateRange


I have tried dragging the parameter field onto my report but this does not work. It only seems to work when the parameter is not a range value!!!

Can anyone help?
 
You can do it with a formula:

"From: " + totext(minimum({?DateRange}), "MM/dd/yy") + " to " + totext(maximum({?DateRange}), "MM/dd/yy")

-dave
 
This can be somewhat complex if you're allowing for multiple range and discrete values:

whileprintingrecords;
stringvar array TheDates;
numbervar Counter;
Redim TheDates [ubound({?reference date})];
For Counter := 1 to ubound({?reference date}) Do(
if maximum({?reference date}[Counter]) <= minimum({?reference date}[Counter]) then
TheDates[Counter] := totext(minimum({?reference date}[Counter]))
else
TheDates[Counter] := totext(minimum({?reference date}[Counter]))+" to "+totext(maximum({?reference date}[Counter]))
);
join(TheDates,chr(13))

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top