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

Parameters - ( Sometimes mandatory and smtimes optional)

Status
Not open for further replies.

namitanamburi

Programmer
Jan 13, 2011
1
US
Hello,

I created a report with the query below.

Select * from employee_table where employee_name = {?Ename}.

People may choose to enter a name or may want to see all the employee names.

So I created a default called 'All' for the parameter Ename and created a formula called e_formula stating that

if {?Ename} in {employee_table.Ename} then
{employee_table.Employee_name} else if
{?Ename} = 'All'
then True.

In the select expert set the condition to True.

This works fine , user gets a prompt to enter 'All' for all users else enter 'Employee name' they wish to find.

Now the users feel its too much to enter 'All', cant they just leave it blank which should default to 'All' and proceed to execute the report?

Is there any way to do this?

User will enter Employee name if he wants to find a specific user, else will just ignore that parameter and click on Run to execute the report.

Please advise.
Nammu
 
You should be able to set a default value. It varies depending on your version.

It always helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top