
Server has not yet been opened. ERR -2147192184
I've figured it out
The reports are using an ODBC connection, that connection was using SQL
Server username and password for security. In normal use this prompts for a
Username and Password, however when using the RDC it does not.
I have got around the problem by switching the ODBC settings to use Windows
NT security.
Thanks to Ramana for your input, it set me on the right track
Yours
Chris Roberts
Quote:
> Thanks for that, I've just tried it and get the same error.
> I used :
> objReport.Database.LogOnServer "p2ssql.dll", "Servername", "Database",
> "UserName", "PWD"
> Any other ideas?????
> Thanks in advance
> Chris
> > Before the line CRViewer1.ViewReport
> > insert the code to log on to the server using either of
> > the following methods
> > objReport.DATABASE.LogOnServer or
> > objReport.database.setLogOnInfo
> > It might work
> > >-----Original Message-----
> > >I am trying to intergrate Crystal Reports in to my
> > application and haven't
> > >used the RDC and CRViewer before, and I am having a
> > problem that my lack of
> > >knowledge is preventing me from solving. I was wondering
> > if some body would
> > >offer me some advice.
> > >The code I am using is as follows:
> > > Dim objApp As New CRAXDRT.Application
> > > Dim objReport As CRAXDRT.Report
> > > Set objReport = objApp.OpenReport("MyReport.rpt", 1)
> > > CRViewer1.ReportSource = objReport
> > > CRViewer1.ViewReport
> > >The report has information for an ODBC connection to
> > SQL2000 database (MDAC
> > >2.6) and I am using VB 6 .
> > >The problem I am having is that as soon as I call
> > ViewReport I get the error
> > >"Server has not yet been opened"
> > >I have tried substituting my report into the examples you
> > get with Crystal
> > >and get the same problem. Help!!!!!!
> > >If anybody has come accross this problem and found a
> > solution I would be
> > >very gratefull if you could share it with me.
> > >Thankyou in advance
> > >Chris Roberts
> > >.