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!

Record Selection Optimization

Status
Not open for further replies.

schurers

Programmer
Jul 29, 2009
8
0
0
US
I have a report in which the user enters a License Number. That lic number is a string field. The table I reference in my select statement does have a primary key but it is not the same number that the user is entering as the license number. The user will not know what the lickey number is but I want to increase report optimization. I need to find a way to let the user enter the license number and go out and find the lickey and use that in the record selection so that the server is performing the work. Does anyone know how to do this? I am thinking it should be a sql expression but I am not familiar with how to write the code. Thanks in advance,
 
Do you have a table that shows contains both the lickey and the license number fields?

-LB
 
Yes The license table contains License No which is string and also a LicKey which is numeric. The user will only know the license # to enter as a parameter. The lic key does not contain the same value as the Lic #.
 
Why not use the lickey as the value field for the parameter, and then add the license # as the description field, and set the option to display the description field only. Then at the prompt, the user will see the license #, but you will be using the corresponding lickey in the record selection formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top