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!

Handle number-like strings in Select Expert 1

Status
Not open for further replies.

cspuckett

IS-IT--Management
Feb 6, 2009
27
US
I'm looking for an efficient way to build this selection.

I have a table with vendor number. Problem is the value is actually an alpha value (9 char, right justifed, left padded with spaces). So, vendor 1234 is really ' 1234'.

I have a report where the user could enter (optionally) a vendor and I want them to be able to enter simply 1234, and not have to space pad.

I got it to work by creating a numeric parameter and by using the ToNumber(MyTable.Vendor) = {?MyVendor}. However, that is not efficient (report runs 10x as long this way vs. using a pure "string" vendor number...where I make the vendor parameter a string).

I haven't found a way to have them enter the string "1234" and then convert that to " 1234" when comparing to MyTable.Vendor.

I'm using Crystal 2008.
 
Perfect. Still efficient and working as hoped. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top