cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Record Selection Issue Linking SQL View with SQL Table

Former Member
0 Likes
205

I have created several viuews in our MS SQL Server database that I am using in Crystal Reports XI developer. When I attempt to link an additional SQL Table in a report that uses these views, using an ID field in one view with a corresponding ID field in the table, all of my records that did qualify suddenly disappear.

I created a new view with the information from the table that caused the issue and now my record selection is OK. I am using the exact same link I did with the table.

Can anyone explain this issue or is it more than likely an issue with my database?

Can views and tables exist together in a report? Seems as though they should.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member292966
Active Contributor
0 Likes

Hi Joey,

This should work. The only reason I can think of why this is happening is if there is no matching records between your view and table.

If you create a simple query in ISQL that links the table and a view, do you get records? If not then have a closer look at the view. Possibly the fields you are linking on are different types.

Good luck,

Brian

Former Member
0 Likes

Brian, Thanks for the quick response. Unfortunately there are matching records. I took the same table and made a view out of it, using the same linking fields, and now it works. For some reason it does not work when the table is used but does when the view is used.

former_member292966
Active Contributor
0 Likes

Hi Joey,

Try one more thing. Link the table to the view and select a Left Outer Join. Drop one field from each on the report and do you see fields from the table and not the view?

Once again, please try linking the table and view in ISQL. I am interested in finding out the result.

Thanks,

Brian

Former Member
0 Likes

Brian, the left outer join worked. Thanks. Is there an explanation for this behavior?

You will have to excuse me I am a little new to Crystal and SQL Server. I will try

the ISQL join as soon as I can.

Answers (0)