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!

Linking a String Field to a Number Field

Status
Not open for further replies.

dhgrrg

IS-IT--Management
Jun 16, 2004
14
US
I've got two tables that I need to link. Field Table 1 is AddressNo (String) to Field Table 2 ShipTo (Number).

The only way I was able to do this was to link them via a formula changing the AddressNO from a string to a number using the ToNumber() function and linking AddressNO formula(number) to ShipTo(number) and do it in a subreport. AddressNoFormula to ShipTo

At best this is a work-around and I would prefer to link them in the main report.

Could I have linked them in the Sql Expression?

Copied the Show Sql Query, added the code, and somehow reinserted it into the report?

Is there any easy way to connect differing type fields within Crystal?

Thanks in advance
 
If you're using CR 9 or 10, you could use a Command to link the tables (although that might depend on the type of db), and handle the type conversion in the JOIN clause.

Otherwise, unless you create a View in the database that does this, I believe your current workaround is your only hope.

The 'best' case scenario would be that whoever created these relationships gets it together, and changes the datatype of the AddressNo field.

-dave
 
We are using Crystal 9 and tables are sequel tables.

thanks for your help..

ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top