VB6 and CR 8.5 Server has not yet been opened 
Author Message
 VB6 and CR 8.5 Server has not yet been opened

can anyone help with this please, I'm getting "Server has
not yet been opened" error
when  I leave the DiscardSavedData line into referesh the
data.

I noticed this worked fine if I'm connecting to SQL 7 but
get this error with SQL 2000 (on different machines same
code!)

code sample below

    DIM Report      As New CRAXDRT.Report
    DIM ReportApp   As New CRAXDRT.Application

        Set Report = ReportApp.OpenReport("rptfile.rpt")

        Report.DiscardSavedData

        form1.CRViewer1.EnableRefreshButton = True
        form1.CRViewer1.ReportSource = Report

        form1.CRViewer1.ViewReport

Ak



Sat, 26 Feb 2005 22:51:23 GMT  
 VB6 and CR 8.5 Server has not yet been opened
This question has been done to death on this NG. Have a look at past posts
dealing with this issue.

In your case, it looks like you haven't used any code to point your tables
within your report to SQL 2000 Server.


Quote:
> can anyone help with this please, I'm getting "Server has
> not yet been opened" error
> when  I leave the DiscardSavedData line into referesh the
> data.

> I noticed this worked fine if I'm connecting to SQL 7 but
> get this error with SQL 2000 (on different machines same
> code!)

> code sample below

>     DIM Report      As New CRAXDRT.Report
>     DIM ReportApp   As New CRAXDRT.Application

>         Set Report = ReportApp.OpenReport("rptfile.rpt")

>         Report.DiscardSavedData

>         form1.CRViewer1.EnableRefreshButton = True
>         form1.CRViewer1.ReportSource = Report

>         form1.CRViewer1.ViewReport

> Ak



Sat, 26 Feb 2005 23:17:00 GMT  
 VB6 and CR 8.5 Server has not yet been opened
I already have the report pointing to the table on SQL
server 2000!

Quote:
>-----Original Message-----
>This question has been done to death on this NG. Have a
look at past posts
>dealing with this issue.

>In your case, it looks like you haven't used any code to
point your tables
>within your report to SQL 2000 Server.



>> can anyone help with this please, I'm getting "Server
has
>> not yet been opened" error
>> when  I leave the DiscardSavedData line into referesh
the
>> data.

>> I noticed this worked fine if I'm connecting to SQL 7
but
>> get this error with SQL 2000 (on different machines same
>> code!)

>> code sample below

>>     DIM Report      As New CRAXDRT.Report
>>     DIM ReportApp   As New CRAXDRT.Application

>>         Set Report = ReportApp.OpenReport("rptfile.rpt")

>>         Report.DiscardSavedData

>>         form1.CRViewer1.EnableRefreshButton = True
>>         form1.CRViewer1.ReportSource = Report

>>         form1.CRViewer1.ViewReport

>> Ak

>.



Sat, 26 Feb 2005 23:24:12 GMT  
 VB6 and CR 8.5 Server has not yet been opened
Where is the code you have used to point to your SQL 2000 Server?


Quote:
> I already have the report pointing to the table on SQL
> server 2000!

> >-----Original Message-----
> >This question has been done to death on this NG. Have a
> look at past posts
> >dealing with this issue.

> >In your case, it looks like you haven't used any code to
> point your tables
> >within your report to SQL 2000 Server.



> >> can anyone help with this please, I'm getting "Server
> has
> >> not yet been opened" error
> >> when  I leave the DiscardSavedData line into referesh
> the
> >> data.

> >> I noticed this worked fine if I'm connecting to SQL 7
> but
> >> get this error with SQL 2000 (on different machines same
> >> code!)

> >> code sample below

> >>     DIM Report      As New CRAXDRT.Report
> >>     DIM ReportApp   As New CRAXDRT.Application

> >>         Set Report = ReportApp.OpenReport("rptfile.rpt")

> >>         Report.DiscardSavedData

> >>         form1.CRViewer1.EnableRefreshButton = True
> >>         form1.CRViewer1.ReportSource = Report

> >>         form1.CRViewer1.ViewReport

> >> Ak

> >.



Sat, 26 Feb 2005 23:36:49 GMT  
 VB6 and CR 8.5 Server has not yet been opened
I did it in the report not in the code. How do I set this
in the code then ?

Ak

Quote:
>-----Original Message-----
>Where is the code you have used to point to your SQL 2000
Server?



>> I already have the report pointing to the table on SQL
>> server 2000!

>> >-----Original Message-----
>> >This question has been done to death on this NG. Have a
>> look at past posts
>> >dealing with this issue.

>> >In your case, it looks like you haven't used any code
to
>> point your tables
>> >within your report to SQL 2000 Server.



