Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Query Engine Error 'Cannot find DSN in connection Post Reply Post New Topic
Author Message
mavrik
Newbie
Newbie


Joined: 16 Aug 2008
Location: Canada
Online Status: Offline
Posts: 9
Quote mavrik Replybullet Topic: Query Engine Error 'Cannot find DSN in connection
    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
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet 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
IP IP Logged
mavrik
Newbie
Newbie


Joined: 16 Aug 2008
Location: Canada
Online Status: Offline
Posts: 9
Quote mavrik Replybullet 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

IP IP Logged
crystalerp
Newbie
Newbie


Joined: 04 Sep 2010
Online Status: Offline
Posts: 1
Quote crystalerp Replybullet 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
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet 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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.027 seconds.