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!

How to create a Parameter Field for Partial Text Serch in XI

Status
Not open for further replies.

bandarna

Programmer
Jan 2, 2003
122
0
0
US
I created a parameter in my report where I want the users to enter partial text and get the result. For example, the field is 6 character long. User can enter first 4 character and run the report

This is the data in the field – 100000
100200
100301
100503


So user can enter 1000, 1001, 1003, 1005 and get the matching records. I also want to force the user to enter atleast 4 characters. How can I do this? I am using Crystal XI.

Thanks
-nb
 
Set up the parameter as a string parameter and then add the following selection formula:

len({?Parm})>=4 and
totext({table.ID},0,"") like {?Parm}+"*"

This would return no results unless at least four characters are entered (you should add instructions to the user in the parameter setup). If the ID field is already a string, remove the "totext(,0,"").

You could also set up an alert that will tell the user they haven't entered enough digits.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top