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!

SQL join not being created in Crystal 9 or 10

Status
Not open for further replies.

bobpv

Instructor
Sep 3, 2002
107
US
Anyone seen this?

I am adding a view from a SQL 2000 database. The field is in the Crystal SQL, but even after I verified the linking ( a simple inner join) in the Linking tab, Crystal does not add the Join statement to the SQL. So of course, the field is not recognized by the report.

Happens in both 9 and 10, but nothing consistent I can see as a pattern.

VERY odd!

Bob
Robert Pevey and Associates

 
Hi,
What are you linking the view to?

Can you post the Sql code generated by Crystal?

[profile]
 
The code is correct, with the exception of NO join being created from Crystal. It is linking to another table on the same key field. In this case, estimate number to estimate number.

The join used is an inner join, which exist in the original report, but when the new view is added, it is not created, but the original sql is correct.

Bob
Robert Pevey and Associates

 
Hi,
Since you won't show the code I still cannot fully understand what you are doing..
Are you linking a View with another table?
Are the datatypes the same?


What does the Visual Linking panel show?

[profile]

 
I did not see any point is pasting in the SQL, as it only shows what I explained.

Yes the view is linked to a table, on the correct field ( I have done this at least 100 times in 8.5, for the exact same report for my clients) in this case, the estimate number to the estimate number.

Data types are same, 5 char string.
Visual linking shows the link as correct, and options as a inner join, also correct.

To restate the issue, when the view is added (in 9.0 or 10) the field is brought into the report and added to the query (Database | Show SQL query shows the field) but the SQL DOES NOT add the inner join on estimate # (Table) to estimate # (view). It is just not there?

Better explanation?

Bob
Robert Pevey and Associates

 
Hi,
Does 'Verify Database' after the linking is done return any errors?


[profile]
 
That is a nope. It verifies with no problem, be cause the view is NOT part of the SQL, and therefore not seen.
But it is there in the Database Expert,.






Bob
Robert Pevey and Associates

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top