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

Default Value in Parameter Prompt

Status
Not open for further replies.

deemat

MIS
Jan 20, 2006
24
0
0
US
Hello Everyone,
I am attempting to have a default value shown when a user is prompted to enter a parameter and also when the report is refreshed. For example, when a user has to enter a lastname, instead of the parameter field being blank it shows lastname. Also when the report is refreshed or opened, it shows lastname as the default value and not the lastname that has been searched.

Thanks for all your help
 
From the field explorer, click on the lastname parameter. On the pop-up screen click on Default Value under Options column on the left side and enter ALL on the right column under Settings.

In your record selection, add the following

(
if {?lastname} = "ALL" then
true
else
{table.lastname} = uppercase({?lastname})
)

I use the following for my searches so I can enter a partial last name

(
if {?lastname} = "ALL" then
true
else
{table.lastname} startswith uppercase({?lastname})
)


-lw
 
Thanks but nothing appears in the prompt when the parameter appears, it's still blank.
 
Did you update the parameter settings?
 
By the way, what version of Crystal Reports are you using? Also are you running the report through an appplication?
 
I'm using version XI and but not through an applicaton.
 
Try creating another parameter with a default. If successful, then delete the original and recreate it.
 
In XI, I believe the defaults will populate the list only when you open a report that is saved without data. After running the report, if you want to run it again with new values, the selections from the previous run will automatically appear in the selection boxes for you to change to the new values. I don't think there is a way to change this.

-LB
 
Thank you both for your responses. I will try something different since its no way to change the values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top