Results 1 to 3 of 3

Thread: Srever has not yet OPEN.... Where did I go wrong!!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Location
    Bhutan
    Posts
    26

    Srever has not yet OPEN.... Where did I go wrong!!

    When I change the Location of Database it gives error message:
    "Server Has not yet Open"..... Could you help me where did I go wrong??????
    Here is my code:

    Private CrxApplication As New CRAXDRT.Application
    Public report As CRAXDRT.report
    Private A As CRAXDRT.DatabaseTable

    Private Sub Form_Load()
    Dim CrxDatabasetable As CRAXDRT.DatabaseTable
    Dim CrxSubreport As CRAXDRT.report
    Dim lngStartPos As Long
    Dim lngEndPos As Long
    Dim LngIdx As Long
    Dim Paths As String

    Dim objSections As CRAXDRT.Sections
    Dim objSection As CRAXDRT.Section

    Dim objRpt As CRAXDRT.ReportObjects
    Dim Sonam As String
    Paths = Mid(App.Path, 1, (Len(App.Path))) & "\report\bbe\"
    Set report = CrxApplication.OpenReport(Paths & "reg1.rpt", 1)
    report.DiscardSavedData
    Set A = report.Database.Tables.Item(1)
    report.Database.LogOnServer "pdssql.dll", "(LOCAL)", "2003", "", ""
    For Each CrxDatabasetable In report.Database.Tables
    Sonam = Mid$(CrxDatabasetable.Location, 4)
    CrxDatabasetable.Location = gDBase & Sonam
    CrxDatabasetable.SetLogOnInfo "(Local)", "2003", "", ""
    Next

    With CRViewer1
    .ReportSource = report
    .ViewReport
    End With

    End Sub
    Please help me!!!!!

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Check these two lines and make sure everything is correct.

    Sonam = Mid$(CrxDatabasetable.Location, 4)
    CrxDatabasetable.Location = gDBase & Sonam

    Can you post the values of

    CrxDatabasetable.Location
    gDBase
    Sonam

    Does your report have any subreports? If yes, you must set the login information for each table as well.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Location
    Bhutan
    Posts
    26

    I found no wrong in this two lines... But

    I found nothin' wrong with that code.... it is working fine... But it couldnot execute from here:
    report.Database.LogOnServer "pdssql.dll", "(LOCAL)", "2003", "", ""

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width