Results 1 to 5 of 5

Thread: error : [server has not yet been opened] - HELP ME PLEASE

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    32

    Unhappy error : [server has not yet been opened] - HELP ME PLEASE

    Hi Everybody....

    could you please help me to see the code below???

    [Highlight=VB]
    Dim appl As New CRAXDRT.Application
    Dim report As New CRAXDRT.report
    Dim con As New ADODB.Connection
    Dim rs As New ADODB.Recordset

    Private Sub Form_Load()
    Set con = New ADODB.Connection
    con.Open "PROVIDER=SQLOLEDB.1;SERVER=DEBBIE;INITIAL CATALOG=WIS;USER id=sa;PASSWORD=sql ;PROMPT=NOPROMPT"

    Set rs = New ADODB.Recordset
    sql = "select mat_cd, matname, loccode, qty, qty_available " & _
    "from m_rawmat inner join wi_matxloc on mat_cd = matcode"
    rs.Open sql, con, adOpenForwardOnly, adLockReadOnly
    rs.Filter = "mat_cd = '" & Form2.Text1.Text & "'"

    Set report = appl.OpenReport(App.Path & "\report\inventory.rpt")
    report.DiscardSavedData
    report.Database.Tables(1).SetDataSource rs, 3
    CRViewer1.ReportSource = report
    CRViewer1.ViewReport
    End Sub
    [Highlight=VB]

    I'm so frustated about this.....
    It always prompt me this errror msg [Server has not yet been opened]
    I dont understand where the problem lies ....

    Please kindly help me to correct my code...
    I'm in urgent...

    Thanks in advance ....
    Best Regards,
    Debbie

  2. #2
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: error : [server has not yet been opened] - HELP ME PLEASE

    please tell in which line of code error is occuring

  3. #3
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: error : [server has not yet been opened] - HELP ME PLEASE

    take a crystal report control at your form and check it for this

  4. #4

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    32

    Re: error : [server has not yet been opened] - HELP ME PLEASE

    I don't kno which line is the error too...

    i try to find out thru F8 .. but the error msg prompt to me when the coding is ended...

    thanks for your reply ....
    Best Regards,
    Debbie

  5. #5
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: error : [server has not yet been opened] - HELP ME PLEASE

    best way for that is use crystal report control at the place of crviewer

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