"Server not yet opened" Error when opening report form 
Author Message
 "Server not yet opened" Error when opening report form

I am trying to use an existing .rpt file that works fine outside of VB6
connecting to SQL7. When I try to open the .rpt in my new VB6
application, I get the error message when I open the report form. I have
tried resetting the location in the CrystalReport1 designer but still
get the error when running the application. Do I need to re-establish
the database connection trough code in the report form?


Fri, 20 Jun 2003 23:42:45 GMT  
 "Server not yet opened" Error when opening report form
Hi Gary,

The following is directly from the Seagate website about this problem.I
haven't tried it myself.

Nicola

                    This error message is a result of using the LogonServer
method with
                    OLE DB. This issue has been tracked and given Track ID
15254.

                    The workaround is to use the SetLogonInfo method from
the Tables
                    object rather than the LogonServer method.

                    'Sample Code for SetLogonInfo:

                    Report.Database.Tables(1).SetLogOnInfo "server",
"database", "UID",
                    "PWD"

                    Note===========

                    This issue is not unique to the RDC. If you use the
equivalent of the
                    LogonServer method and OLE DB with other Crystal Report
                    Development tools, you will also receive an error.

                    To successfully connect to OLE DB:

                    For Crystal Report Print Engine calls (Crpe32.dll),
                      use PESetNthTableLogonInfo.

                    Crystal Active X Control (Crystl32.ocx), use
Logoninfo.

                    Crystal Report Automation Server (Cpeaut32.dll), use
Setlogoninfo.

                    Crystal Visual Component Library (VCL), use Logoninfo.

Quote:

> I am trying to use an existing .rpt file that works fine outside of VB6
> connecting to SQL7. When I try to open the .rpt in my new VB6
> application, I get the error message when I open the report form. I have
> tried resetting the location in the CrystalReport1 designer but still
> get the error when running the application. Do I need to re-establish
> the database connection trough code in the report form?



Sun, 22 Jun 2003 13:44:38 GMT  
 "Server not yet opened" Error when opening report form
Thank you very much - I will try this today.

Gary

Quote:

> Hi Gary,

> The following is directly from the Seagate website about this problem.I
> haven't tried it myself.

> Nicola

>                     This error message is a result of using the LogonServer
> method with
>                     OLE DB. This issue has been tracked and given Track ID
> 15254.

>                     The workaround is to use the SetLogonInfo method from
> the Tables
>                     object rather than the LogonServer method.

>                     'Sample Code for SetLogonInfo:

>                     Report.Database.Tables(1).SetLogOnInfo "server",
> "database", "UID",
>                     "PWD"

>                     Note===========

>                     This issue is not unique to the RDC. If you use the
> equivalent of the
>                     LogonServer method and OLE DB with other Crystal Report
>                     Development tools, you will also receive an error.

>                     To successfully connect to OLE DB:

>                     For Crystal Report Print Engine calls (Crpe32.dll),
>                       use PESetNthTableLogonInfo.

>                     Crystal Active X Control (Crystl32.ocx), use
> Logoninfo.

>                     Crystal Report Automation Server (Cpeaut32.dll), use
> Setlogoninfo.

>                     Crystal Visual Component Library (VCL), use Logoninfo.


> > I am trying to use an existing .rpt file that works fine outside of VB6
> > connecting to SQL7. When I try to open the .rpt in my new VB6
> > application, I get the error message when I open the report form. I have
> > tried resetting the location in the CrystalReport1 designer but still
> > get the error when running the application. Do I need to re-establish
> > the database connection trough code in the report form?



Tue, 24 Jun 2003 20:32:42 GMT  
 "Server not yet opened" Error when opening report form
Hi Gary,

Since I posted this I have started using reports within VB and also found out that
that the reports must use the SQL Server driver to work within VB (otherwise you
get the "Server not yet opened" message). I had written the reports with an ODBC
driver.

To change the driver, open up the Crystal Report. Go to the Database Menu and
Choose 'Convert Database Driver'.
Then change the option to  pdssql(SQLServer). You then have to enter server name
and user_ID and password. This must also be done for any subreports you have. For
this change to take effect, you must then run the report to refresh the change.

If you have written the report using a query, the 'Convert Database Driver' option
will not be available to you. I don't know if there's a workaround for this. I
ended up rewriting the reports.

My code looks something like below. I need to change the table name because I am
working in a Dev environment, but within Crystal I set the database name to Prod.

Let me know how you get on.

I need to make a new package for the end users and have a problem now where in the
EXE, when I try to go into a Crystal Report, I'm booted out of the application. If
you are up to this stage and have any ideas why, please let me know.

