Symptom
How do I select the records based on the first few characters entered by a user?
Resolution
Here are the steps:
- Add a static parameter in the report.
- Add "% - All Records" for the first value.
- Insert all the other records from the database below the "%" field.
- Create a formula using the following for the first letter value
prompt ("@frlVal"):
{
numberVar i;
stringVar stVal;
i:= Length({?My Parameter});
stVal:= left({?My Parameter},i)
}
- Create the following condition in Selection
Formula > Records:
{
if trim({?My Parameter})<>"%" then
(
if {Customer.Customer Name} = {?My Parameter} then
{Customer.Customer Name}={?My Parameter}
else
{Customer.Customer Name} startswith {frl@Val}
)
else
true
}
Keywords
How to select the records based on the first few characters entered by the user? , 9025642 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Product
Crystal Reports 2008 V0