>> >> can anyone help with this please, I'm getting "Server
>> has
>> >> not yet been opened" error
>> >> when  I leave the DiscardSavedData line into referesh
>> the
>> >> data.

>> >> I noticed this worked fine if I'm connecting to SQL 7
>> but
>> >> get this error with SQL 2000 (on different machines
same
>> >> code!)

>> >> code sample below

>> >>     DIM Report      As New CRAXDRT.Report
>> >>     DIM ReportApp   As New CRAXDRT.Application

>> >>         Set Report = ReportApp.OpenReport
("rptfile.rpt")

>> >>         Report.DiscardSavedData

>> >>         form1.CRViewer1.EnableRefreshButton = True
>> >>         form1.CRViewer1.ReportSource = Report

>> >>         form1.CRViewer1.ViewReport

>> >> Ak

>> >.

>.



Sat, 26 Feb 2005 23:45:55 GMT  
 VB6 and CR 8.5 Server has not yet been opened
Your report won't save log-on credentials.

You need to call SetLogonInfo method for each individual DatabaseTable
object, assuming that you are connecting by ODBC.

If you are connecting to SQL Server natively, then you need to call
LogOnServer method.


Quote:
> I did it in the report not in the code. How do I set this
> in the code then ?

> Ak

> >-----Original Message-----
> >Where is the code you have used to point to your SQL 2000
> Server?



> >> I already have the report pointing to the table on SQL
> >> server 2000!

> >> >-----Original Message-----
> >> >This question has been done to death on this NG. Have a
> >> look at past posts
> >> >dealing with this issue.

> >> >In your case, it looks like you haven't used any code
> to
> >> point your tables
> >> >within your report to SQL 2000 Server.



> >> >> can anyone help with this please, I'm getting "Server
> >> has
> >> >> not yet been opened" error
> >> >> when  I leave the DiscardSavedData line into referesh
> >> the
> >> >> data.

> >> >> I noticed this worked fine if I'm connecting to SQL 7
> >> but
> >> >> get this error with SQL 2000 (on different machines
> same
> >> >> code!)

> >> >> code sample below

> >> >>     DIM Report      As New CRAXDRT.Report
> >> >>     DIM ReportApp   As New CRAXDRT.Application

> >> >>         Set Report = ReportApp.OpenReport
> ("rptfile.rpt")

> >> >>         Report.DiscardSavedData

> >> >>         form1.CRViewer1.EnableRefreshButton = True
> >> >>         form1.CRViewer1.ReportSource = Report

> >> >>         form1.CRViewer1.ViewReport

> >> >> Ak

> >> >.

> >.



Sat, 26 Feb 2005 23:54:31 GMT  
 VB6 and CR 8.5 Server has not yet been opened
Private Sub PrintReport(by val intBolNo as Integer)

Dim CrxApp As CRAXDRT.Application
    Dim CrxReport As CRAXDRT.Report
    Dim sReportPath As String

    Set CrxApp = New CRAXDRT.Application
    sReportPath = "\\terminal_svr01\Solomon IV\usr_rpts\bol.rpt"
    Set CrxReport = CrxApp.OpenReport(sReportPath)
    CrxReport.Database.Tables.Item(1).SetLogOnInfo "DNS_NAME", "DB_NAME",
"userID", "password"
    CrxReport.DiscardSavedData
    CrxReport.ParameterFields(1).AddCurrentValue (intBolNo)
    CrxReport.PrinterSetup frmBOL2.hWnd
    CrxReport.PrintOut

The thing that threw me at first is the intellisense for SetLogInInfo is a
little confussing. I was putting the name of the database instead of the DNS
name in the first parameter. That was incorrect but I think it is driver
specific. I am using pdsodbc (ODBC)


Quote:
> Your report won't save log-on credentials.

> You need to call SetLogonInfo method for each individual DatabaseTable
> object, assuming that you are connecting by ODBC.

> If you are connecting to SQL Server natively, then you need to call
> LogOnServer method.



> > I did it in the report not in the code. How do I set this
> > in the code then ?

> > Ak

> > >-----Original Message-----
> > >Where is the code you have used to point to your SQL 2000
> > Server?



> > >> I already have the report pointing to the table on SQL
> > >> server 2000!

> > >> >-----Original Message-----
> > >> >This question has been done to death on this NG. Have a
> > >> look at past posts
> > >> >dealing with this issue.

> > >> >In your case, it looks like you haven't used any code
> > to
> > >> point your tables
> > >> >within your report to SQL 2000 Server.



> > >> >> can anyone help with this please, I'm getting "Server
> > >> has
> > >> >> not yet been opened" error
> > >> >> when  I leave the DiscardSavedData line into referesh
> > >> the
> > >> >> data.

