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!

Default Value for Parameter field

Status
Not open for further replies.

raccess

Programmer
Dec 31, 2002
91
US

Hi,

I have parameter field, which is drop down list from one of table field, displays Department name.

I want to put Dept1 as default value so if user doesn’t select anything from list report should filter out data for Dept1. But if user selects any other department value then report should filter out accordingly.

Thanks,

-R
 
hi
just go in your parameter field and select dept 1 as default



pgtek
 
In the "set default values" screen, use the arrow keys to make sure that "Dept 1" is the topmost option.

-LB
 
Assuming that you're not using the dynamic parameters that are available in CR XI, the following is the usual means:

Add in the default value maually and hit the arrow key to move it over. I tend to do this first, otherwise you'll have to use the up arrow to move it to the top of the f it's already populated, remove them all and then add in the dept1, then add them all again.

Type in a description for dept1 of something like "Please select this for all values", and make sure that the values and description are enabled for parameters.

Now in the Report->Selection Formula->Record place something like the following:

(
if {?MyParameter} <> "Dept1" then
{table.field} = {?MyParameter}
else
if {?MyParameter} = "Dept1" then
true
)

Note the else if fully defined and the paranethesis are there to help ensure sql pass through.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top