Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

how to change the data source location programmatically -Report Viewer

$
0
0

Hi all,

In crystal report how to change the data source location programmatically?

Recently we changed our server and now report is nt opening.I changed connection Info correctly. After that if i change datasource location of each report it is working good

In the below code whre is the issue?Using stored procedure to pull the values.

private sub call()
        Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
        myConnectionInfo.ServerName = "sname"
        myConnectionInfo.DatabaseName = "dbname"
        myConnectionInfo.UserID = "uid"
        myConnectionInfo.Password = "passd"
SetDBLogonForReport(myConnectionInfo)
end sub


Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo)
        Dim myTableLogOnInfos As TableLogOnInfos = reportviewer.LogOnInfo()
        For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos
            myTableLogOnInfo.ConnectionInfo = myConnectionInfo
        Next
    End Sub




Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>