> > >> >> I noticed this worked fine if I'm connecting to SQL 7
> > >> but
> > >> >> get this error with SQL 2000 (on different machines
> > same
> > >> >> code!)

> > >> >> code sample below

> > >> >>     DIM Report      As New CRAXDRT.Report
> > >> >>     DIM ReportApp   As New CRAXDRT.Application

> > >> >>         Set Report = ReportApp.OpenReport
> > ("rptfile.rpt")

> > >> >>         Report.DiscardSavedData

> > >> >>         form1.CRViewer1.EnableRefreshButton = True
> > >> >>         form1.CRViewer1.ReportSource = Report

> > >> >>         form1.CRViewer1.ViewReport

> > >> >> Ak

> > >> >.

> > >.



Sun, 27 Feb 2005 04:48:34 GMT  
 VB6 and CR 8.5 Server has not yet been opened
Dear Jerod:

Try this code on the form where the call to the CRViewer:

Report.Database.Tables.Item(1).SetLogOnInfo Trim(servername), "dbname",
Trim(UserID), Trim(pwdID)

Arnnie


Quote:
> Private Sub PrintReport(by val intBolNo as Integer)

> Dim CrxApp As CRAXDRT.Application
>     Dim CrxReport As CRAXDRT.Report
>     Dim sReportPath As String

>     Set CrxApp = New CRAXDRT.Application
>     sReportPath = "\\terminal_svr01\Solomon IV\usr_rpts\bol.rpt"
>     Set CrxReport = CrxApp.OpenReport(sReportPath)
>     CrxReport.Database.Tables.Item(1).SetLogOnInfo "DNS_NAME", "DB_NAME",
> "userID", "password"
>     CrxReport.DiscardSavedData
>     CrxReport.ParameterFields(1).AddCurrentValue (intBolNo)
>     CrxReport.PrinterSetup frmBOL2.hWnd
>     CrxReport.PrintOut

> The thing that threw me at first is the intellisense for SetLogInInfo is a
> little confussing. I was putting the name of the database instead of the
DNS
> name in the first parameter. That was incorrect but I think it is driver
> specific. I am using pdsodbc (ODBC)



> > Your report won't save log-on credentials.

> > You need to call SetLogonInfo method for each individual DatabaseTable
> > object, assuming that you are connecting by ODBC.

> > If you are connecting to SQL Server natively, then you need to call
> > LogOnServer method.



> > > I did it in the report not in the code. How do I set this
> > > in the code then ?

> > > Ak

> > > >-----Original Message-----
> > > >Where is the code you have used to point to your SQL 2000
> > > Server?



> > > >> I already have the report pointing to the table on SQL
> > > >> server 2000!

> > > >> >-----Original Message-----
> > > >> >This question has been done to death on this NG. Have a
> > > >> look at past posts
> > > >> >dealing with this issue.

> > > >> >In your case, it looks like you haven't used any code
> > > to
> > > >> point your tables
> > > >> >within your report to SQL 2000 Server.



> > > >> >> can anyone help with this please, I'm getting "Server
> > > >> has
> > > >> >> not yet been opened" error
> > > >> >> when  I leave the DiscardSavedData line into referesh
> > > >> the
> > > >> >> data.

> > > >> >> I noticed this worked fine if I'm connecting to SQL 7
> > > >> but
> > > >> >> get this error with SQL 2000 (on different machines
> > > same
> > > >> >> code!)

> > > >> >> code sample below

> > > >> >>     DIM Report      As New CRAXDRT.Report
> > > >> >>     DIM ReportApp   As New CRAXDRT.Application

> > > >> >>         Set Report = ReportApp.OpenReport
> > > ("rptfile.rpt")

> > > >> >>         Report.DiscardSavedData

> > > >> >>         form1.CRViewer1.EnableRefreshButton = True
> > > >> >>         form1.CRViewer1.ReportSource = Report

> > > >> >>         form1.CRViewer1.ViewReport

> > > >> >> Ak

> > > >> >.

> > > >.



Tue, 08 Mar 2005 01:29:28 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. 8.5 / ASP / Server has not yet been opened

2. Server has not yet been opened message with VB6, CRP7 and SQL-server

3. Connection not Open + Server has not yet been opened error messages

4. Need Help CR 8.5 + VB6

5. VB6 (SP5) and CR 8.5 Dev Problems...

6. Page Server is crashing (NT 4, CR 8.5)

7. CR 8.5 Crashes in VB6 (ole32.dll)

8. CR 8.5 developer crashes machine in VB6

9. Output to Microsoft SQL Server (CR 8.5)

10. SQL Server 2000 + CR 8.5

11. VB6 and CR 8.5 integration

12. Parameter to Stored Procedure CR 8.5 VB.Net Specified Cast Not Valid

 

 
Powered by phpBB® Forum Software