I am looking for a way to refresh a crystal report(8.0) .rpt file using a vb.net console application. I also want to save that refreshed data. Currently if you run this .rpt manually you get prompted for a database login, which I want to handle in the app as well. I have been playing with this but have been unable to get everything to work.
Here is what I have so far:
Private reportDocument1 As CrystalDecisions.CrystalReports.Engine.ReportDocument
reportDocument1 = New CrystalDecisions.CrystalReports.Engine.ReportDocument()
Dim logonInfo As TableLogOnInfo = New TableLogOnInfo()
logonInfo = reportDocument1.Database.Tables(0).LogOnInfo
logonInfo.ConnectionInfo.ServerName = "g"
logonInfo.ConnectionInfo.DatabaseName = "accounts"
logonInfo.ConnectionInfo.UserID = "sa"
logonInfo.ConnectionInfo.Password = "sa"
This doesn't appear to be actually refreshing my report. I am new to using crystal reports so I am sure I am missing a key concept here.