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.
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.