Wednesday, October 20, 2010

cryrep

Dim cryRpt As New ReportDocument()

cryRpt.FileName = "C:\Users\RAJESH\Desktop\WebSite1\CrystalReport.rpt"
'even Load also will work :
'cryRpt.Load("C:\Users\RAJESH\Desktop\WebSite1\CrystalReport.rpt")


For Each CrTable As CrystalDecisions.CrystalReports.Engine.Table In cryRpt.Database.Tables
CrTable.LogOnInfo.ConnectionInfo.ServerName = "IBM\SFT"
CrTable.LogOnInfo.ConnectionInfo.DatabaseName = "GpsMelissaDPS"
CrTable.LogOnInfo.ConnectionInfo.UserID = "sa"
CrTable.LogOnInfo.ConnectionInfo.Password = "mumbaisaibm"
CrTable.ApplyLogOnInfo(CrTable.LogOnInfo)
Next

CrystalReportViewer1.ReportSource = cryRpt
CrystalReportViewer1.RefreshReport()

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...