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!

Link in Crystal

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
is there a way to force link two tables. one field is numeric and one is varchar. I need to inner join these two fields together.

any help would be appreciated

 
That brings up a lot of questions such as:

version of crystal?
database type?
connectivity used?

We need more info to help you.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Please remember to post the type and the version of your software, both Crystal and the database.

The simplest way is to take a rusty garlic press to the database designers fingers and tongue to assure that they never participate in database modeling again, and then change one or the other data type in the database.

Failing that, you can place both tables in the database and in the report->edit selection formula->record place something like:

val({table.varcharfield}) = {table.numericfield}

This is a horrible solution and will have horrid performance, an may not give the desired results.

Keep in mind that your database is broken, and that the solution shouldn't be working around this fact.

Another solution is to use a View on the database, or a stored procedure, or paste in SQL, but this depends upon you supplying basic technical information, such as the version of your software (Crystal, any post about any software should always include the version, it's the first question any tech support person will ask, so please remember to post the basic info), the database type and version, and your privileges.

-k
 
I am using VS.net 2002.. using the version of crystal that comes with it. I have to tables that I want to link. one of the fields is a key field and the other is not. they both represent the same document.

 
So whats the problem in linking? Are you getting an error? If so, whats the error?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
I am getting "Data Types are not compatible" in the report expert

 
You can also use one table in the main report and insert a subreport for the second table. In one of them, convert the field to the datatype of the other. You could use SV's suggestion to convert the string to a number:

val({table.field})

Then link the subreport to the main report by linking the field in one to the formula in the other.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top