Solved

Crystal Report Query on LAN

Posted on 2004-08-08
12
378 Views
Last Modified: 2008-02-01
Hello there,

 can anyone advise me on how to deal with an error in crystal report.."Unable to Open Database"

my application run in a LAN. the program is doing good. you can open the database via source to local computer. the problem is when i generate a report using crystal report (run time) . A message 'unable to open a database appear'. what could be the problem. The folder is shared and the database is shared also..can you please help me...
0
Comment
Question by:baldocute
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
12 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 11751771
If you're calling the report by referencing a URL then this may help: http://support.businessobjects.com/library/kbase/articles/c2005018.asp

If not, please advise how you're calling the report and which version of Crystal you're using and also the db in question - this is a very generic error message so you'll need to provide more specifics to allow us to narrow down the solution.

frodoman
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 11752034
What code are you using?  Was the report built using this database?  Does everyone refer to the the database in the same way (directory structure)?

mlmcc
0
 

Author Comment

by:baldocute
ID: 11798516
the database was created via MSAccess version 7. In visual basic DBGRID the data is successfully being displayed so i think there is no problem in terms of connection - sharing. I am using Seagate Ver 7.0 in crystal report.. code of calling the rountine is on Visual basic..
0
Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 11798546
I assume the report displays in the designer.

Does the application work on the development machine with Crystal installed?

How are you installing the application on the client machines?

What is the VB code?  What O/S?

mlmcc
0
 

Author Comment

by:baldocute
ID: 11939547
to mlmcc
   the report can be displayed on the designer of the source computer but not for the client. I already installed the crystall report on both computers. still that is the error. I install the vbapplication (the one with a crystal report generation) via package deployment. Operating System is Windows 98

here is my code in vb:

Private Sub Command2_Click()
Dim bilang As Integer
Dim mydb As Database, myquery, e As QueryDef

 Set mydb = Workspaces(0).OpenDatabase("c:\dtr\dtrpersonnel.mdb")
 Set myquery = mydb.CreateQueryDef("")
    myquery.SQL = "delete * from dummy;"
    myquery.Execute
    myquery.Close
    myquery.SQL = "insert into dummy select inam,outam,inpm,outpm,idno,petsa,overtime,nohour,late,undertime from dtrproper where petsa Between " & _
       "#" & DTPicker1.Value & "#" & " AND " & "#" & DTPicker2.Value & "#" & " "
       
       
   myquery.Execute
   myquery.Close
   mydb.Close
   
   cr1.ReportFileName = App.Path & "\cr3.rpt"
   cr1.Destination = crptToWindow
   cr1.Action = 1
0
 

Author Comment

by:baldocute
ID: 11939560
to frodomann


 the report can be displayed on the designer of the source computer but not for the client. I already installed the crystall report on both computers. still that is the error. I install the vbapplication (the one with a crystal report generation) via package deployment. Operating System is Windows 98

here is my code in vb:

Private Sub Command2_Click()
Dim bilang As Integer
Dim mydb As Database, myquery, e As QueryDef

 Set mydb = Workspaces(0).OpenDatabase("c:\dtr\dtrpersonnel.mdb")
 Set myquery = mydb.CreateQueryDef("")
    myquery.SQL = "delete * from dummy;"
    myquery.Execute
    myquery.Close
    myquery.SQL = "insert into dummy select inam,outam,inpm,outpm,idno,petsa,overtime,nohour,late,undertime from dtrproper where petsa Between " & _
       "#" & DTPicker1.Value & "#" & " AND " & "#" & DTPicker2.Value & "#" & " "
       
       
   myquery.Execute
   myquery.Close
   mydb.Close
   
   cr1.ReportFileName = App.Path & "\cr3.rpt"
   cr1.Destination = crptToWindow
   cr1.Action = 1
0
 
LVL 42

Expert Comment

by:frodoman
ID: 11942139

If the report won't run in the Crystal designer and you're getting the same error then it has to be a connection problem.  Does the db exist on the client computer in the same location as the designer because that's where it's going to be looking for the data.

frodoman
0
 

Author Comment

by:baldocute
ID: 11948195
to frodoman

the db does not exist in the client's computer. it exist in the source computer (lan server). I don't think that there is a problem with the connection because I could run my application via client using the same database as the one use by crystal report.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 11948385
>>I don't think that there is a problem with the connection because I could run my application via client using the same database as the one use by crystal report.
That may be but Crystal stores some connection information with the report.  Therefore from the client the report is trying to access the database not on the network but on the client as if it were the development machine.

You need to change the report to use the network copy rather than a local copy.

mlmcc
0
 

Author Comment

by:baldocute
ID: 11949952
to mlmcc:
 
    noted...but how would i change the report? does that mean i need to create again another report for client? can u assist me on how to create such report....
0
 

Author Comment

by:baldocute
ID: 11950174
to mlmcc and frodoman

   i got it.. i already solve the problem...the main problem is that the report db and table was not yet mapped hence it uses the default c:\ location....my thanks to your help and advice..hope to help me also in the future......
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 11960052
Glad I could help

mlmcc
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question