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!

Select expert formula for selecting All values

Status
Not open for further replies.

sondev

IS-IT--Management
Jan 7, 2005
22
I need a formula for select expert that will select a txtUsername based on the condition that if the username= %username then true. otherwise it selects all the values in the database for txtusername. This field cannot be prepopulated. It needs to pull data directly from database because it is constantly being updated. thanks.
 
Need more technical information. See FAQ149-3762

-LW
 
Pretty confusing post.

These conditions are the same:

"based on the condition that if the username= %username then true. otherwise it selects all the values in the database for txtusername"

True means don't filter, so you would get everything.

If the field (I assume that you mean the parameter field) is not prepopulated, then it's more difficult to assure, especially since you didn't share your Crystal version nor how you are running the report, keep in mind that basic technical information is important.

BTW, the select expert is used for simple solutions, use the report->edit selection formula->record for advanced functionality (again, the menu might differ depending upon your Crystal version).

You might try the following:

(
if not(isnull({?myparm}))
or
trim({?myparm}) <> "" then
{table.field} = {?myparm}
else
if isnull({?myparm})
or
trim({?myparm}) = "" then
true
)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top