Seagate Crystal Report Designer Component 
Author Message
 Seagate Crystal Report Designer Component

HI!

Why does Crystal Reports loose the connection while using the ADO and OLE DB
Connection String. In VB the connection is activated. I see the fields in
CR, but the connection ever terminated.

System:
Win NT 4.0 SP6
VB 6 SP 5
SQL 2000 with SQL Server and Windows authenfication

Here my example
Dim Report As New CrystalReport2
Dim rs1 As ADODB.Recordset
Dim con1 As New ADODB.Connection

    con1.ConnectionTimeout = 15
    con1.Provider = "sqloledb"
    con1.Properties("Data Source").Value = ServerName
    con1.Properties("Initial Catalog").Value = DatabaseName
    con1.CursorLocation = adUseClient
    If optWinNTAuth = True Then
        con1.Properties("Integrated Security").Value = "SSPI"
    Else
        UserName = "BOHLEN  "
        Password = "xxxx"
        con1.Properties("User ID").Value = UserName
        con1.Properties("Password").Value = Password
    End If

    con1.Open

    Set rs1 = New Recordset
    Set rs1.ActiveConnection = con1
    rs1.CursorType = adOpenKeyset
    rs1.LockType = adLockOptimistic

    rs1.Open "SELECT QUARTAL,LOCATION,HAFEN FROM OAQUART_DRUCK ORDER BY
QUARTAL, LOCATION", , , , adCmdText

    Me.MousePointer = vbDefault

    Report.Database.SetDataSource rs1
'EVERYTHING ALLRIGHT UNTIL THIS POINT
'In rs1 i can see the data

    CRViewer1.ReportSource = Report

    CRViewer1.ViewReport

    While CRViewer1.IsBusy
        DoEvents
    Wend

'The Viewer tells me following error:
This field name is not known: Sure, the Connectionstring is far away from
me..

Thorsten E. Bohlen



Sat, 31 Jan 2004 21:36:57 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Crystal Reports 6 Report Designer Component

2. Crystal Reports Report Designer Component

3. Crystal Report Designer Component (Previewing a report.)

4. Crystal Reports "Report Designer Component"

5. Crystal Report Designer Component (Previewing a report.)

6. Different between VB's Crystal Report and Seagate Crystal Report

7. crystal Report designer component question?

8. No Crystal reports in Component Designer

9. Crystal Reports Designer Component

10. VB 6 / Crystal Report Designer Component (7.0)

11. Has someone used the Crystal Report Designer Component?

12. Crystal Report Designer component - How do I add a button

 

 
Powered by phpBB® Forum Software