Wednesday, February 15, 2012

Error 20533 "Unable to open Database"

HI there,
1. I use VB 6 and CR 8.5. I've got a CR report that uses 2 databases that is linked together, one database is over at the network site and another one is in my PC. I've tried calling rpt file individually( one for network database, without linking and another one at PC) and it worked fine. When I put up the 2 reports together, The error appears Run time error 20533. Unable to open database.
With cr
.WindowShowRefreshBtn = True
.WindowShowPrintSetupBtn = True
.DataFiles(0) = "\\bla\bla\bla\bla.Mdb"
.LogonInfo(0) = "DSN=;UID=;PWD=bla;DSQ ="
.DataFiles(1) = "C:\bla\bla\bla\bla2.Mdb"
.LogonInfo(1) = "DSN=;UID=;PWD=bla;DSQ ="

.ReportFileName = App.Path & "\bla.Rpt"
.WindowState = crptMaximized
.Destination = crptToWindow
.Action = 1
End With

2. I've got 2 tables. One table contains field "Code" and "Name"
Another table contains TransactionNo, Date, Code1 and Code2.
Code1 and Code2 both link to the first table field "Code"
So how am I going to display Name of Code1 and Name of Code2 in Crystal Report ?
Thanks a lot for your help.Just one report - no subreports?

Are you passing an SQL statement via SelectionFormula property?
If so, what is it.

Dave|||No selectionformula

No comments:

Post a Comment