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

Quick parameter question 1

Status
Not open for further replies.

dh42891

Technical User
Oct 7, 2003
107
US
I can't seem to get the values for my parameters to display anywhere. I've got a report with a date parameter and I want the report to display the parameter value somewhere, but whenever I add the parameter to the report header (or anywhere else), it doesn't display anything. The parameter may be multiple discrete and/or range values with no default value set. Am I missing something? Thanks,

dylan
 
Have a look at this faq: faq767-1206. Range parameters are essentially arrays, so displaying them isn't as simple as dragging them onto the report. The aforementioned faq has some examples of how to deal with these.

-dave
 
Here's a formula for date ranges that I either found somewhere or developed (I can't remember, and didn't make a note of it):

numbervar counter:= 1;
numbervar i := ubound({?date});
stringvar result := "Selected Discrete and Range Ids: ";

for counter := 1 to i do (
result := result + if minimum({?date}[counter]) =
maximum({?date}[counter]) then
totext(minimum({?date}[counter]),"MM/dd/yyyy") + ", " else
totext(minimum({?date}[counter]),"MM/dd/yyyy") + " to " +
totext(maximum({?date}[counter]),"MM/dd/yyyy") + ", ");
left(result, length(result)-2);

-LB
 
Thanks guys, that helps. I used your code Lbass and am getting some erros but I think I can work them out. Thanks a bunch,

dylan
 
I believe I copied this formula from a report, so that means it produced no errors at my end. Did you copy and paste the formula or recreate it from scratch? As long as your date parameter is a date type parameter, you should only have to change the parameter name to match yours.

-LB

 
I copied and pasted it and then changed the parameter name. I may have confused the error messages with a different report- most of reports have errors in them :). But actually, I think the problem I was having was from a formula I was writing. The first parameter is a string parameter and the second a date so I was trying to develop a formula that would both display 7.29.04 instead of the string value "Today" and display a date range entered in the second parameter. So, that is probably where I was getting errors. But, the db tech guy is next to worthless so I won't be working with the reports until he gets his job done. Thanks a million for all the help lbass,

dylan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top