Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click crypt = New ReportDocument crtableLogoninfos = New TableLogOnInfos() crtableLogoninfo = New TableLogOnInfo() crConnectionInfo = New ConnectionInfo() crypt.Load("C:\Documents and Settings\ankur\My Documents\Visual Studio 2005\WebSites\WebSite4\CrystalReport.rpt") crConnectionInfo.ServerName = "." crConnectionInfo.DatabaseName = "fee_srms" crConnectionInfo.UserID = "sa" crConnectionInfo.Password = "database" crtables = crypt.Database.Tables For Each crtable In crtables crtableLogoninfo = crtable.LogOnInfo crtableLogoninfo.ConnectionInfo = crConnectionInfo crtable.ApplyLogOnInfo(crtableLogoninfo) Next crtable CrystalReportViewer1.ReportSource = crypt End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)