Solved

Crystal Report Query on LAN

Posted on 2004-08-08
12
373 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

20 Experts available now in Live!

Get 1:1 Help Now