Solved

Crystal Report Query on LAN

Posted on 2004-08-08
12
375 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

948 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now