?
Solved

Crystal Report Query on LAN

Posted on 2004-08-08
12
Medium Priority
?
383 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 101

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
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 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 101

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 101

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

752 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