Print Page | Close Window

Connection issue.

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17263
Printed Date: 21 Apr 2025 at 1:13am


Topic: Connection issue.
Posted By: Tomsss
Subject: Connection issue.
Date Posted: 10 Aug 2012 at 5:27am

I am trying to connect to a view to write a simple crystal report. There are no other tables or views needed. When I look at the view in SQL management studio I can see the information I want to include on the report.

If I browse data by right clicking however in crystal I can only see the information being populated for certain fields but not others. If I drag a file with data on the report it will run but if I include a field for which data does not show I get the following errors:
 

Failed to retrieve data from the database

Followed by

Failed to retrieve data from the database

Details: 42S22 [Microsoft] [SQL Native client] [SQL server]

Column Name ‘Customer’. [Database Vendor code 207]

The Column name of Customer is a little confusing as Customer is the name of the view. The field I tried to drag on the report that caused the error was Customer number but Customer name or address 1 will return the same error.

The ODBC connection I used I have used for many other reports (some written off views) with no problems. The only difference is that I wrote those views myself while this one was created during the installation of the accounting software.

Thank you in advance for any help you may be able to provide.




Replies:
Posted By: kevlray
Date Posted: 13 Aug 2012 at 10:27am
We had a similar issue where the table name was a reserved work (different DB vendor).  We aliased the table, and it was happy.  It might work in your case.



Print Page | Close Window