Thanks,
Nicola

Private Sub DisplayReport(ReportName As String, SelectCriteria As String)
    Dim strConn As String
    Dim Table As String
    Dim ItemNumber As Integer 'counter to loop through report tables

     'Populate the Report Object with the desired report file
    Set CrApp = New CRAXDRT.Application
    Set CrRep = CrApp.OpenReport(App.Path & "\" & ReportName)

   'Loop through all database tables and set the correct server & database
    ItemNumber = 1
    Set tbls = CrRep.Database.Tables
    For Each tbl In tbls
        tbl.SetLogOnInfo Server, Database, UserName, Password
        'Pass database owner & table name
        'Need to cut default location string so can insert proper table name in
front
Table = Right(CrRep.Database.Tables.Item(ItemNumber).Location,
(Len(CrRep.Database.Tables.Item(ItemNumber).Location) - InStr(1,
CrRep.Database.Tables.Item(ItemNumber).Location, ".")))
        tbl.Location = Database & "." & Table
        ItemNumber = ItemNumber + 1
    Next tbl

       'Open connection string
    Set cn = New ADODB.Connection

    strConn = objUserConnection.GetConnectionString & ";User ID=" & UserName &
;Password=" & Password
    cn.Open strConn

        'Send the report object to the Crviewer and view the report.
        frmCrystalReportDisplay.CrystalViewer.ReportSource = CrRep
        frmCrystalReportDisplay.CrystalViewer.ViewReport
        If cboMarketingReports.Visible Then
            frmCrystalReportDisplay.Caption = cboMarketingReports.BoundText
        ElseIf cbobFinanceReports.Visible Then
            frmCrystalReportDisplay.Caption = cbobFinanceReports.BoundText
        End If
        Me.Hide
        frmCrystalReportDisplay.Show
End Sub

Quote:

> Thank you very much - I will try this today.

> Gary


> > Hi Gary,

> > The following is directly from the Seagate website about this problem.I
> > haven't tried it myself.

> > Nicola

> >                     This error message is a result of using the LogonServer
> > method with
> >                     OLE DB. This issue has been tracked and given Track ID
> > 15254.

> >                     The workaround is to use the SetLogonInfo method from
> > the Tables
> >                     object rather than the LogonServer method.

> >                     'Sample Code for SetLogonInfo:

> >                     Report.Database.Tables(1).SetLogOnInfo "server",
> > "database", "UID",
> >                     "PWD"

> >                     Note===========

> >                     This issue is not unique to the RDC. If you use the
> > equivalent of the
> >                     LogonServer method and OLE DB with other Crystal Report
> >                     Development tools, you will also receive an error.

> >                     To successfully connect to OLE DB:

> >                     For Crystal Report Print Engine calls (Crpe32.dll),
> >                       use PESetNthTableLogonInfo.

> >                     Crystal Active X Control (Crystl32.ocx), use
> > Logoninfo.

> >                     Crystal Report Automation Server (Cpeaut32.dll), use
> > Setlogoninfo.

> >                     Crystal Visual Component Library (VCL), use Logoninfo.


> > > I am trying to use an existing .rpt file that works fine outside of VB6
> > > connecting to SQL7. When I try to open the .rpt in my new VB6
> > > application, I get the error message when I open the report form. I have
> > > tried resetting the location in the CrystalReport1 designer but still
> > > get the error when running the application. Do I need to re-establish
> > > the database connection trough code in the report form?



Sun, 29 Jun 2003 12:34:03 GMT  
 "Server not yet opened" Error when opening report form
I got it to work!  I simply used the logon method as described here and it works fine.
Thanks!:

The workaround is to use the SetLogonInfo method from

Quote:
> > the Tables object rather than the LogonServer method.
> >              'Sample Code for SetLogonInfo:
> >                Report.Database.Tables(1).SetLogOnInfo "server", _
> >                "database", "UID",   "PWD"

> Hi Gary,

> Since I posted this I have started using reports within VB and also found out that
> that the reports must use the SQL Server driver to work within VB (otherwise you
> get the "Server not yet opened" message). I had written the reports with an ODBC
> driver.

> To change the driver, open up the Crystal Report. Go to the Database Menu and
> Choose 'Convert Database Driver'.
> Then change the option to  pdssql(SQLServer). You then have to enter server name
> and user_ID and password. This must also be done for any subreports you have. For
> this change to take effect, you must then run the report to refresh the change.

> If you have written the report using a query, the 'Convert Database Driver' option
> will not be available to you. I don't know if there's a workaround for this. I
> ended up rewriting the reports.

> My code looks something like below. I need to change the table name because I am
> working in a Dev environment, but within Crystal I set the database name to Prod.

> Let me know how you get on.

> I need to make a new package for the end users and have a problem now where in the
> EXE, when I try to go into a Crystal Report, I'm booted out of the application. If
> you are up to this stage and have any ideas why, please let me know.

> Thanks,
> Nicola

> Private Sub DisplayReport(ReportName As String, SelectCriteria As String)
>     Dim strConn As String
>     Dim Table As String
>     Dim ItemNumber As Integer 'counter to loop through report tables

>      'Populate the Report Object with the desired report file
>     Set CrApp = New CRAXDRT.Application
>     Set CrRep = CrApp.OpenReport(App.Path & "\" & ReportName)

>    'Loop through all database tables and set the correct server & database
>     ItemNumber = 1
>     Set tbls = CrRep.Database.Tables
>     For Each tbl In tbls
>         tbl.SetLogOnInfo Server, Database, UserName, Password
>         'Pass database owner & table name
>         'Need to cut default location string so can insert proper table name in
> front
> Table = Right(CrRep.Database.Tables.Item(ItemNumber).Location,
> (Len(CrRep.Database.Tables.Item(ItemNumber).Location) - InStr(1,
> CrRep.Database.Tables.Item(ItemNumber).Location, ".")))
>         tbl.Location = Database & "." & Table
>         ItemNumber = ItemNumber + 1
>     Next tbl

>        'Open connection string
>     Set cn = New ADODB.Connection

>     strConn = objUserConnection.GetConnectionString & ";User ID=" & UserName &
> ;Password=" & Password
>     cn.Open strConn

>         'Send the report object to the Crviewer and view the report.
>         frmCrystalReportDisplay.CrystalViewer.ReportSource = CrRep
>         frmCrystalReportDisplay.CrystalViewer.ViewReport
>         If cboMarketingReports.Visible Then
>             frmCrystalReportDisplay.Caption = cboMarketingReports.BoundText
>         ElseIf cbobFinanceReports.Visible Then
>             frmCrystalReportDisplay.Caption = cbobFinanceReports.BoundText
>         End If
>         Me.Hide
>         frmCrystalReportDisplay.Show
> End Sub


> > Thank you very much - I will try this today.

> > Gary


> > > Hi Gary,

> > > The following is directly from the Seagate website about this problem.I
> > > haven't tried it myself.

> > > Nicola

> > >                     This error message is a result of using the LogonServer
> > > method with
> > >                     OLE DB. This issue has been tracked and given Track ID
> > > 15254.

> > >                     The workaround is to use the SetLogonInfo method from
> > > the Tables
> > >                     object rather than the LogonServer method.

> > >                     'Sample Code for SetLogonInfo:

> > >                     Report.Database.Tables(1).SetLogOnInfo "server",
> > > "database", "UID",
> > >                     "PWD"

> > >                     Note===========

> > >                     This issue is not unique to the RDC. If you use the
> > > equivalent of the
> > >                     LogonServer method and OLE DB with other Crystal Report
> > >                     Development tools, you will also receive an error.

> > >                     To successfully connect to OLE DB:

> > >                     For Crystal Report Print Engine calls (Crpe32.dll),
> > >                       use PESetNthTableLogonInfo.

> > >                     Crystal Active X Control (Crystl32.ocx), use
> > > Logoninfo.

> > >                     Crystal Report Automation Server (Cpeaut32.dll), use
> > > Setlogoninfo.

> > >                     Crystal Visual Component Library (VCL), use Logoninfo.


> > > > I am trying to use an existing .rpt file that works fine outside of VB6
> > > > connecting to SQL7. When I try to open the .rpt in my new VB6
> > > > application, I get the error message when I open the report form. I have
> > > > tried resetting the location in the CrystalReport1 designer but still
> > > > get the error when running the application. Do I need to re-establish
> > > > the database connection trough code in the report form?



Mon, 30 Jun 2003 06:00:59 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Error: "Server not yet opened"

2. "server not yet opened" error

3. "server not yet opened" error

4. "the server is not yet opened"

5. "Server not yet opened"

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

7. Server Has not yet been opened Error with Crystal Reports 7

8. Crystal Reports 8.5/VBA "Server has not yet been opened" error.

9. "Server has not yet been opened" error viewing a report based on a SQL Designer File

10. Error: Server has not yet been opened.

11. Error: server has not yet been opened

12. Error: Server not yet opened (-2147192184)

 

 
Powered by phpBB® Forum Software