locked
need help connect two datasource in crystal report RRS feed

  • Question

  • User-1680333004 posted


    Member

    40 Points

    183 Posts

    need fast help

    02-27-2012 04:19 AM|LINK

    hi all i have a crystal report wirh wo datasource  (oracle and sql2005)

    how i can pass login info to these datasource using        asp.net code (vb.net)

    at the same time

    i can only pass for one datasource what about the second one

    Private Sub configureCRYSTALREPORT1()
            Dim myConnectionInfo As New ConnectionInfo()
    
            myConnectionInfo.ServerName = "Sname"
            myConnectionInfo.DatabaseName = "MyDB"
            myConnectionInfo.UserID = "user"
            myConnectionInfo.Password = "PW"
            setDBLOGONforREPORT(myConnectionInfo)
        End Sub
    
        Private Sub setDBLOGONforREPORT(ByVal myconnectioninfo As ConnectionInfo)
            Dim mytableloginfos As New TableLogOnInfos()
            mytableloginfos = reportviewer1.LogOnInfo
            For Each myTableLogOnInfo As TableLogOnInfo In mytableloginfos
                myTableLogOnInfo.ConnectionInfo = myconnectioninfo
            Next
            mytableloginfos.MergeByConnection(mytableloginfos)
    
        End Sub

    in the page_load i call
    configureCRYSTALREPORT1()
    Tuesday, February 28, 2012 5:36 AM

All replies

  • User522486851 posted

    one possible way to achive your report is create a link database and linked to the sql server or oracle then you can use a single datasource

    Tuesday, February 28, 2012 7:11 AM