Print Page | Close Window

Query Engine Error 'Cannot find DSN in connection

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
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=4039
Printed Date: 07 May 2024 at 10:56pm


Topic: Query Engine Error 'Cannot find DSN in connection
Posted By: mavrik
Subject: Query Engine Error 'Cannot find DSN in connection
Date Posted: 19 Aug 2008 at 5:09pm
Hi,
I have an ERP (Batchmaster) written in VB, where the report content is written on a client machine into a file called report.mdb
When I try to work with 2 databases report.mdb and my SQL database on the server, if I run the report from crystal, it works fine, but when I try to run the report from the ERP, I get a message "Query Engine Error 'Cannot find DSN in connection string'"
Any suggestions?
Thanks



Replies:
Posted By: hilfy
Date Posted: 22 Aug 2008 at 11:44am

Your ERP system is running the reports through its own viewer, correct? 

One of two things is happening:
 
1.  Are you using an ODBC connection to the SQL database?  If so, it's not set up on the client machine or the client user doesn't have access to the network location of the database.
 
2.  When you run a report from within VB, the application has to set the connection string for all of the tables in the report.  Since the application only knows about report.mdb, that's the only connection that it's setting.
 
Try checking for the first issue, as that is one that you can resolve.  If the problem is the second issue, you probably won't be able to fix it as the vendor will have to update their code to handle it.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: mavrik
Date Posted: 22 Aug 2008 at 6:32pm

Thanks, unfortunately its the second problem.  Can anyone let me know how I can update the mdb file on the client machine?  Is that code that I need to insert into the report?

Thanks



Posted By: crystalerp
Date Posted: 04 Sep 2010 at 2:20pm
Just saw your dilemma and here is a solution that worked for me -
In the canned BatchMaster report, create a new formula with attributes that look something like this:

BMEDllCRUFLGENFnBMEGetNumericGiveQuery ("select avgcost from inloc where itemkey = '" & {CSDetailedProCost.FMItemKey}& "'")

This grabs the average cost from the Item Location table and allows you to drag it into the report.

Hope this helps


Posted By: hilfy
Date Posted: 14 Sep 2010 at 3:47am
Do you have an ODBC System (not User!) DSN set up for your connection where you're running the report?
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window