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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link tables through arrays?

Status
Not open for further replies.

batkosta

Technical User
Apr 11, 2006
16
GB
Dear experts,

I need to link two tables in crystal XI R1. The fields I need to link from the two tables contain data as follows:

Table 1:

London
Manchester
Edinburgh
Chester
etc

Table 2:

London
London City Centre
London Belgravia
London Eye
etc


The first field contains cities while the second field contains Keywords. I need to combine data from the two tables by matching the first complete word of the keywords field to the cities field in table 1. I understand this is not possible through the database expert so I'm wondering if there is a way to do it through formulas or arrays?


Many thanks,


Mr. K
 
If you create a formula of:

split({table.field}," ")[1]

You'll have the first value.

Then you can create a subreport and LINK.

However this solution will be slow, and it's kludgy.

When asking about data,and any softwareproduct, reference the software and it's version.

This may easily be done within a Command Object in later versions of Crystal, so that the database does the work, which will make it MUCH faster, but it's dependent upon the database being used.

Optimally you would do so on the database in a View or StoredProcedure.

-k
 
Thanks for your rapid response k, I've decided to go with a stored procedure.



Mr. K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top