Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"unable to open database DLL"

Status
Not open for further replies.

Sometimes76

Programmer
May 29, 2001
15
PT
Hi everyone!

I'm getting this error message whenever I try to open a Crystal Report from within my VB6 application! Can anyone help me figure out why this is happening??

Thanks in advance,
Luís Costa
 
The code I use to call the report is the following:

MDIForm1.CRRELATORIOS.ReportFileName = App.Path & "\RepListAnexoBal.rpt"
MDIForm1.CRRELATORIOS.SelectionFormula = "{ListAnexoBal.empresa_id}=" & wempresa
MDIForm1.CRRELATORIOS.SortFields(1) = "+{ListAnexoBal.exercicios_id}"
MDIForm1.CRRELATORIOS.SortFields(2) = "+{ListAnexoBal.anexo_id}"
MDIForm1.CRRELATORIOS.DiscardSavedData = True
MDIForm1.WindowState = crptMaximized
MDIForm1.CRRELATORIOS.Action = 1
MDIForm1.CRRELATORIOS.SelectionFormula = "{ListAnexoBal.empresa_id}" = ""
MDIForm1.CRRELATORIOS.SortFields(0) = ""

I get the error on the .action line!
 
You need to add the crystal reports component and then try something like this:

DBSelForm = ""
DoEvents
CR1.WindowTitle = "CR Sel Form Test"
CR1.Connect = mcnn
CR1.DataFiles(0) = "\\Green-1\OESystem\WorkingOE\SalesInvent.mdb"
CR1.ReportFileName = "\\Green-1\OESystem\WorkingOE\PurOrder.rpt"
CR1.ReplaceSelectionFormula (DBSelForm)
CR1.RetrieveDataFiles
DoEvents
CR1.action = 1
DoEvents ----------------
Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top